@hep-code-runner/react 3.3.4 → 3.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -15
- package/dist/index.mjs +479 -475
- package/package.json +2 -3
package/dist/index.mjs
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import ze, { useRef as je, useMemo as
|
|
2
|
-
var
|
|
1
|
+
import ze, { useRef as je, useMemo as ke, useCallback as he, useEffect as we, useState as K, forwardRef as Xe, useImperativeHandle as Ze } from "react";
|
|
2
|
+
var Be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
3
|
function Ke(h) {
|
|
4
4
|
return h && h.__esModule && Object.prototype.hasOwnProperty.call(h, "default") ? h.default : h;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
7
|
-
process.env.NODE_ENV === "production" ?
|
|
8
|
-
if (
|
|
9
|
-
|
|
10
|
-
var h = ze, t = Symbol.for("react.element"), c = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, m = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
|
11
|
-
function
|
|
12
|
-
var
|
|
13
|
-
for (
|
|
14
|
-
if (
|
|
15
|
-
return { $$typeof: t, type:
|
|
6
|
+
var Ge, Ue = { exports: {} }, Re = {}, We, Ce = {};
|
|
7
|
+
process.env.NODE_ENV === "production" ? Ue.exports = function() {
|
|
8
|
+
if (Ge) return Re;
|
|
9
|
+
Ge = 1;
|
|
10
|
+
var h = ze, t = Symbol.for("react.element"), c = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, m = h.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, w = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
11
|
+
function s(_, y, b) {
|
|
12
|
+
var k, S = {}, L = null, v = null;
|
|
13
|
+
for (k in b !== void 0 && (L = "" + b), y.key !== void 0 && (L = "" + y.key), y.ref !== void 0 && (v = y.ref), y) u.call(y, k) && !w.hasOwnProperty(k) && (S[k] = y[k]);
|
|
14
|
+
if (_ && _.defaultProps) for (k in y = _.defaultProps) S[k] === void 0 && (S[k] = y[k]);
|
|
15
|
+
return { $$typeof: t, type: _, key: L, ref: v, props: S, _owner: m.current };
|
|
16
16
|
}
|
|
17
|
-
return
|
|
18
|
-
}() :
|
|
19
|
-
var h, t = ze, c = Symbol.for("react.element"), u = Symbol.for("react.portal"), m = Symbol.for("react.fragment"),
|
|
17
|
+
return Re.Fragment = c, Re.jsx = s, Re.jsxs = s, Re;
|
|
18
|
+
}() : Ue.exports = (We || (We = 1, process.env.NODE_ENV !== "production" && function() {
|
|
19
|
+
var h, t = ze, c = Symbol.for("react.element"), u = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), y = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), C = Symbol.iterator, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
20
20
|
function n(e) {
|
|
21
|
-
for (var g = arguments.length, f = new Array(g > 1 ? g - 1 : 0),
|
|
22
|
-
(function(
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
return String(
|
|
21
|
+
for (var g = arguments.length, f = new Array(g > 1 ? g - 1 : 0), D = 1; D < g; D++) f[D - 1] = arguments[D];
|
|
22
|
+
(function(F, R, T) {
|
|
23
|
+
var N = r.ReactDebugCurrentFrame.getStackAddendum();
|
|
24
|
+
N !== "" && (R += "%s", T = T.concat([N]));
|
|
25
|
+
var $ = T.map(function(M) {
|
|
26
|
+
return String(M);
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
$.unshift("Warning: " + R), Function.prototype.apply.call(console[F], console, $);
|
|
29
29
|
})("error", e, f);
|
|
30
30
|
}
|
|
31
31
|
function a(e) {
|
|
@@ -40,34 +40,34 @@ process.env.NODE_ENV === "production" ? Me.exports = function() {
|
|
|
40
40
|
return "Fragment";
|
|
41
41
|
case u:
|
|
42
42
|
return "Portal";
|
|
43
|
-
case
|
|
43
|
+
case s:
|
|
44
44
|
return "Profiler";
|
|
45
|
-
case
|
|
45
|
+
case w:
|
|
46
46
|
return "StrictMode";
|
|
47
|
-
case
|
|
47
|
+
case k:
|
|
48
48
|
return "Suspense";
|
|
49
|
-
case
|
|
49
|
+
case S:
|
|
50
50
|
return "SuspenseList";
|
|
51
51
|
}
|
|
52
52
|
if (typeof e == "object") switch (e.$$typeof) {
|
|
53
53
|
case y:
|
|
54
54
|
return a(e) + ".Consumer";
|
|
55
|
-
case
|
|
55
|
+
case _:
|
|
56
56
|
return a(e._context) + ".Provider";
|
|
57
57
|
case b:
|
|
58
|
-
return function(R,
|
|
59
|
-
var
|
|
60
|
-
if (
|
|
61
|
-
var
|
|
62
|
-
return
|
|
58
|
+
return function(R, T, N) {
|
|
59
|
+
var $ = R.displayName;
|
|
60
|
+
if ($) return $;
|
|
61
|
+
var M = T.displayName || T.name || "";
|
|
62
|
+
return M !== "" ? N + "(" + M + ")" : N;
|
|
63
63
|
}(e, e.render, "ForwardRef");
|
|
64
64
|
case L:
|
|
65
65
|
var g = e.displayName || null;
|
|
66
66
|
return g !== null ? g : o(e.type) || "Memo";
|
|
67
|
-
case
|
|
68
|
-
var f = e,
|
|
67
|
+
case v:
|
|
68
|
+
var f = e, D = f._payload, F = f._init;
|
|
69
69
|
try {
|
|
70
|
-
return o(
|
|
70
|
+
return o(F(D));
|
|
71
71
|
} catch {
|
|
72
72
|
return null;
|
|
73
73
|
}
|
|
@@ -75,57 +75,57 @@ process.env.NODE_ENV === "production" ? Me.exports = function() {
|
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
77
|
h = Symbol.for("react.module.reference");
|
|
78
|
-
var
|
|
79
|
-
function
|
|
78
|
+
var i, d, p, E, P, z, ne, J = Object.assign, ee = 0;
|
|
79
|
+
function be() {
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
var
|
|
81
|
+
be.__reactDisabledLog = !0;
|
|
82
|
+
var V, ge = r.ReactCurrentDispatcher;
|
|
83
83
|
function H(e, g, f) {
|
|
84
|
-
if (
|
|
84
|
+
if (V === void 0) try {
|
|
85
85
|
throw Error();
|
|
86
|
-
} catch (
|
|
87
|
-
var
|
|
88
|
-
|
|
86
|
+
} catch (F) {
|
|
87
|
+
var D = F.stack.trim().match(/\n( *(at )?)/);
|
|
88
|
+
V = D && D[1] || "";
|
|
89
89
|
}
|
|
90
90
|
return `
|
|
91
|
-
` +
|
|
91
|
+
` + V + e;
|
|
92
92
|
}
|
|
93
|
-
var G,
|
|
94
|
-
function
|
|
95
|
-
if (!e ||
|
|
96
|
-
var f,
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
var
|
|
100
|
-
Error.prepareStackTrace = void 0,
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
var O = { configurable: !0, enumerable: !0, value:
|
|
93
|
+
var G, Y = !1, X = typeof WeakMap == "function" ? WeakMap : Map;
|
|
94
|
+
function ie(e, g) {
|
|
95
|
+
if (!e || Y) return "";
|
|
96
|
+
var f, D = G.get(e);
|
|
97
|
+
if (D !== void 0) return D;
|
|
98
|
+
Y = !0;
|
|
99
|
+
var F, R = Error.prepareStackTrace;
|
|
100
|
+
Error.prepareStackTrace = void 0, F = ge.current, ge.current = null, function() {
|
|
101
|
+
if (ee === 0) {
|
|
102
|
+
i = console.log, d = console.info, p = console.warn, E = console.error, P = console.group, z = console.groupCollapsed, ne = console.groupEnd;
|
|
103
|
+
var O = { configurable: !0, enumerable: !0, value: be, writable: !0 };
|
|
104
104
|
Object.defineProperties(console, { info: O, log: O, warn: O, error: O, group: O, groupCollapsed: O, groupEnd: O });
|
|
105
105
|
}
|
|
106
|
-
|
|
106
|
+
ee++;
|
|
107
107
|
}();
|
|
108
108
|
try {
|
|
109
109
|
if (g) {
|
|
110
|
-
var
|
|
110
|
+
var T = function() {
|
|
111
111
|
throw Error();
|
|
112
112
|
};
|
|
113
|
-
if (Object.defineProperty(
|
|
113
|
+
if (Object.defineProperty(T.prototype, "props", { set: function() {
|
|
114
114
|
throw Error();
|
|
115
115
|
} }), typeof Reflect == "object" && Reflect.construct) {
|
|
116
116
|
try {
|
|
117
|
-
Reflect.construct(
|
|
117
|
+
Reflect.construct(T, []);
|
|
118
118
|
} catch (O) {
|
|
119
119
|
f = O;
|
|
120
120
|
}
|
|
121
|
-
Reflect.construct(e, [],
|
|
121
|
+
Reflect.construct(e, [], T);
|
|
122
122
|
} else {
|
|
123
123
|
try {
|
|
124
|
-
|
|
124
|
+
T.call();
|
|
125
125
|
} catch (O) {
|
|
126
126
|
f = O;
|
|
127
127
|
}
|
|
128
|
-
e.call(
|
|
128
|
+
e.call(T.prototype);
|
|
129
129
|
}
|
|
130
130
|
} else {
|
|
131
131
|
try {
|
|
@@ -137,183 +137,183 @@ process.env.NODE_ENV === "production" ? Me.exports = function() {
|
|
|
137
137
|
}
|
|
138
138
|
} catch (O) {
|
|
139
139
|
if (O && f && typeof O.stack == "string") {
|
|
140
|
-
for (var
|
|
141
|
-
`),
|
|
142
|
-
`),
|
|
143
|
-
for (;
|
|
144
|
-
if (
|
|
145
|
-
if (
|
|
146
|
-
var
|
|
147
|
-
` +
|
|
148
|
-
return e.displayName &&
|
|
140
|
+
for (var N = O.stack.split(`
|
|
141
|
+
`), $ = f.stack.split(`
|
|
142
|
+
`), M = N.length - 1, j = $.length - 1; M >= 1 && j >= 0 && N[M] !== $[j]; ) j--;
|
|
143
|
+
for (; M >= 1 && j >= 0; M--, j--) if (N[M] !== $[j]) {
|
|
144
|
+
if (M !== 1 || j !== 1) do
|
|
145
|
+
if (M--, --j < 0 || N[M] !== $[j]) {
|
|
146
|
+
var A = `
|
|
147
|
+
` + N[M].replace(" at new ", " at ");
|
|
148
|
+
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && G.set(e, A), A;
|
|
149
149
|
}
|
|
150
|
-
while (
|
|
150
|
+
while (M >= 1 && j >= 0);
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
} finally {
|
|
155
|
-
|
|
156
|
-
if (--
|
|
155
|
+
Y = !1, ge.current = F, function() {
|
|
156
|
+
if (--ee === 0) {
|
|
157
157
|
var O = { configurable: !0, enumerable: !0, writable: !0 };
|
|
158
|
-
Object.defineProperties(console, { log:
|
|
158
|
+
Object.defineProperties(console, { log: J({}, O, { value: i }), info: J({}, O, { value: d }), warn: J({}, O, { value: p }), error: J({}, O, { value: E }), group: J({}, O, { value: P }), groupCollapsed: J({}, O, { value: z }), groupEnd: J({}, O, { value: ne }) });
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
ee < 0 && n("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
161
161
|
}(), Error.prepareStackTrace = R;
|
|
162
162
|
}
|
|
163
|
-
var B = e ? e.displayName || e.name : "",
|
|
164
|
-
return typeof e == "function" && G.set(e,
|
|
163
|
+
var B = e ? e.displayName || e.name : "", W = B ? H(B) : "";
|
|
164
|
+
return typeof e == "function" && G.set(e, W), W;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function q(e, g, f) {
|
|
167
167
|
if (e == null) return "";
|
|
168
|
-
if (typeof e == "function") return
|
|
169
|
-
var
|
|
168
|
+
if (typeof e == "function") return ie(e, !(!(D = e.prototype) || !D.isReactComponent));
|
|
169
|
+
var D;
|
|
170
170
|
if (typeof e == "string") return H(e);
|
|
171
171
|
switch (e) {
|
|
172
|
-
case
|
|
172
|
+
case k:
|
|
173
173
|
return H("Suspense");
|
|
174
|
-
case
|
|
174
|
+
case S:
|
|
175
175
|
return H("SuspenseList");
|
|
176
176
|
}
|
|
177
177
|
if (typeof e == "object") switch (e.$$typeof) {
|
|
178
178
|
case b:
|
|
179
|
-
return
|
|
179
|
+
return ie(e.render, !1);
|
|
180
180
|
case L:
|
|
181
|
-
return
|
|
182
|
-
case
|
|
183
|
-
var
|
|
181
|
+
return q(e.type, g, f);
|
|
182
|
+
case v:
|
|
183
|
+
var F = e, R = F._payload, T = F._init;
|
|
184
184
|
try {
|
|
185
|
-
return
|
|
185
|
+
return q(T(R), g, f);
|
|
186
186
|
} catch {
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
return "";
|
|
190
190
|
}
|
|
191
|
-
G = new
|
|
192
|
-
var
|
|
193
|
-
function
|
|
191
|
+
G = new X();
|
|
192
|
+
var se = Object.prototype.hasOwnProperty, Q = {}, te = r.ReactDebugCurrentFrame;
|
|
193
|
+
function re(e) {
|
|
194
194
|
if (e) {
|
|
195
|
-
var g = e._owner, f =
|
|
196
|
-
|
|
197
|
-
} else
|
|
195
|
+
var g = e._owner, f = q(e.type, e._source, g ? g.type : null);
|
|
196
|
+
te.setExtraStackFrame(f);
|
|
197
|
+
} else te.setExtraStackFrame(null);
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
function
|
|
201
|
-
return
|
|
199
|
+
var le = Array.isArray;
|
|
200
|
+
function fe(e) {
|
|
201
|
+
return le(e);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function ae(e) {
|
|
204
204
|
return "" + e;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function ce(e) {
|
|
207
207
|
if (function(g) {
|
|
208
208
|
try {
|
|
209
|
-
return
|
|
209
|
+
return ae(g), !1;
|
|
210
210
|
} catch {
|
|
211
211
|
return !0;
|
|
212
212
|
}
|
|
213
213
|
}(e)) return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", function(g) {
|
|
214
214
|
return typeof Symbol == "function" && Symbol.toStringTag && g[Symbol.toStringTag] || g.constructor.name || "Object";
|
|
215
|
-
}(e)),
|
|
215
|
+
}(e)), ae(e);
|
|
216
216
|
}
|
|
217
|
-
var
|
|
218
|
-
function De(e, g, f,
|
|
219
|
-
var R,
|
|
220
|
-
for (R in f !== void 0 && (
|
|
221
|
-
if (
|
|
222
|
-
var B = Object.getOwnPropertyDescriptor(
|
|
217
|
+
var oe, Oe, ye = r.ReactCurrentOwner, Pe = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
218
|
+
function De(e, g, f, D, F) {
|
|
219
|
+
var R, T = {}, N = null, $ = null;
|
|
220
|
+
for (R in f !== void 0 && (ce(f), N = "" + f), function(A) {
|
|
221
|
+
if (se.call(A, "key")) {
|
|
222
|
+
var B = Object.getOwnPropertyDescriptor(A, "key").get;
|
|
223
223
|
if (B && B.isReactWarning) return !1;
|
|
224
224
|
}
|
|
225
|
-
return
|
|
226
|
-
}(g) && (
|
|
227
|
-
if (
|
|
228
|
-
var B = Object.getOwnPropertyDescriptor(
|
|
225
|
+
return A.key !== void 0;
|
|
226
|
+
}(g) && (ce(g.key), N = "" + g.key), function(A) {
|
|
227
|
+
if (se.call(A, "ref")) {
|
|
228
|
+
var B = Object.getOwnPropertyDescriptor(A, "ref").get;
|
|
229
229
|
if (B && B.isReactWarning) return !1;
|
|
230
230
|
}
|
|
231
|
-
return
|
|
232
|
-
}(g) && (
|
|
233
|
-
typeof
|
|
234
|
-
}(g)), g)
|
|
231
|
+
return A.ref !== void 0;
|
|
232
|
+
}(g) && ($ = g.ref, function(A) {
|
|
233
|
+
typeof A.ref == "string" && ye.current;
|
|
234
|
+
}(g)), g) se.call(g, R) && !Pe.hasOwnProperty(R) && (T[R] = g[R]);
|
|
235
235
|
if (e && e.defaultProps) {
|
|
236
|
-
var
|
|
237
|
-
for (R in
|
|
236
|
+
var M = e.defaultProps;
|
|
237
|
+
for (R in M) T[R] === void 0 && (T[R] = M[R]);
|
|
238
238
|
}
|
|
239
|
-
if (
|
|
240
|
-
var
|
|
241
|
-
|
|
242
|
-
var
|
|
243
|
-
|
|
239
|
+
if (N || $) {
|
|
240
|
+
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
241
|
+
N && function(A, B) {
|
|
242
|
+
var W = function() {
|
|
243
|
+
oe || (oe = !0, n("%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)", B));
|
|
244
244
|
};
|
|
245
|
-
|
|
246
|
-
}(
|
|
247
|
-
var
|
|
248
|
-
|
|
245
|
+
W.isReactWarning = !0, Object.defineProperty(A, "key", { get: W, configurable: !0 });
|
|
246
|
+
}(T, j), $ && function(A, B) {
|
|
247
|
+
var W = function() {
|
|
248
|
+
Oe || (Oe = !0, n("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", B));
|
|
249
249
|
};
|
|
250
|
-
|
|
251
|
-
}(
|
|
250
|
+
W.isReactWarning = !0, Object.defineProperty(A, "ref", { get: W, configurable: !0 });
|
|
251
|
+
}(T, j);
|
|
252
252
|
}
|
|
253
|
-
return function(
|
|
254
|
-
var
|
|
255
|
-
return Object.defineProperty(
|
|
256
|
-
}(e,
|
|
253
|
+
return function(A, B, W, O, U, Le, Ne) {
|
|
254
|
+
var de = { $$typeof: c, type: A, key: B, ref: W, props: Ne, _owner: Le, _store: {} };
|
|
255
|
+
return Object.defineProperty(de._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(de, "_self", { configurable: !1, enumerable: !1, writable: !1, value: O }), Object.defineProperty(de, "_source", { configurable: !1, enumerable: !1, writable: !1, value: U }), Object.freeze && (Object.freeze(de.props), Object.freeze(de)), de;
|
|
256
|
+
}(e, N, $, F, D, ye.current, T);
|
|
257
257
|
}
|
|
258
|
-
var
|
|
259
|
-
function
|
|
258
|
+
var Se, Ae = r.ReactCurrentOwner, Fe = r.ReactDebugCurrentFrame;
|
|
259
|
+
function me(e) {
|
|
260
260
|
if (e) {
|
|
261
|
-
var g = e._owner, f =
|
|
262
|
-
|
|
263
|
-
} else
|
|
261
|
+
var g = e._owner, f = q(e.type, e._source, g ? g.type : null);
|
|
262
|
+
Fe.setExtraStackFrame(f);
|
|
263
|
+
} else Fe.setExtraStackFrame(null);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Ee(e) {
|
|
266
266
|
return typeof e == "object" && e !== null && e.$$typeof === c;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (
|
|
270
|
-
var e = o(
|
|
268
|
+
function Ie() {
|
|
269
|
+
if (Ae.current) {
|
|
270
|
+
var e = o(Ae.current.type);
|
|
271
271
|
if (e) return `
|
|
272
272
|
|
|
273
273
|
Check the render method of \`` + e + "`.";
|
|
274
274
|
}
|
|
275
275
|
return "";
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
var
|
|
279
|
-
function
|
|
277
|
+
Se = !1;
|
|
278
|
+
var xe = {};
|
|
279
|
+
function Te(e, g) {
|
|
280
280
|
if (e._store && !e._store.validated && e.key == null) {
|
|
281
281
|
e._store.validated = !0;
|
|
282
|
-
var f = function(
|
|
283
|
-
var R =
|
|
282
|
+
var f = function(F) {
|
|
283
|
+
var R = Ie();
|
|
284
284
|
if (!R) {
|
|
285
|
-
var
|
|
286
|
-
|
|
285
|
+
var T = typeof F == "string" ? F : F.displayName || F.name;
|
|
286
|
+
T && (R = `
|
|
287
287
|
|
|
288
|
-
Check the top-level render call using <` +
|
|
288
|
+
Check the top-level render call using <` + T + ">.");
|
|
289
289
|
}
|
|
290
290
|
return R;
|
|
291
291
|
}(g);
|
|
292
|
-
if (!
|
|
293
|
-
|
|
294
|
-
var
|
|
295
|
-
e && e._owner && e._owner !==
|
|
292
|
+
if (!xe[f]) {
|
|
293
|
+
xe[f] = !0;
|
|
294
|
+
var D = "";
|
|
295
|
+
e && e._owner && e._owner !== Ae.current && (D = " It was passed a child from " + o(e._owner.type) + "."), me(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', f, D), me(null);
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function x(e, g) {
|
|
300
300
|
if (typeof e == "object") {
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
303
|
-
|
|
301
|
+
if (fe(e)) for (var f = 0; f < e.length; f++) {
|
|
302
|
+
var D = e[f];
|
|
303
|
+
Ee(D) && Te(D, g);
|
|
304
304
|
}
|
|
305
|
-
else if (
|
|
305
|
+
else if (Ee(e)) e._store && (e._store.validated = !0);
|
|
306
306
|
else if (e) {
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
var
|
|
310
|
-
return typeof
|
|
307
|
+
var F = function(N) {
|
|
308
|
+
if (N === null || typeof N != "object") return null;
|
|
309
|
+
var $ = C && N[C] || N["@@iterator"];
|
|
310
|
+
return typeof $ == "function" ? $ : null;
|
|
311
311
|
}(e);
|
|
312
|
-
if (typeof
|
|
312
|
+
if (typeof F == "function" && F !== e.entries) for (var R, T = F.call(e); !(R = T.next()).done; ) Ee(R.value) && Te(R.value, g);
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Z(e) {
|
|
317
317
|
var g, f = e.type;
|
|
318
318
|
if (f != null && typeof f != "string") {
|
|
319
319
|
if (typeof f == "function") g = f.propTypes;
|
|
@@ -322,94 +322,94 @@ Check the top-level render call using <` + S + ">.");
|
|
|
322
322
|
g = f.propTypes;
|
|
323
323
|
}
|
|
324
324
|
if (g) {
|
|
325
|
-
var
|
|
326
|
-
(function(
|
|
327
|
-
var
|
|
328
|
-
for (var
|
|
329
|
-
var
|
|
325
|
+
var D = o(f);
|
|
326
|
+
(function(F, R, T, N, $) {
|
|
327
|
+
var M = Function.call.bind(se);
|
|
328
|
+
for (var j in F) if (M(F, j)) {
|
|
329
|
+
var A = void 0;
|
|
330
330
|
try {
|
|
331
|
-
if (typeof
|
|
332
|
-
var B = Error((
|
|
331
|
+
if (typeof F[j] != "function") {
|
|
332
|
+
var B = Error((N || "React class") + ": " + T + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof F[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
333
|
throw B.name = "Invariant Violation", B;
|
|
334
334
|
}
|
|
335
|
-
|
|
336
|
-
} catch (
|
|
337
|
-
|
|
335
|
+
A = F[j](R, j, N, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
+
} catch (W) {
|
|
337
|
+
A = W;
|
|
338
338
|
}
|
|
339
|
-
!
|
|
339
|
+
!A || A instanceof Error || (re($), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", N || "React class", T, j, typeof A), re(null)), A instanceof Error && !(A.message in Q) && (Q[A.message] = !0, re($), n("Failed %s type: %s", T, A.message), re(null));
|
|
340
340
|
}
|
|
341
|
-
})(g, e.props, "prop",
|
|
342
|
-
} else f.PropTypes === void 0 ||
|
|
341
|
+
})(g, e.props, "prop", D, e);
|
|
342
|
+
} else f.PropTypes === void 0 || Se || (Se = !0, n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o(f) || "Unknown"));
|
|
343
343
|
typeof f.getDefaultProps != "function" || f.getDefaultProps.isReactClassApproved || n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
var
|
|
347
|
-
function
|
|
348
|
-
var
|
|
349
|
-
return typeof
|
|
346
|
+
var pe = {};
|
|
347
|
+
function ue(e, g, f, D, F, R) {
|
|
348
|
+
var T = function(U) {
|
|
349
|
+
return typeof U == "string" || typeof U == "function" || U === m || U === s || U === w || U === k || U === S || U === I || typeof U == "object" && U !== null && (U.$$typeof === v || U.$$typeof === L || U.$$typeof === _ || U.$$typeof === y || U.$$typeof === b || U.$$typeof === h || U.getModuleId !== void 0);
|
|
350
350
|
}(e);
|
|
351
|
-
if (!
|
|
352
|
-
var
|
|
353
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
351
|
+
if (!T) {
|
|
352
|
+
var N, $ = "";
|
|
353
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), $ += Ie(), e === null ? N = "null" : fe(e) ? N = "array" : e !== void 0 && e.$$typeof === c ? (N = "<" + (o(e.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : N = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, $);
|
|
354
354
|
}
|
|
355
|
-
var
|
|
356
|
-
if (
|
|
357
|
-
if (
|
|
358
|
-
var
|
|
359
|
-
if (
|
|
360
|
-
for (var
|
|
361
|
-
Object.freeze && Object.freeze(
|
|
355
|
+
var M = De(e, g, f, F, R);
|
|
356
|
+
if (M == null) return M;
|
|
357
|
+
if (T) {
|
|
358
|
+
var j = g.children;
|
|
359
|
+
if (j !== void 0) if (D) if (fe(j)) {
|
|
360
|
+
for (var A = 0; A < j.length; A++) x(j[A], e);
|
|
361
|
+
Object.freeze && Object.freeze(j);
|
|
362
362
|
} else n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
363
|
-
else
|
|
363
|
+
else x(j, e);
|
|
364
364
|
}
|
|
365
|
-
if (
|
|
366
|
-
var B = o(e),
|
|
367
|
-
return
|
|
368
|
-
}), O =
|
|
369
|
-
|
|
365
|
+
if (se.call(g, "key")) {
|
|
366
|
+
var B = o(e), W = Object.keys(g).filter(function(U) {
|
|
367
|
+
return U !== "key";
|
|
368
|
+
}), O = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
369
|
+
pe[B + O] || (n(`A props object containing a "key" prop is being spread into JSX:
|
|
370
370
|
let props = %s;
|
|
371
371
|
<%s {...props} />
|
|
372
372
|
React keys must be passed directly to JSX without using spread:
|
|
373
373
|
let props = %s;
|
|
374
|
-
<%s key={someKey} {...props} />`, O, B,
|
|
374
|
+
<%s key={someKey} {...props} />`, O, B, W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}", B), pe[B + O] = !0);
|
|
375
375
|
}
|
|
376
|
-
return e === m ? function(
|
|
377
|
-
for (var Le = Object.keys(
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
380
|
-
|
|
376
|
+
return e === m ? function(U) {
|
|
377
|
+
for (var Le = Object.keys(U.props), Ne = 0; Ne < Le.length; Ne++) {
|
|
378
|
+
var de = Le[Ne];
|
|
379
|
+
if (de !== "children" && de !== "key") {
|
|
380
|
+
me(U), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", de), me(null);
|
|
381
381
|
break;
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
|
|
385
|
-
}(
|
|
384
|
+
U.ref !== null && (me(U), n("Invalid attribute `ref` supplied to `React.Fragment`."), me(null));
|
|
385
|
+
}(M) : Z(M), M;
|
|
386
386
|
}
|
|
387
|
-
var
|
|
388
|
-
return
|
|
389
|
-
},
|
|
390
|
-
return
|
|
387
|
+
var ve = function(e, g, f) {
|
|
388
|
+
return ue(e, g, f, !1);
|
|
389
|
+
}, _e = function(e, g, f) {
|
|
390
|
+
return ue(e, g, f, !0);
|
|
391
391
|
};
|
|
392
|
-
Ce.Fragment = m, Ce.jsx =
|
|
392
|
+
Ce.Fragment = m, Ce.jsx = ve, Ce.jsxs = _e;
|
|
393
393
|
}()), Ce);
|
|
394
|
-
var l =
|
|
394
|
+
var l = Ue.exports, Ye = { exports: {} };
|
|
395
395
|
(function(h) {
|
|
396
396
|
var t = function(c) {
|
|
397
|
-
var u = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, m = 0,
|
|
398
|
-
return n instanceof
|
|
397
|
+
var u = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, m = 0, w = {}, s = { manual: c.Prism && c.Prism.manual, disableWorkerMessageHandler: c.Prism && c.Prism.disableWorkerMessageHandler, util: { encode: function r(n) {
|
|
398
|
+
return n instanceof _ ? new _(n.type, r(n.content), n.alias) : Array.isArray(n) ? n.map(r) : n.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
399
399
|
}, type: function(r) {
|
|
400
400
|
return Object.prototype.toString.call(r).slice(8, -1);
|
|
401
401
|
}, objId: function(r) {
|
|
402
402
|
return r.__id || Object.defineProperty(r, "__id", { value: ++m }), r.__id;
|
|
403
403
|
}, clone: function r(n, a) {
|
|
404
|
-
var o,
|
|
405
|
-
switch (a = a || {},
|
|
404
|
+
var o, i;
|
|
405
|
+
switch (a = a || {}, s.util.type(n)) {
|
|
406
406
|
case "Object":
|
|
407
|
-
if (
|
|
408
|
-
for (var
|
|
407
|
+
if (i = s.util.objId(n), a[i]) return a[i];
|
|
408
|
+
for (var d in o = {}, a[i] = o, n) n.hasOwnProperty(d) && (o[d] = r(n[d], a));
|
|
409
409
|
return o;
|
|
410
410
|
case "Array":
|
|
411
|
-
return
|
|
412
|
-
o[E] = r(
|
|
411
|
+
return i = s.util.objId(n), a[i] ? a[i] : (o = [], a[i] = o, n.forEach(function(p, E) {
|
|
412
|
+
o[E] = r(p, a);
|
|
413
413
|
}), o);
|
|
414
414
|
default:
|
|
415
415
|
return n;
|
|
@@ -438,178 +438,178 @@ var l = Me.exports, Ye = { exports: {} };
|
|
|
438
438
|
}
|
|
439
439
|
}, isActive: function(r, n, a) {
|
|
440
440
|
for (var o = "no-" + n; r; ) {
|
|
441
|
-
var
|
|
442
|
-
if (
|
|
443
|
-
if (
|
|
441
|
+
var i = r.classList;
|
|
442
|
+
if (i.contains(n)) return !0;
|
|
443
|
+
if (i.contains(o)) return !1;
|
|
444
444
|
r = r.parentElement;
|
|
445
445
|
}
|
|
446
446
|
return !!a;
|
|
447
|
-
} }, languages: { plain:
|
|
448
|
-
var a =
|
|
447
|
+
} }, languages: { plain: w, plaintext: w, text: w, txt: w, extend: function(r, n) {
|
|
448
|
+
var a = s.util.clone(s.languages[r]);
|
|
449
449
|
for (var o in n) a[o] = n[o];
|
|
450
450
|
return a;
|
|
451
451
|
}, insertBefore: function(r, n, a, o) {
|
|
452
|
-
var
|
|
453
|
-
for (var
|
|
454
|
-
if (
|
|
455
|
-
a.hasOwnProperty(
|
|
452
|
+
var i = (o = o || s.languages)[r], d = {};
|
|
453
|
+
for (var p in i) if (i.hasOwnProperty(p)) {
|
|
454
|
+
if (p == n) for (var E in a) a.hasOwnProperty(E) && (d[E] = a[E]);
|
|
455
|
+
a.hasOwnProperty(p) || (d[p] = i[p]);
|
|
456
456
|
}
|
|
457
|
-
var
|
|
458
|
-
return o[r] =
|
|
459
|
-
|
|
460
|
-
}),
|
|
461
|
-
}, DFS: function r(n, a, o,
|
|
462
|
-
|
|
463
|
-
var
|
|
464
|
-
for (var
|
|
465
|
-
a.call(n,
|
|
466
|
-
var E = n[
|
|
467
|
-
|
|
457
|
+
var P = o[r];
|
|
458
|
+
return o[r] = d, s.languages.DFS(s.languages, function(z, ne) {
|
|
459
|
+
ne === P && z != r && (this[z] = d);
|
|
460
|
+
}), d;
|
|
461
|
+
}, DFS: function r(n, a, o, i) {
|
|
462
|
+
i = i || {};
|
|
463
|
+
var d = s.util.objId;
|
|
464
|
+
for (var p in n) if (n.hasOwnProperty(p)) {
|
|
465
|
+
a.call(n, p, n[p], o || p);
|
|
466
|
+
var E = n[p], P = s.util.type(E);
|
|
467
|
+
P !== "Object" || i[d(E)] ? P !== "Array" || i[d(E)] || (i[d(E)] = !0, r(E, a, p, i)) : (i[d(E)] = !0, r(E, a, null, i));
|
|
468
468
|
}
|
|
469
469
|
} }, plugins: {}, highlightAll: function(r, n) {
|
|
470
|
-
|
|
470
|
+
s.highlightAllUnder(document, r, n);
|
|
471
471
|
}, highlightAllUnder: function(r, n, a) {
|
|
472
472
|
var o = { callback: a, container: r, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
|
|
473
|
-
|
|
474
|
-
for (var
|
|
473
|
+
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);
|
|
474
|
+
for (var i, d = 0; i = o.elements[d++]; ) s.highlightElement(i, n === !0, o.callback);
|
|
475
475
|
}, highlightElement: function(r, n, a) {
|
|
476
|
-
var o =
|
|
477
|
-
|
|
478
|
-
var
|
|
479
|
-
|
|
480
|
-
var
|
|
481
|
-
function E(
|
|
482
|
-
|
|
476
|
+
var o = s.util.getLanguage(r), i = s.languages[o];
|
|
477
|
+
s.util.setLanguage(r, o);
|
|
478
|
+
var d = r.parentElement;
|
|
479
|
+
d && d.nodeName.toLowerCase() === "pre" && s.util.setLanguage(d, o);
|
|
480
|
+
var p = { element: r, language: o, grammar: i, code: r.textContent };
|
|
481
|
+
function E(z) {
|
|
482
|
+
p.highlightedCode = z, s.hooks.run("before-insert", p), p.element.innerHTML = p.highlightedCode, s.hooks.run("after-highlight", p), s.hooks.run("complete", p), a && a.call(p.element);
|
|
483
483
|
}
|
|
484
|
-
if (
|
|
485
|
-
if (
|
|
486
|
-
var
|
|
487
|
-
|
|
488
|
-
E(
|
|
489
|
-
},
|
|
490
|
-
} else E(
|
|
491
|
-
else E(
|
|
484
|
+
if (s.hooks.run("before-sanity-check", p), (d = p.element.parentElement) && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !p.code) return s.hooks.run("complete", p), void (a && a.call(p.element));
|
|
485
|
+
if (s.hooks.run("before-highlight", p), p.grammar) if (n && c.Worker) {
|
|
486
|
+
var P = new Worker(s.filename);
|
|
487
|
+
P.onmessage = function(z) {
|
|
488
|
+
E(z.data);
|
|
489
|
+
}, P.postMessage(JSON.stringify({ language: p.language, code: p.code, immediateClose: !0 }));
|
|
490
|
+
} else E(s.highlight(p.code, p.grammar, p.language));
|
|
491
|
+
else E(s.util.encode(p.code));
|
|
492
492
|
}, highlight: function(r, n, a) {
|
|
493
493
|
var o = { code: r, grammar: n, language: a };
|
|
494
|
-
if (
|
|
495
|
-
return o.tokens =
|
|
494
|
+
if (s.hooks.run("before-tokenize", o), !o.grammar) throw new Error('The language "' + o.language + '" has no grammar.');
|
|
495
|
+
return o.tokens = s.tokenize(o.code, o.grammar), s.hooks.run("after-tokenize", o), _.stringify(s.util.encode(o.tokens), o.language);
|
|
496
496
|
}, tokenize: function(r, n) {
|
|
497
497
|
var a = n.rest;
|
|
498
498
|
if (a) {
|
|
499
499
|
for (var o in a) n[o] = a[o];
|
|
500
500
|
delete n.rest;
|
|
501
501
|
}
|
|
502
|
-
var
|
|
503
|
-
return
|
|
504
|
-
for (var
|
|
505
|
-
return
|
|
506
|
-
}(
|
|
502
|
+
var i = new k();
|
|
503
|
+
return S(i, i.head, r), b(r, i, n, i.head, 0), function(d) {
|
|
504
|
+
for (var p = [], E = d.head.next; E !== d.tail; ) p.push(E.value), E = E.next;
|
|
505
|
+
return p;
|
|
506
|
+
}(i);
|
|
507
507
|
}, hooks: { all: {}, add: function(r, n) {
|
|
508
|
-
var a =
|
|
508
|
+
var a = s.hooks.all;
|
|
509
509
|
a[r] = a[r] || [], a[r].push(n);
|
|
510
510
|
}, run: function(r, n) {
|
|
511
|
-
var a =
|
|
512
|
-
if (a && a.length) for (var o,
|
|
513
|
-
} }, Token:
|
|
514
|
-
function
|
|
511
|
+
var a = s.hooks.all[r];
|
|
512
|
+
if (a && a.length) for (var o, i = 0; o = a[i++]; ) o(n);
|
|
513
|
+
} }, Token: _ };
|
|
514
|
+
function _(r, n, a, o) {
|
|
515
515
|
this.type = r, this.content = n, this.alias = a, this.length = 0 | (o || "").length;
|
|
516
516
|
}
|
|
517
517
|
function y(r, n, a, o) {
|
|
518
518
|
r.lastIndex = n;
|
|
519
|
-
var
|
|
520
|
-
if (
|
|
521
|
-
var
|
|
522
|
-
|
|
519
|
+
var i = r.exec(a);
|
|
520
|
+
if (i && o && i[1]) {
|
|
521
|
+
var d = i[1].length;
|
|
522
|
+
i.index += d, i[0] = i[0].slice(d);
|
|
523
523
|
}
|
|
524
|
-
return
|
|
524
|
+
return i;
|
|
525
525
|
}
|
|
526
|
-
function b(r, n, a, o,
|
|
527
|
-
for (var
|
|
528
|
-
var E = a[
|
|
526
|
+
function b(r, n, a, o, i, d) {
|
|
527
|
+
for (var p in a) if (a.hasOwnProperty(p) && a[p]) {
|
|
528
|
+
var E = a[p];
|
|
529
529
|
E = Array.isArray(E) ? E : [E];
|
|
530
|
-
for (var
|
|
531
|
-
if (
|
|
532
|
-
var
|
|
533
|
-
if (
|
|
534
|
-
var
|
|
535
|
-
|
|
530
|
+
for (var P = 0; P < E.length; ++P) {
|
|
531
|
+
if (d && d.cause == p + "," + P) return;
|
|
532
|
+
var z = E[P], ne = z.inside, J = !!z.lookbehind, ee = !!z.greedy, be = z.alias;
|
|
533
|
+
if (ee && !z.pattern.global) {
|
|
534
|
+
var V = z.pattern.toString().match(/[imsuy]*$/)[0];
|
|
535
|
+
z.pattern = RegExp(z.pattern.source, V + "g");
|
|
536
536
|
}
|
|
537
|
-
for (var
|
|
538
|
-
var
|
|
537
|
+
for (var ge = z.pattern || z, H = o.next, G = i; H !== n.tail && !(d && G >= d.reach); G += H.value.length, H = H.next) {
|
|
538
|
+
var Y = H.value;
|
|
539
539
|
if (n.length > r.length) return;
|
|
540
|
-
if (!(
|
|
541
|
-
var
|
|
542
|
-
if (
|
|
543
|
-
if (!(
|
|
544
|
-
var
|
|
545
|
-
for (Q += H.value.length;
|
|
546
|
-
if (G = Q -= H.value.length, H.value instanceof
|
|
547
|
-
for (var
|
|
548
|
-
|
|
549
|
-
} else if (!(
|
|
550
|
-
|
|
551
|
-
var
|
|
552
|
-
|
|
553
|
-
var
|
|
554
|
-
if (
|
|
555
|
-
var
|
|
556
|
-
b(r, n, a, H.prev, G,
|
|
540
|
+
if (!(Y instanceof _)) {
|
|
541
|
+
var X, ie = 1;
|
|
542
|
+
if (ee) {
|
|
543
|
+
if (!(X = y(ge, G, r, J)) || X.index >= r.length) break;
|
|
544
|
+
var q = X.index, se = X.index + X[0].length, Q = G;
|
|
545
|
+
for (Q += H.value.length; q >= Q; ) Q += (H = H.next).value.length;
|
|
546
|
+
if (G = Q -= H.value.length, H.value instanceof _) continue;
|
|
547
|
+
for (var te = H; te !== n.tail && (Q < se || typeof te.value == "string"); te = te.next) ie++, Q += te.value.length;
|
|
548
|
+
ie--, Y = r.slice(G, Q), X.index -= G;
|
|
549
|
+
} else if (!(X = y(ge, 0, Y, J))) continue;
|
|
550
|
+
q = X.index;
|
|
551
|
+
var re = X[0], le = Y.slice(0, q), fe = Y.slice(q + re.length), ae = G + Y.length;
|
|
552
|
+
d && ae > d.reach && (d.reach = ae);
|
|
553
|
+
var ce = H.prev;
|
|
554
|
+
if (le && (ce = S(n, ce, le), G += le.length), L(n, ce, ie), H = S(n, ce, new _(p, ne ? s.tokenize(re, ne) : re, be, re)), fe && S(n, H, fe), ie > 1) {
|
|
555
|
+
var oe = { cause: p + "," + P, reach: ae };
|
|
556
|
+
b(r, n, a, H.prev, G, oe), d && oe.reach > d.reach && (d.reach = oe.reach);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function k() {
|
|
564
564
|
var r = { value: null, prev: null, next: null }, n = { value: null, prev: r, next: null };
|
|
565
565
|
r.next = n, this.head = r, this.tail = n, this.length = 0;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
568
|
-
var o = n.next,
|
|
569
|
-
return n.next =
|
|
567
|
+
function S(r, n, a) {
|
|
568
|
+
var o = n.next, i = { value: a, prev: n, next: o };
|
|
569
|
+
return n.next = i, o.prev = i, r.length++, i;
|
|
570
570
|
}
|
|
571
571
|
function L(r, n, a) {
|
|
572
|
-
for (var o = n.next,
|
|
573
|
-
n.next = o, o.prev = n, r.length -=
|
|
572
|
+
for (var o = n.next, i = 0; i < a && o !== r.tail; i++) o = o.next;
|
|
573
|
+
n.next = o, o.prev = n, r.length -= i;
|
|
574
574
|
}
|
|
575
|
-
if (c.Prism =
|
|
575
|
+
if (c.Prism = s, _.stringify = function r(n, a) {
|
|
576
576
|
if (typeof n == "string") return n;
|
|
577
577
|
if (Array.isArray(n)) {
|
|
578
578
|
var o = "";
|
|
579
|
-
return n.forEach(function(
|
|
580
|
-
o += r(
|
|
579
|
+
return n.forEach(function(P) {
|
|
580
|
+
o += r(P, a);
|
|
581
581
|
}), o;
|
|
582
582
|
}
|
|
583
|
-
var
|
|
584
|
-
|
|
585
|
-
var
|
|
586
|
-
for (var E in
|
|
587
|
-
return "<" +
|
|
588
|
-
}, !c.document) return c.addEventListener && (
|
|
589
|
-
var n = JSON.parse(r.data), a = n.language, o = n.code,
|
|
590
|
-
c.postMessage(
|
|
591
|
-
}, !1)),
|
|
592
|
-
var
|
|
593
|
-
function
|
|
594
|
-
|
|
583
|
+
var i = { type: n.type, content: r(n.content, a), tag: "span", classes: ["token", n.type], attributes: {}, language: a }, d = n.alias;
|
|
584
|
+
d && (Array.isArray(d) ? Array.prototype.push.apply(i.classes, d) : i.classes.push(d)), s.hooks.run("wrap", i);
|
|
585
|
+
var p = "";
|
|
586
|
+
for (var E in i.attributes) p += " " + E + '="' + (i.attributes[E] || "").replace(/"/g, """) + '"';
|
|
587
|
+
return "<" + i.tag + ' class="' + i.classes.join(" ") + '"' + p + ">" + i.content + "</" + i.tag + ">";
|
|
588
|
+
}, !c.document) return c.addEventListener && (s.disableWorkerMessageHandler || c.addEventListener("message", function(r) {
|
|
589
|
+
var n = JSON.parse(r.data), a = n.language, o = n.code, i = n.immediateClose;
|
|
590
|
+
c.postMessage(s.highlight(o, s.languages[a], a)), i && c.close();
|
|
591
|
+
}, !1)), s;
|
|
592
|
+
var v = s.util.currentScript();
|
|
593
|
+
function I() {
|
|
594
|
+
s.manual || s.highlightAll();
|
|
595
595
|
}
|
|
596
|
-
if (
|
|
597
|
-
var
|
|
598
|
-
|
|
596
|
+
if (v && (s.filename = v.src, v.hasAttribute("data-manual") && (s.manual = !0)), !s.manual) {
|
|
597
|
+
var C = document.readyState;
|
|
598
|
+
C === "loading" || C === "interactive" && v && v.defer ? document.addEventListener("DOMContentLoaded", I) : window.requestAnimationFrame ? window.requestAnimationFrame(I) : window.setTimeout(I, 16);
|
|
599
599
|
}
|
|
600
|
-
return
|
|
600
|
+
return s;
|
|
601
601
|
}(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
|
|
602
|
-
h.exports && (h.exports = t),
|
|
602
|
+
h.exports && (h.exports = t), Be !== void 0 && (Be.Prism = t), t.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(c) {
|
|
603
603
|
c.type === "entity" && (c.attributes.title = c.content.replace(/&/, "&"));
|
|
604
604
|
}), Object.defineProperty(t.languages.markup.tag, "addInlined", { value: function(c, u) {
|
|
605
605
|
var m = {};
|
|
606
606
|
m["language-" + u] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: t.languages[u] }, m.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
607
|
-
var
|
|
608
|
-
|
|
609
|
-
var
|
|
610
|
-
|
|
607
|
+
var w = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: m } };
|
|
608
|
+
w["language-" + u] = { pattern: /[\s\S]+/, inside: t.languages[u] };
|
|
609
|
+
var s = {};
|
|
610
|
+
s[c] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
611
611
|
return c;
|
|
612
|
-
}), "i"), lookbehind: !0, greedy: !0, inside:
|
|
612
|
+
}), "i"), lookbehind: !0, greedy: !0, inside: w }, t.languages.insertBefore("markup", "cdata", s);
|
|
613
613
|
} }), Object.defineProperty(t.languages.markup.tag, "addAttribute", { value: function(c, u) {
|
|
614
614
|
t.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + c + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [u, "language-" + u], inside: t.languages[u] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
615
615
|
} }), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, function(c) {
|
|
@@ -620,57 +620,57 @@ var l = Me.exports, Ye = { exports: {} };
|
|
|
620
620
|
}(t), t.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, t.languages.javascript = t.languages.extend("clike", { "class-name": [t.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), t.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, t.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: t.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: t.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: t.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: t.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: t.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), t.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: t.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), t.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), t.languages.markup && (t.languages.markup.tag.addInlined("script", "javascript"), t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), t.languages.js = t.languages.javascript, function() {
|
|
621
621
|
if (t !== void 0 && typeof document < "u") {
|
|
622
622
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
623
|
-
var c = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, u = "data-src-status", m = "loading",
|
|
623
|
+
var c = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, u = "data-src-status", m = "loading", w = "loaded", s = "pre[data-src]:not([" + u + '="' + w + '"]):not([' + u + '="' + m + '"])';
|
|
624
624
|
t.hooks.add("before-highlightall", function(y) {
|
|
625
|
-
y.selector += ", " +
|
|
625
|
+
y.selector += ", " + s;
|
|
626
626
|
}), t.hooks.add("before-sanity-check", function(y) {
|
|
627
627
|
var b = y.element;
|
|
628
|
-
if (b.matches(
|
|
628
|
+
if (b.matches(s)) {
|
|
629
629
|
y.code = "", b.setAttribute(u, m);
|
|
630
|
-
var
|
|
631
|
-
|
|
632
|
-
var
|
|
630
|
+
var k = b.appendChild(document.createElement("CODE"));
|
|
631
|
+
k.textContent = "Loading…";
|
|
632
|
+
var S = b.getAttribute("data-src"), L = y.language;
|
|
633
633
|
if (L === "none") {
|
|
634
|
-
var
|
|
635
|
-
L = c[
|
|
634
|
+
var v = (/\.(\w+)$/.exec(S) || [, "none"])[1];
|
|
635
|
+
L = c[v] || v;
|
|
636
636
|
}
|
|
637
|
-
t.util.setLanguage(
|
|
638
|
-
var
|
|
639
|
-
|
|
637
|
+
t.util.setLanguage(k, L), t.util.setLanguage(b, L);
|
|
638
|
+
var I = t.plugins.autoloader;
|
|
639
|
+
I && I.loadLanguages(L), function(C, r, n) {
|
|
640
640
|
var a = new XMLHttpRequest();
|
|
641
|
-
a.open("GET",
|
|
641
|
+
a.open("GET", C, !0), a.onreadystatechange = function() {
|
|
642
642
|
a.readyState == 4 && (a.status < 400 && a.responseText ? r(a.responseText) : a.status >= 400 ? n("✖ Error " + a.status + " while fetching file: " + a.statusText) : n("✖ Error: File does not exist or is empty"));
|
|
643
643
|
}, a.send(null);
|
|
644
|
-
}(
|
|
645
|
-
b.setAttribute(u,
|
|
646
|
-
var r = function(
|
|
647
|
-
var
|
|
648
|
-
if (
|
|
649
|
-
var
|
|
650
|
-
return E ?
|
|
644
|
+
}(S, function(C) {
|
|
645
|
+
b.setAttribute(u, w);
|
|
646
|
+
var r = function(i) {
|
|
647
|
+
var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(i || "");
|
|
648
|
+
if (d) {
|
|
649
|
+
var p = Number(d[1]), E = d[2], P = d[3];
|
|
650
|
+
return E ? P ? [p, Number(P)] : [p, void 0] : [p, p];
|
|
651
651
|
}
|
|
652
652
|
}(b.getAttribute("data-range"));
|
|
653
653
|
if (r) {
|
|
654
|
-
var n =
|
|
655
|
-
a < 0 && (a += n.length), a = Math.max(0, Math.min(a - 1, n.length)), o < 0 && (o += n.length), o = Math.max(0, Math.min(o, n.length)),
|
|
654
|
+
var n = C.split(/\r\n?|\n/g), a = r[0], o = r[1] == null ? n.length : r[1];
|
|
655
|
+
a < 0 && (a += n.length), a = Math.max(0, Math.min(a - 1, n.length)), o < 0 && (o += n.length), o = Math.max(0, Math.min(o, n.length)), C = n.slice(a, o).join(`
|
|
656
656
|
`), b.hasAttribute("data-start") || b.setAttribute("data-start", String(a + 1));
|
|
657
657
|
}
|
|
658
|
-
|
|
659
|
-
}, function(
|
|
660
|
-
b.setAttribute(u, "failed"),
|
|
658
|
+
k.textContent = C, t.highlightElement(k);
|
|
659
|
+
}, function(C) {
|
|
660
|
+
b.setAttribute(u, "failed"), k.textContent = C;
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
663
|
}), t.plugins.fileHighlight = { highlight: function(y) {
|
|
664
|
-
for (var b,
|
|
664
|
+
for (var b, k = (y || document).querySelectorAll(s), S = 0; b = k[S++]; ) t.highlightElement(b);
|
|
665
665
|
} };
|
|
666
|
-
var
|
|
666
|
+
var _ = !1;
|
|
667
667
|
t.fileHighlight = function() {
|
|
668
|
-
|
|
668
|
+
_ || (_ = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
671
|
}();
|
|
672
672
|
})(Ye);
|
|
673
|
-
const
|
|
673
|
+
const He = Ke(Ye.exports);
|
|
674
674
|
Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], function(h) {
|
|
675
675
|
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, c = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, u = { pattern: RegExp(/(^|[^\w.])/.source + c + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
|
|
676
676
|
h.languages.java = h.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [u, { pattern: RegExp(/(^|[^\w.])/.source + c + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: u.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + c + /[A-Z]\w*\b/.source), lookbehind: !0, inside: u.inside }], keyword: t, function: [h.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), h.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), h.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": u, keyword: t, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + c + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: u.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + c + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: u.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\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() {
|
|
@@ -686,32 +686,32 @@ Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/
|
|
|
686
686
|
}(Prism), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(h) {
|
|
687
687
|
var t = "\\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", c = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, u = { bash: c, environment: { pattern: RegExp("\\$" + t), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + t), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], 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})/ };
|
|
688
688
|
h.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + t), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: u }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: c } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: u }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: u.entity } }], environment: { pattern: RegExp("\\$?" + t), alias: "constant" }, variable: u.variable, function: { 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;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, c.inside = h.languages.bash;
|
|
689
|
-
for (var m = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"],
|
|
689
|
+
for (var m = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], w = u.variable[1].inside, s = 0; s < m.length; s++) w[m[s]] = h.languages.bash[m[s]];
|
|
690
690
|
h.languages.sh = h.languages.bash, h.languages.shell = h.languages.bash;
|
|
691
691
|
}(Prism), Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json;
|
|
692
|
-
window.Prism =
|
|
693
|
-
const Ve = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, qe = ({ value: h, language: t, theme: c = "dark", disabled: u = !1, onChange: m, onCodeChange:
|
|
694
|
-
const
|
|
692
|
+
window.Prism = He;
|
|
693
|
+
const Ve = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, qe = ({ value: h, language: t, theme: c = "dark", disabled: u = !1, onChange: m, onCodeChange: w }) => {
|
|
694
|
+
const s = je(null), _ = je(null), y = je(null), b = ke(() => Ve[t.toLowerCase()] || "javascript", [t]), k = c === "dark" ? "#1e1e1e" : "#fafafa", S = ke(() => {
|
|
695
695
|
try {
|
|
696
|
-
const
|
|
697
|
-
if (
|
|
696
|
+
const v = He.languages[b];
|
|
697
|
+
if (v) return He.highlight(h || "", v, b);
|
|
698
698
|
} catch {
|
|
699
699
|
}
|
|
700
|
-
return function(
|
|
701
|
-
const
|
|
702
|
-
return
|
|
700
|
+
return function(v) {
|
|
701
|
+
const I = document.createElement("div");
|
|
702
|
+
return I.textContent = v, I.innerHTML;
|
|
703
703
|
}(h || "");
|
|
704
|
-
}, [h, b]), L =
|
|
704
|
+
}, [h, b]), L = he((v) => {
|
|
705
705
|
y.current && clearTimeout(y.current), y.current = setTimeout(() => {
|
|
706
|
-
|
|
706
|
+
w == null || w(v);
|
|
707
707
|
}, 500);
|
|
708
|
-
}, [
|
|
709
|
-
return
|
|
708
|
+
}, [w]);
|
|
709
|
+
return we(() => () => {
|
|
710
710
|
y.current && clearTimeout(y.current);
|
|
711
|
-
}, []),
|
|
712
|
-
(function(
|
|
711
|
+
}, []), we(() => {
|
|
712
|
+
(function(v) {
|
|
713
713
|
if (typeof document > "u") return;
|
|
714
|
-
const
|
|
714
|
+
const I = "hep-cr-prism-styles", C = document.getElementById(I), r = v === "dark" ? `
|
|
715
715
|
/* 默认代码颜色 */
|
|
716
716
|
.hep-cr-editor .hep-cr-highlight code,
|
|
717
717
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -873,21 +873,21 @@ const Ve = { javascript: "javascript", js: "javascript", typescript: "typescript
|
|
|
873
873
|
color: #333 !important;
|
|
874
874
|
}
|
|
875
875
|
`;
|
|
876
|
-
|
|
876
|
+
C && C.remove();
|
|
877
877
|
const n = document.createElement("style");
|
|
878
|
-
n.id =
|
|
878
|
+
n.id = I, n.textContent = r, document.head.appendChild(n);
|
|
879
879
|
})(c);
|
|
880
|
-
}, [c]), l.jsxs("div", { className: `hep-cr-editor theme-${c}`, style: { background:
|
|
881
|
-
const
|
|
882
|
-
m == null || m(
|
|
880
|
+
}, [c]), l.jsxs("div", { className: `hep-cr-editor theme-${c}`, style: { background: k }, children: [l.jsx("pre", { ref: _, className: `hep-cr-highlight language-${b}`, "aria-hidden": "true", children: l.jsx("code", { dangerouslySetInnerHTML: { __html: S } }) }), l.jsx("textarea", { ref: s, className: "hep-cr-input", value: h, disabled: u, onChange: (v) => {
|
|
881
|
+
const I = v.target.value;
|
|
882
|
+
m == null || m(I), L(I);
|
|
883
883
|
}, onScroll: () => {
|
|
884
|
-
|
|
885
|
-
}, onKeyDown: (
|
|
886
|
-
if (
|
|
887
|
-
|
|
888
|
-
const
|
|
884
|
+
s.current && _.current && (_.current.scrollTop = s.current.scrollTop, _.current.scrollLeft = s.current.scrollLeft);
|
|
885
|
+
}, onKeyDown: (v) => {
|
|
886
|
+
if (v.key === "Tab") {
|
|
887
|
+
v.preventDefault();
|
|
888
|
+
const I = v.target, C = I.selectionStart, r = I.selectionEnd, n = h.substring(0, C) + " " + h.substring(r);
|
|
889
889
|
m == null || m(n), L(n), requestAnimationFrame(() => {
|
|
890
|
-
|
|
890
|
+
I.selectionStart = I.selectionEnd = C + 2;
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
}, spellCheck: !1, placeholder: "请输入代码..." })] });
|
|
@@ -956,19 +956,23 @@ if (typeof document < "u") {
|
|
|
956
956
|
`, document.head.appendChild(t);
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
|
-
var Je = Object.defineProperty,
|
|
960
|
-
let
|
|
959
|
+
var Je = Object.defineProperty, $e = (h, t, c) => ((u, m, w) => m in u ? Je(u, m, { enumerable: !0, configurable: !0, writable: !0, value: w }) : u[m] = w)(h, typeof t != "symbol" ? t + "" : t, c);
|
|
960
|
+
let Me = null;
|
|
961
961
|
class Qe {
|
|
962
962
|
constructor(t = {}) {
|
|
963
|
-
|
|
963
|
+
$e(this, "baseUrl"), $e(this, "timeout"), $e(this, "token"), this.baseUrl = t.pistonUrl || "/api/piston", this.timeout = t.timeout || 3e3, this.token = t.token;
|
|
964
|
+
}
|
|
965
|
+
authHeaders() {
|
|
966
|
+
const t = { "Content-Type": "application/json" };
|
|
967
|
+
return this.token && (t.authorization = `Bearer ${this.token}`, t["id-token"] = this.token), t;
|
|
964
968
|
}
|
|
965
969
|
async getRuntimes(t = !1) {
|
|
966
|
-
if (
|
|
970
|
+
if (Me && !t) return Me;
|
|
967
971
|
try {
|
|
968
|
-
const c = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers:
|
|
972
|
+
const c = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
|
|
969
973
|
if (!c.ok) throw new Error(`Failed to fetch runtimes: ${c.statusText}`);
|
|
970
974
|
const u = await c.json();
|
|
971
|
-
return
|
|
975
|
+
return Me = u, u;
|
|
972
976
|
} catch (c) {
|
|
973
977
|
throw c;
|
|
974
978
|
}
|
|
@@ -976,17 +980,17 @@ class Qe {
|
|
|
976
980
|
async execute(t, c, u = {}) {
|
|
977
981
|
const m = (await this.getRuntimes()).find((y) => {
|
|
978
982
|
var b;
|
|
979
|
-
return y.language.toLowerCase() === t.toLowerCase() || ((b = y.aliases) == null ? void 0 : b.some((
|
|
983
|
+
return y.language.toLowerCase() === t.toLowerCase() || ((b = y.aliases) == null ? void 0 : b.some((k) => k.toLowerCase() === t.toLowerCase()));
|
|
980
984
|
});
|
|
981
985
|
if (!m) throw new Error(`Language '${t}' is not supported`);
|
|
982
|
-
const
|
|
986
|
+
const w = this.getFileName(t), s = { language: m.language, version: u.version || m.version, files: [{ name: w, content: c }], stdin: u.stdin || "", args: u.args || [], run_timeout: u.runTimeout || this.timeout, compile_timeout: this.timeout }, _ = Date.now();
|
|
983
987
|
try {
|
|
984
|
-
const y = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers:
|
|
988
|
+
const y = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(s) });
|
|
985
989
|
if (!y.ok) throw new Error(`Execute failed: ${y.statusText}`);
|
|
986
|
-
const b = await y.json(),
|
|
987
|
-
return { success: b.run.code === 0, output:
|
|
990
|
+
const b = await y.json(), k = Date.now() - _, S = b.run.stdout || "", L = b.run.stderr || "";
|
|
991
|
+
return { success: b.run.code === 0, output: S, stderr: L, code: b.run.code, executionTime: k, compile: b.compile ? { stdout: b.compile.stdout || "", stderr: b.compile.stderr || "", code: b.compile.code } : void 0 };
|
|
988
992
|
} catch (y) {
|
|
989
|
-
return { success: !1, output: "", stderr: y instanceof Error ? y.message : "Unknown error", code: -1, executionTime: Date.now() -
|
|
993
|
+
return { success: !1, output: "", stderr: y instanceof Error ? y.message : "Unknown error", code: -1, executionTime: Date.now() - _ };
|
|
990
994
|
}
|
|
991
995
|
}
|
|
992
996
|
getFileName(t) {
|
|
@@ -1058,80 +1062,80 @@ h1 {
|
|
|
1058
1062
|
color: #333;
|
|
1059
1063
|
}`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
|
|
1060
1064
|
|
|
1061
|
-
This is a sample markdown document.` }, nn = ({ pistonUrl: h = "/api/piston",
|
|
1062
|
-
const [
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
}, [
|
|
1066
|
-
|
|
1067
|
-
}, [
|
|
1068
|
-
const
|
|
1069
|
-
if (!
|
|
1070
|
-
const
|
|
1071
|
-
const _e = parseInt(
|
|
1072
|
-
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (_e >> 16) +
|
|
1073
|
-
},
|
|
1074
|
-
const
|
|
1075
|
-
return (0.299 * (
|
|
1076
|
-
})(
|
|
1077
|
-
return { "--hep-cr-theme-color":
|
|
1078
|
-
}, [
|
|
1079
|
-
|
|
1065
|
+
This is a sample markdown document.` }, nn = ({ pistonUrl: h = "/api/piston", token: t = "", language: c = "javascript", code: u = "", theme: m = "light", themeColor: w = "", showLanguageSelector: s = !0, showEditor: _ = !0, editable: y = !0, executorLabel: b = "运行", onExecuteStart: k, onExecuteEnd: S, onLanguageChange: L, onLanguageUpdate: v, onCodeUpdate: I, onChange: C }) => {
|
|
1066
|
+
const [r, n] = K([]), [a, o] = K(!1), [i, d] = K(c || "javascript"), [p, E] = K(u), [P, z] = K(m), [ne, J] = K(""), [ee, be] = K(""), [V, ge] = K(!1), [H, G] = K(null), [Y, X] = K("stdout"), [ie, q] = K(null), [se, Q] = K(!0), [te, re] = K(60), [le, fe] = K(!1), [ae, ce] = K(!1);
|
|
1067
|
+
we(() => {
|
|
1068
|
+
c && c !== i && d(c);
|
|
1069
|
+
}, [c]), we(() => {
|
|
1070
|
+
u !== void 0 && u !== p && E(u);
|
|
1071
|
+
}, [u]);
|
|
1072
|
+
const oe = ke(() => new Qe({ pistonUrl: h, token: t }), [h, t]), Oe = ke(() => r.map((x) => ({ value: `${x.language}:${x.version}`, label: `${x.language.charAt(0).toUpperCase() + x.language.slice(1)} ${x.version}` })), [r]), ye = ke(() => i.includes(":") ? i.split(":")[0] : i, [i]), Pe = ke(() => {
|
|
1073
|
+
if (!w) return {};
|
|
1074
|
+
const x = m === "dark", Z = (ue, ve) => {
|
|
1075
|
+
const _e = parseInt(ue.replace("#", ""), 16), e = Math.round(2.55 * ve);
|
|
1076
|
+
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (_e >> 16) + e)) + 256 * Math.min(255, Math.max(0, (_e >> 8 & 255) + e)) + Math.min(255, Math.max(0, (255 & _e) + e))).toString(16).slice(1);
|
|
1077
|
+
}, pe = ((ue) => {
|
|
1078
|
+
const ve = parseInt(ue.replace("#", ""), 16);
|
|
1079
|
+
return (0.299 * (ve >> 16 & 255) + 0.587 * (ve >> 8 & 255) + 0.114 * (255 & ve)) / 255 > 0.5;
|
|
1080
|
+
})(w) ? "#000" : "#fff";
|
|
1081
|
+
return { "--hep-cr-theme-color": w, "--hep-cr-theme-color-hover": Z(w, x ? 20 : -20), "--hep-cr-tab-active-color": pe };
|
|
1082
|
+
}, [w, m]);
|
|
1083
|
+
we(() => {
|
|
1080
1084
|
(async function() {
|
|
1081
|
-
|
|
1085
|
+
Q(!0), q(null);
|
|
1082
1086
|
try {
|
|
1083
|
-
const
|
|
1084
|
-
|
|
1085
|
-
} catch (
|
|
1086
|
-
|
|
1087
|
+
const x = await oe.getRuntimes();
|
|
1088
|
+
n(x);
|
|
1089
|
+
} catch (x) {
|
|
1090
|
+
q(x instanceof Error ? x.message : "Failed to load runtimes");
|
|
1087
1091
|
} finally {
|
|
1088
|
-
|
|
1092
|
+
Q(!1);
|
|
1089
1093
|
}
|
|
1090
1094
|
})();
|
|
1091
|
-
}, [
|
|
1092
|
-
const
|
|
1093
|
-
const
|
|
1094
|
-
|
|
1095
|
-
const
|
|
1096
|
-
return en[
|
|
1095
|
+
}, [oe]);
|
|
1096
|
+
const De = he((x) => {
|
|
1097
|
+
const Z = x.target.value;
|
|
1098
|
+
d(Z), a || E(function(pe) {
|
|
1099
|
+
const ue = pe.toLowerCase().split(":")[0];
|
|
1100
|
+
return en[ue] || `// ${pe}
|
|
1097
1101
|
// Write your code here`;
|
|
1098
|
-
}(
|
|
1099
|
-
}, [
|
|
1100
|
-
|
|
1101
|
-
}, [
|
|
1102
|
-
if (!
|
|
1103
|
-
|
|
1102
|
+
}(Z)), o(!1), v == null || v(Z), L == null || L(Z.includes(":") ? Z.split(":")[0] : Z, p);
|
|
1103
|
+
}, [a, p, v, L]), Se = he((x) => {
|
|
1104
|
+
o(!0), E(x), I == null || I(x), C == null || C(x);
|
|
1105
|
+
}, [I, C]), Ae = he(async () => {
|
|
1106
|
+
if (!V) {
|
|
1107
|
+
ge(!0), J(""), be(""), G(null), q(null), X("stdout"), k == null || k();
|
|
1104
1108
|
try {
|
|
1105
|
-
const
|
|
1106
|
-
|
|
1107
|
-
} catch (
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1109
|
+
const x = await oe.execute(ye, p);
|
|
1110
|
+
J(x.output), be(x.stderr), G(x.executionTime || null), X(x.stderr ? "stderr" : "stdout"), S == null || S(x);
|
|
1111
|
+
} catch (x) {
|
|
1112
|
+
const Z = x instanceof Error ? x.message : "Execution failed";
|
|
1113
|
+
q(Z), S == null || S({ success: !1, output: "", stderr: Z, code: -1 });
|
|
1110
1114
|
} finally {
|
|
1111
|
-
|
|
1115
|
+
ge(!1);
|
|
1112
1116
|
}
|
|
1113
1117
|
}
|
|
1114
|
-
}, [
|
|
1115
|
-
await navigator.clipboard.writeText(p),
|
|
1116
|
-
|
|
1118
|
+
}, [V, ye, p, oe, k, S]), Fe = he(async () => {
|
|
1119
|
+
await navigator.clipboard.writeText(p), fe(!0), setTimeout(() => {
|
|
1120
|
+
fe(!1);
|
|
1117
1121
|
}, 2e3);
|
|
1118
|
-
}, [p]),
|
|
1119
|
-
const
|
|
1120
|
-
await navigator.clipboard.writeText(
|
|
1121
|
-
|
|
1122
|
+
}, [p]), me = he(async () => {
|
|
1123
|
+
const x = Y === "stdout" ? ne : ee;
|
|
1124
|
+
await navigator.clipboard.writeText(x), ce(!0), setTimeout(() => {
|
|
1125
|
+
ce(!1);
|
|
1122
1126
|
}, 2e3);
|
|
1123
|
-
}, [
|
|
1124
|
-
|
|
1125
|
-
}, []),
|
|
1126
|
-
if (!
|
|
1127
|
-
const
|
|
1128
|
-
if (!
|
|
1129
|
-
const
|
|
1130
|
-
|
|
1131
|
-
}, []), Te =
|
|
1132
|
-
|
|
1133
|
-
}, [
|
|
1134
|
-
return l.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${
|
|
1127
|
+
}, [Y, ne, ee]), Ee = je(!1), Ie = he((x) => {
|
|
1128
|
+
Ee.current = !0, document.addEventListener("mousemove", xe), document.addEventListener("mouseup", Te), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1129
|
+
}, []), xe = he((x) => {
|
|
1130
|
+
if (!Ee.current) return;
|
|
1131
|
+
const Z = document.querySelector(".hep-cr-main");
|
|
1132
|
+
if (!Z) return;
|
|
1133
|
+
const pe = Z.getBoundingClientRect(), ue = (x.clientX - pe.left) / pe.width * 100;
|
|
1134
|
+
re(Math.max(20, Math.min(80, ue)));
|
|
1135
|
+
}, []), Te = he(() => {
|
|
1136
|
+
Ee.current = !1, document.removeEventListener("mousemove", xe), document.removeEventListener("mouseup", Te), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
1137
|
+
}, [xe]);
|
|
1138
|
+
return l.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${P}`, style: Pe, children: [l.jsxs("div", { className: "hep-cr-header", children: [l.jsx("div", { className: "hep-cr-controls", children: s && l.jsx(l.Fragment, { children: l.jsxs("select", { value: i, onChange: De, className: "hep-cr-language-select", disabled: V, children: [se && l.jsx("option", { value: "", children: "加载中..." }), Oe.map((x) => l.jsx("option", { value: x.value, children: x.label }, x.value))] }) }) }), l.jsxs("div", { className: "hep-cr-actions", children: [l.jsxs("button", { className: "hep-cr-btn hep-cr-btn-run", disabled: V || se, onClick: Ae, children: [V ? l.jsx("span", { className: "hep-cr-spinner" }) : l.jsx("span", { className: "hep-cr-run-icon", children: "▶" }), V ? "运行中..." : b] }), l.jsx("button", { className: "hep-cr-btn hep-cr-btn-theme", onClick: () => z(P === "light" ? "dark" : "light"), title: P === "light" ? "Switch to dark mode" : "Switch to light mode", children: P === "light" ? l.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: l.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : l.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [l.jsx("circle", { cx: "12", cy: "12", r: "5" }), l.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), l.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), l.jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), l.jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), l.jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), l.jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), l.jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), l.jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] }) })] })] }), ie && l.jsx("div", { className: "hep-cr-error-message", children: ie }), l.jsxs("div", { className: "hep-cr-main", children: [_ && l.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${te}%` }, children: [l.jsxs("div", { className: "hep-cr-panel-header", children: [l.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }), l.jsxs("div", { className: "hep-cr-output-actions", children: [l.jsx("span", { className: "hep-cr-language-badge", children: ye }), l.jsx("button", { className: "hep-cr-btn-icon " + (le ? "hep-cr-btn-copied" : ""), disabled: le, onClick: Fe, title: le ? "已复制" : "复制", children: le ? l.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : l.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [l.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), l.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] })] }), l.jsx(qe, { value: p, language: ye, theme: P, disabled: !y || V, onChange: Se, onCodeChange: C })] }), _ && l.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: Ie, children: l.jsx("div", { className: "hep-cr-resize-line" }) }), l.jsxs("div", { className: "hep-cr-output-panel", style: { width: _ ? 100 - te + "%" : "100%" }, children: [l.jsxs("div", { className: "hep-cr-panel-header", children: [l.jsxs("div", { className: "hep-cr-output-tabs", children: [l.jsx("button", { className: "hep-cr-tab " + (Y === "stdout" ? "active" : ""), onClick: () => X("stdout"), children: "输出" }), ee && l.jsx("button", { className: "hep-cr-tab hep-cr-tab-error " + (Y === "stderr" ? "active" : ""), onClick: () => X("stderr"), children: "错误" })] }), l.jsxs("div", { className: "hep-cr-output-actions", children: [H !== null && l.jsxs("span", { className: "hep-cr-execution-time", children: [H, "ms"] }), l.jsx("button", { className: "hep-cr-btn-icon " + (ae ? "hep-cr-btn-copied" : ""), disabled: ae, onClick: me, title: ae ? "已复制" : "复制", children: ae ? l.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : l.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [l.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), l.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }) })] })] }), l.jsx("div", { className: "hep-cr-output-content", children: l.jsx("pre", { children: Y === "stdout" ? V ? "代码执行中..." : ne || '点击"运行"执行代码' : ee }) })] })] }), l.jsx("style", { children: `
|
|
1135
1139
|
.hep-cr-runner {
|
|
1136
1140
|
display: flex;
|
|
1137
1141
|
flex-direction: column;
|
|
@@ -1358,19 +1362,19 @@ This is a sample markdown document.` }, nn = ({ pistonUrl: h = "/api/piston", la
|
|
|
1358
1362
|
}
|
|
1359
1363
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
1360
1364
|
` })] });
|
|
1361
|
-
}, tn = Xe(({ open: h, defaultOpen: t = !1, title: c = "代码执行器", width: u = 800, onClose: m, footer:
|
|
1362
|
-
const [b,
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
}, [h,
|
|
1366
|
-
const
|
|
1367
|
-
|
|
1368
|
-
}, [
|
|
1369
|
-
Ze(y, () => ({ close:
|
|
1370
|
-
const
|
|
1371
|
-
return L ? l.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: (
|
|
1372
|
-
|
|
1373
|
-
}, children: [l.jsxs("div", { className: "hep-cr-dialog-container", style: { width:
|
|
1365
|
+
}, tn = Xe(({ open: h, defaultOpen: t = !1, title: c = "代码执行器", width: u = 800, onClose: m, footer: w, theme: s = "light", ..._ }, y) => {
|
|
1366
|
+
const [b, k] = K(t), S = h !== void 0, L = S ? h : b;
|
|
1367
|
+
we(() => {
|
|
1368
|
+
S && h !== b && k(h);
|
|
1369
|
+
}, [h, S]);
|
|
1370
|
+
const v = he(() => {
|
|
1371
|
+
S || k(!1), m == null || m();
|
|
1372
|
+
}, [S, m]);
|
|
1373
|
+
Ze(y, () => ({ close: v }));
|
|
1374
|
+
const I = typeof u == "number" ? `${u}px` : u;
|
|
1375
|
+
return L ? l.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: (C) => {
|
|
1376
|
+
C.target === C.currentTarget && v();
|
|
1377
|
+
}, children: [l.jsxs("div", { className: "hep-cr-dialog-container", style: { width: I }, children: [l.jsxs("div", { className: "hep-cr-dialog-header", children: [l.jsx("h3", { className: "hep-cr-dialog-title", children: c }), l.jsx("button", { className: "hep-cr-dialog-close", onClick: v, children: l.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [l.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), l.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }) })] }), l.jsx("div", { className: "hep-cr-dialog-body", children: l.jsx(nn, { theme: s, ..._ }) }), w && l.jsx("div", { className: "hep-cr-dialog-footer", children: w })] }), l.jsx("style", { children: `
|
|
1374
1378
|
.hep-cr-dialog-overlay {
|
|
1375
1379
|
position: fixed;
|
|
1376
1380
|
top: 0;
|