@hep-code-runner/react 3.1.1 → 3.1.3

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.
Files changed (3) hide show
  1. package/dist/index.js +30 -18
  2. package/dist/index.mjs +654 -628
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import tr, { useRef as Pe, useMemo as Ae, useCallback as te, useEffect as Ne, useState as X, forwardRef as xr, useImperativeHandle as kr } from "react";
2
- var Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1
+ import ir, { useRef as Le, useMemo as _e, useCallback as ue, useEffect as ye, useState as Y, forwardRef as xr, useImperativeHandle as kr } from "react";
2
+ var rr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
3
  function wr(p) {
4
4
  return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
5
5
  }
6
- var Be = { exports: {} }, Ie = {};
6
+ var Ye = { exports: {} }, Oe = {};
7
7
  /**
8
8
  * @license React
9
9
  * react-jsx-runtime.production.min.js
@@ -13,21 +13,21 @@ var Be = { exports: {} }, Ie = {};
13
13
  * This source code is licensed under the MIT license found in the
14
14
  * LICENSE file in the root directory of this source tree.
15
15
  */
16
- var Qe;
16
+ var tr;
17
17
  function Sr() {
18
- if (Qe) return Ie;
19
- Qe = 1;
20
- var p = tr, h = Symbol.for("react.element"), n = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, b = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, A = { key: !0, ref: !0, __self: !0, __source: !0 };
21
- function R(s, m, k) {
22
- var S, I = {}, L = null, U = null;
23
- k !== void 0 && (L = "" + k), m.key !== void 0 && (L = "" + m.key), m.ref !== void 0 && (U = m.ref);
24
- for (S in m) u.call(m, S) && !A.hasOwnProperty(S) && (I[S] = m[S]);
25
- if (s && s.defaultProps) for (S in m = s.defaultProps, m) I[S] === void 0 && (I[S] = m[S]);
26
- return { $$typeof: h, type: s, key: L, ref: U, props: I, _owner: b.current };
18
+ if (tr) return Oe;
19
+ tr = 1;
20
+ var p = ir, h = Symbol.for("react.element"), n = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, v = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, A = { key: !0, ref: !0, __self: !0, __source: !0 };
21
+ function R(s, m, x) {
22
+ var w, F = {}, L = null, B = null;
23
+ x !== void 0 && (L = "" + x), m.key !== void 0 && (L = "" + m.key), m.ref !== void 0 && (B = m.ref);
24
+ for (w in m) u.call(m, w) && !A.hasOwnProperty(w) && (F[w] = m[w]);
25
+ if (s && s.defaultProps) for (w in m = s.defaultProps, m) F[w] === void 0 && (F[w] = m[w]);
26
+ return { $$typeof: h, type: s, key: L, ref: B, props: F, _owner: v.current };
27
27
  }
28
- return Ie.Fragment = n, Ie.jsx = R, Ie.jsxs = R, Ie;
28
+ return Oe.Fragment = n, Oe.jsx = R, Oe.jsxs = R, Oe;
29
29
  }
30
- var Oe = {};
30
+ var Ne = {};
31
31
  /**
32
32
  * @license React
33
33
  * react-jsx-runtime.development.js
@@ -37,54 +37,54 @@ var Oe = {};
37
37
  * This source code is licensed under the MIT license found in the
38
38
  * LICENSE file in the root directory of this source tree.
39
39
  */
40
- var er;
40
+ var nr;
41
41
  function Ar() {
42
- return er || (er = 1, process.env.NODE_ENV !== "production" && function() {
43
- var p = tr, h = Symbol.for("react.element"), n = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), s = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), U = Symbol.for("react.offscreen"), Z = Symbol.iterator, _ = "@@iterator";
44
- function E(e) {
42
+ return nr || (nr = 1, process.env.NODE_ENV !== "production" && function() {
43
+ var p = ir, h = Symbol.for("react.element"), n = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), s = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), B = Symbol.for("react.offscreen"), Z = Symbol.iterator, C = "@@iterator";
44
+ function b(e) {
45
45
  if (e === null || typeof e != "object")
46
46
  return null;
47
- var a = Z && e[Z] || e[_];
47
+ var a = Z && e[Z] || e[C];
48
48
  return typeof a == "function" ? a : null;
49
49
  }
50
- var y = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
50
+ var S = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
51
  function r(e) {
52
52
  {
53
- for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
54
- d[v - 1] = arguments[v];
53
+ for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), E = 1; E < a; E++)
54
+ d[E - 1] = arguments[E];
55
55
  t("error", e, d);
56
56
  }
57
57
  }
58
58
  function t(e, a, d) {
59
59
  {
60
- var v = y.ReactDebugCurrentFrame, O = v.getStackAddendum();
61
- O !== "" && (a += "%s", d = d.concat([O]));
62
- var C = d.map(function(T) {
60
+ var E = S.ReactDebugCurrentFrame, I = E.getStackAddendum();
61
+ I !== "" && (a += "%s", d = d.concat([I]));
62
+ var N = d.map(function(T) {
63
63
  return String(T);
64
64
  });
65
- C.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, C);
65
+ N.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, N);
66
66
  }
67
67
  }
68
- var i = !1, o = !1, l = !1, g = !1, x = !1, f;
69
- f = Symbol.for("react.module.reference");
70
- function N(e) {
71
- return !!(typeof e == "string" || typeof e == "function" || e === u || e === A || x || e === b || e === k || e === S || g || e === U || i || o || l || typeof e == "object" && e !== null && (e.$$typeof === L || e.$$typeof === I || e.$$typeof === R || e.$$typeof === s || e.$$typeof === m || // This needs to include all possible module reference object
68
+ var i = !1, l = !1, o = !1, f = !1, y = !1, g;
69
+ g = Symbol.for("react.module.reference");
70
+ function O(e) {
71
+ return !!(typeof e == "string" || typeof e == "function" || e === u || e === A || y || e === v || e === x || e === w || f || e === B || i || l || o || typeof e == "object" && e !== null && (e.$$typeof === L || e.$$typeof === F || e.$$typeof === R || e.$$typeof === s || e.$$typeof === m || // This needs to include all possible module reference object
72
72
  // types supported by any Flight configuration anywhere since
73
73
  // we don't know which Flight build this will end up being used
74
74
  // with.
75
- e.$$typeof === f || e.getModuleId !== void 0));
75
+ e.$$typeof === g || e.getModuleId !== void 0));
76
76
  }
77
- function j(e, a, d) {
78
- var v = e.displayName;
79
- if (v)
80
- return v;
81
- var O = a.displayName || a.name || "";
82
- return O !== "" ? d + "(" + O + ")" : d;
77
+ function D(e, a, d) {
78
+ var E = e.displayName;
79
+ if (E)
80
+ return E;
81
+ var I = a.displayName || a.name || "";
82
+ return I !== "" ? d + "(" + I + ")" : d;
83
83
  }
84
- function W(e) {
84
+ function j(e) {
85
85
  return e.displayName || "Context";
86
86
  }
87
- function H(e) {
87
+ function V(e) {
88
88
  if (e == null)
89
89
  return null;
90
90
  if (typeof e.tag == "number" && r("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -98,30 +98,30 @@ function Ar() {
98
98
  return "Portal";
99
99
  case A:
100
100
  return "Profiler";
101
- case b:
101
+ case v:
102
102
  return "StrictMode";
103
- case k:
103
+ case x:
104
104
  return "Suspense";
105
- case S:
105
+ case w:
106
106
  return "SuspenseList";
107
107
  }
108
108
  if (typeof e == "object")
109
109
  switch (e.$$typeof) {
110
110
  case s:
111
111
  var a = e;
112
- return W(a) + ".Consumer";
112
+ return j(a) + ".Consumer";
113
113
  case R:
114
114
  var d = e;
115
- return W(d._context) + ".Provider";
115
+ return j(d._context) + ".Provider";
116
116
  case m:
117
- return j(e, e.render, "ForwardRef");
118
- case I:
119
- var v = e.displayName || null;
120
- return v !== null ? v : H(e.type) || "Memo";
117
+ return D(e, e.render, "ForwardRef");
118
+ case F:
119
+ var E = e.displayName || null;
120
+ return E !== null ? E : V(e.type) || "Memo";
121
121
  case L: {
122
- var O = e, C = O._payload, T = O._init;
122
+ var I = e, N = I._payload, T = I._init;
123
123
  try {
124
- return H(T(C));
124
+ return V(T(N));
125
125
  } catch {
126
126
  return null;
127
127
  }
@@ -129,18 +129,18 @@ function Ar() {
129
129
  }
130
130
  return null;
131
131
  }
132
- var G = Object.assign, ne = 0, ae, ue, D, z, re, J, B;
133
- function le() {
132
+ var q = Object.assign, ae = 0, ie, oe, P, H, X, se, z;
133
+ function xe() {
134
134
  }
135
- le.__reactDisabledLog = !0;
136
- function q() {
135
+ xe.__reactDisabledLog = !0;
136
+ function W() {
137
137
  {
138
- if (ne === 0) {
139
- ae = console.log, ue = console.info, D = console.warn, z = console.error, re = console.group, J = console.groupCollapsed, B = console.groupEnd;
138
+ if (ae === 0) {
139
+ ie = console.log, oe = console.info, P = console.warn, H = console.error, X = console.group, se = console.groupCollapsed, z = console.groupEnd;
140
140
  var e = {
141
141
  configurable: !0,
142
142
  enumerable: !0,
143
- value: le,
143
+ value: xe,
144
144
  writable: !0
145
145
  };
146
146
  Object.defineProperties(console, {
@@ -153,77 +153,77 @@ function Ar() {
153
153
  groupEnd: e
154
154
  });
155
155
  }
156
- ne++;
156
+ ae++;
157
157
  }
158
158
  }
159
- function Q() {
159
+ function le() {
160
160
  {
161
- if (ne--, ne === 0) {
161
+ if (ae--, ae === 0) {
162
162
  var e = {
163
163
  configurable: !0,
164
164
  enumerable: !0,
165
165
  writable: !0
166
166
  };
167
167
  Object.defineProperties(console, {
168
- log: G({}, e, {
169
- value: ae
168
+ log: q({}, e, {
169
+ value: ie
170
170
  }),
171
- info: G({}, e, {
172
- value: ue
171
+ info: q({}, e, {
172
+ value: oe
173
173
  }),
174
- warn: G({}, e, {
175
- value: D
174
+ warn: q({}, e, {
175
+ value: P
176
176
  }),
177
- error: G({}, e, {
178
- value: z
177
+ error: q({}, e, {
178
+ value: H
179
179
  }),
180
- group: G({}, e, {
181
- value: re
180
+ group: q({}, e, {
181
+ value: X
182
182
  }),
183
- groupCollapsed: G({}, e, {
184
- value: J
183
+ groupCollapsed: q({}, e, {
184
+ value: se
185
185
  }),
186
- groupEnd: G({}, e, {
187
- value: B
186
+ groupEnd: q({}, e, {
187
+ value: z
188
188
  })
189
189
  });
190
190
  }
191
- ne < 0 && r("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
+ ae < 0 && r("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
192
  }
193
193
  }
194
- var ie = y.ReactCurrentDispatcher, oe;
195
- function Y(e, a, d) {
194
+ var J = S.ReactCurrentDispatcher, re;
195
+ function te(e, a, d) {
196
196
  {
197
- if (oe === void 0)
197
+ if (re === void 0)
198
198
  try {
199
199
  throw Error();
200
- } catch (O) {
201
- var v = O.stack.trim().match(/\n( *(at )?)/);
202
- oe = v && v[1] || "";
200
+ } catch (I) {
201
+ var E = I.stack.trim().match(/\n( *(at )?)/);
202
+ re = E && E[1] || "";
203
203
  }
204
204
  return `
205
- ` + oe + e;
205
+ ` + re + e;
206
206
  }
207
207
  }
208
- var de = !1, se;
208
+ var ne = !1, ce;
209
209
  {
210
- var pe = typeof WeakMap == "function" ? WeakMap : Map;
211
- se = new pe();
210
+ var de = typeof WeakMap == "function" ? WeakMap : Map;
211
+ ce = new de();
212
212
  }
213
- function ye(e, a) {
214
- if (!e || de)
213
+ function Q(e, a) {
214
+ if (!e || ne)
215
215
  return "";
216
216
  {
217
- var d = se.get(e);
217
+ var d = ce.get(e);
218
218
  if (d !== void 0)
219
219
  return d;
220
220
  }
221
- var v;
222
- de = !0;
223
- var O = Error.prepareStackTrace;
221
+ var E;
222
+ ne = !0;
223
+ var I = Error.prepareStackTrace;
224
224
  Error.prepareStackTrace = void 0;
225
- var C;
226
- C = ie.current, ie.current = null, q();
225
+ var N;
226
+ N = J.current, J.current = null, W();
227
227
  try {
228
228
  if (a) {
229
229
  var T = function() {
@@ -237,14 +237,14 @@ function Ar() {
237
237
  try {
238
238
  Reflect.construct(T, []);
239
239
  } catch (K) {
240
- v = K;
240
+ E = K;
241
241
  }
242
242
  Reflect.construct(e, [], T);
243
243
  } else {
244
244
  try {
245
245
  T.call();
246
246
  } catch (K) {
247
- v = K;
247
+ E = K;
248
248
  }
249
249
  e.call(T.prototype);
250
250
  }
@@ -252,151 +252,151 @@ function Ar() {
252
252
  try {
253
253
  throw Error();
254
254
  } catch (K) {
255
- v = K;
255
+ E = K;
256
256
  }
257
257
  e();
258
258
  }
259
259
  } catch (K) {
260
- if (K && v && typeof K.stack == "string") {
261
- for (var w = K.stack.split(`
262
- `), V = v.stack.split(`
263
- `), $ = w.length - 1, M = V.length - 1; $ >= 1 && M >= 0 && w[$] !== V[M]; )
264
- M--;
265
- for (; $ >= 1 && M >= 0; $--, M--)
266
- if (w[$] !== V[M]) {
267
- if ($ !== 1 || M !== 1)
260
+ if (K && E && typeof K.stack == "string") {
261
+ for (var k = K.stack.split(`
262
+ `), G = E.stack.split(`
263
+ `), $ = k.length - 1, U = G.length - 1; $ >= 1 && U >= 0 && k[$] !== G[U]; )
264
+ U--;
265
+ for (; $ >= 1 && U >= 0; $--, U--)
266
+ if (k[$] !== G[U]) {
267
+ if ($ !== 1 || U !== 1)
268
268
  do
269
- if ($--, M--, M < 0 || w[$] !== V[M]) {
269
+ if ($--, U--, U < 0 || k[$] !== G[U]) {
270
270
  var ee = `
271
- ` + w[$].replace(" at new ", " at ");
272
- return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, ee), ee;
271
+ ` + k[$].replace(" at new ", " at ");
272
+ return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" && ce.set(e, ee), ee;
273
273
  }
274
- while ($ >= 1 && M >= 0);
274
+ while ($ >= 1 && U >= 0);
275
275
  break;
276
276
  }
277
277
  }
278
278
  } finally {
279
- de = !1, ie.current = C, Q(), Error.prepareStackTrace = O;
279
+ ne = !1, J.current = N, le(), Error.prepareStackTrace = I;
280
280
  }
281
- var Se = e ? e.displayName || e.name : "", Ee = Se ? Y(Se) : "";
282
- return typeof e == "function" && se.set(e, Ee), Ee;
281
+ var Re = e ? e.displayName || e.name : "", Ee = Re ? te(Re) : "";
282
+ return typeof e == "function" && ce.set(e, Ee), Ee;
283
283
  }
284
284
  function me(e, a, d) {
285
- return ye(e, !1);
285
+ return Q(e, !1);
286
286
  }
287
- function Te(e) {
287
+ function $e(e) {
288
288
  var a = e.prototype;
289
289
  return !!(a && a.isReactComponent);
290
290
  }
291
- function xe(e, a, d) {
291
+ function ke(e, a, d) {
292
292
  if (e == null)
293
293
  return "";
294
294
  if (typeof e == "function")
295
- return ye(e, Te(e));
295
+ return Q(e, $e(e));
296
296
  if (typeof e == "string")
297
- return Y(e);
297
+ return te(e);
298
298
  switch (e) {
299
- case k:
300
- return Y("Suspense");
301
- case S:
302
- return Y("SuspenseList");
299
+ case x:
300
+ return te("Suspense");
301
+ case w:
302
+ return te("SuspenseList");
303
303
  }
304
304
  if (typeof e == "object")
305
305
  switch (e.$$typeof) {
306
306
  case m:
307
307
  return me(e.render);
308
- case I:
309
- return xe(e.type, a, d);
308
+ case F:
309
+ return ke(e.type, a, d);
310
310
  case L: {
311
- var v = e, O = v._payload, C = v._init;
311
+ var E = e, I = E._payload, N = E._init;
312
312
  try {
313
- return xe(C(O), a, d);
313
+ return ke(N(I), a, d);
314
314
  } catch {
315
315
  }
316
316
  }
317
317
  }
318
318
  return "";
319
319
  }
320
- var ce = Object.prototype.hasOwnProperty, Re = {}, F = y.ReactDebugCurrentFrame;
321
- function P(e) {
320
+ var be = Object.prototype.hasOwnProperty, Ce = {}, we = S.ReactDebugCurrentFrame;
321
+ function Se(e) {
322
322
  if (e) {
323
- var a = e._owner, d = xe(e.type, e._source, a ? a.type : null);
324
- F.setExtraStackFrame(d);
323
+ var a = e._owner, d = ke(e.type, e._source, a ? a.type : null);
324
+ we.setExtraStackFrame(d);
325
325
  } else
326
- F.setExtraStackFrame(null);
326
+ we.setExtraStackFrame(null);
327
327
  }
328
- function he(e, a, d, v, O) {
328
+ function Fe(e, a, d, E, I) {
329
329
  {
330
- var C = Function.call.bind(ce);
330
+ var N = Function.call.bind(be);
331
331
  for (var T in e)
332
- if (C(e, T)) {
333
- var w = void 0;
332
+ if (N(e, T)) {
333
+ var k = void 0;
334
334
  try {
335
335
  if (typeof e[T] != "function") {
336
- var V = Error((v || "React class") + ": " + d + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
- throw V.name = "Invariant Violation", V;
336
+ var G = Error((E || "React class") + ": " + d + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
337
+ throw G.name = "Invariant Violation", G;
338
338
  }
339
- w = e[T](a, T, v, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
+ k = e[T](a, T, E, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
340
  } catch ($) {
341
- w = $;
341
+ k = $;
342
342
  }
343
- w && !(w instanceof Error) && (P(O), r("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", d, T, typeof w), P(null)), w instanceof Error && !(w.message in Re) && (Re[w.message] = !0, P(O), r("Failed %s type: %s", d, w.message), P(null));
343
+ k && !(k instanceof Error) && (Se(I), r("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", E || "React class", d, T, typeof k), Se(null)), k instanceof Error && !(k.message in Ce) && (Ce[k.message] = !0, Se(I), r("Failed %s type: %s", d, k.message), Se(null));
344
344
  }
345
345
  }
346
346
  }
347
- var be = Array.isArray;
348
- function _e(e) {
349
- return be(e);
347
+ var Pe = Array.isArray;
348
+ function _(e) {
349
+ return Pe(e);
350
350
  }
351
- function Fe(e) {
351
+ function M(e) {
352
352
  {
353
353
  var a = typeof Symbol == "function" && Symbol.toStringTag, d = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
354
  return d;
355
355
  }
356
356
  }
357
- function ve(e) {
357
+ function pe(e) {
358
358
  try {
359
- return fe(e), !1;
359
+ return he(e), !1;
360
360
  } catch {
361
361
  return !0;
362
362
  }
363
363
  }
364
- function fe(e) {
364
+ function he(e) {
365
365
  return "" + e;
366
366
  }
367
- function ge(e) {
368
- if (ve(e))
369
- return r("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Fe(e)), fe(e);
367
+ function De(e) {
368
+ if (pe(e))
369
+ return r("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", M(e)), he(e);
370
370
  }
371
- var ke = y.ReactCurrentOwner, Ce = {
371
+ var Ae = S.ReactCurrentOwner, ve = {
372
372
  key: !0,
373
373
  ref: !0,
374
374
  __self: !0,
375
375
  __source: !0
376
- }, Le, We;
377
- function ar(e) {
378
- if (ce.call(e, "ref")) {
376
+ }, fe, ge;
377
+ function Ie(e) {
378
+ if (be.call(e, "ref")) {
379
379
  var a = Object.getOwnPropertyDescriptor(e, "ref").get;
380
380
  if (a && a.isReactWarning)
381
381
  return !1;
382
382
  }
383
383
  return e.ref !== void 0;
384
384
  }
385
- function ir(e) {
386
- if (ce.call(e, "key")) {
385
+ function je(e) {
386
+ if (be.call(e, "key")) {
387
387
  var a = Object.getOwnPropertyDescriptor(e, "key").get;
388
388
  if (a && a.isReactWarning)
389
389
  return !1;
390
390
  }
391
391
  return e.key !== void 0;
392
392
  }
393
- function or(e, a) {
394
- typeof e.ref == "string" && ke.current;
393
+ function Me(e, a) {
394
+ typeof e.ref == "string" && Ae.current;
395
395
  }
396
396
  function sr(e, a) {
397
397
  {
398
398
  var d = function() {
399
- Le || (Le = !0, r("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
399
+ fe || (fe = !0, r("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
400
400
  };
401
401
  d.isReactWarning = !0, Object.defineProperty(e, "key", {
402
402
  get: d,
@@ -407,7 +407,7 @@ function Ar() {
407
407
  function lr(e, a) {
408
408
  {
409
409
  var d = function() {
410
- We || (We = !0, r("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
410
+ ge || (ge = !0, r("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
411
411
  };
412
412
  d.isReactWarning = !0, Object.defineProperty(e, "ref", {
413
413
  get: d,
@@ -415,8 +415,8 @@ function Ar() {
415
415
  });
416
416
  }
417
417
  }
418
- var cr = function(e, a, d, v, O, C, T) {
419
- var w = {
418
+ var cr = function(e, a, d, E, I, N, T) {
419
+ var k = {
420
420
  // This tag allows us to uniquely identify this as a React Element
421
421
  $$typeof: h,
422
422
  // Built-in properties that belong on the element
@@ -425,60 +425,60 @@ function Ar() {
425
425
  ref: d,
426
426
  props: T,
427
427
  // Record the component responsible for creating this element.
428
- _owner: C
428
+ _owner: N
429
429
  };
430
- return w._store = {}, Object.defineProperty(w._store, "validated", {
430
+ return k._store = {}, Object.defineProperty(k._store, "validated", {
431
431
  configurable: !1,
432
432
  enumerable: !1,
433
433
  writable: !0,
434
434
  value: !1
435
- }), Object.defineProperty(w, "_self", {
435
+ }), Object.defineProperty(k, "_self", {
436
436
  configurable: !1,
437
437
  enumerable: !1,
438
438
  writable: !1,
439
- value: v
440
- }), Object.defineProperty(w, "_source", {
439
+ value: E
440
+ }), Object.defineProperty(k, "_source", {
441
441
  configurable: !1,
442
442
  enumerable: !1,
443
443
  writable: !1,
444
- value: O
445
- }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
444
+ value: I
445
+ }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
446
446
  };
447
- function ur(e, a, d, v, O) {
447
+ function ur(e, a, d, E, I) {
448
448
  {
449
- var C, T = {}, w = null, V = null;
450
- d !== void 0 && (ge(d), w = "" + d), ir(a) && (ge(a.key), w = "" + a.key), ar(a) && (V = a.ref, or(a, O));
451
- for (C in a)
452
- ce.call(a, C) && !Ce.hasOwnProperty(C) && (T[C] = a[C]);
449
+ var N, T = {}, k = null, G = null;
450
+ d !== void 0 && (De(d), k = "" + d), je(a) && (De(a.key), k = "" + a.key), Ie(a) && (G = a.ref, Me(a, I));
451
+ for (N in a)
452
+ be.call(a, N) && !ve.hasOwnProperty(N) && (T[N] = a[N]);
453
453
  if (e && e.defaultProps) {
454
454
  var $ = e.defaultProps;
455
- for (C in $)
456
- T[C] === void 0 && (T[C] = $[C]);
455
+ for (N in $)
456
+ T[N] === void 0 && (T[N] = $[N]);
457
457
  }
458
- if (w || V) {
459
- var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
- w && sr(T, M), V && lr(T, M);
458
+ if (k || G) {
459
+ var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
+ k && sr(T, U), G && lr(T, U);
461
461
  }
462
- return cr(e, w, V, O, v, ke.current, T);
462
+ return cr(e, k, G, I, E, Ae.current, T);
463
463
  }
464
464
  }
465
- var De = y.ReactCurrentOwner, Ge = y.ReactDebugCurrentFrame;
466
- function we(e) {
465
+ var Ue = S.ReactCurrentOwner, Xe = S.ReactDebugCurrentFrame;
466
+ function Te(e) {
467
467
  if (e) {
468
- var a = e._owner, d = xe(e.type, e._source, a ? a.type : null);
469
- Ge.setExtraStackFrame(d);
468
+ var a = e._owner, d = ke(e.type, e._source, a ? a.type : null);
469
+ Xe.setExtraStackFrame(d);
470
470
  } else
471
- Ge.setExtraStackFrame(null);
471
+ Xe.setExtraStackFrame(null);
472
472
  }
473
- var je;
474
- je = !1;
475
- function $e(e) {
473
+ var He;
474
+ He = !1;
475
+ function Be(e) {
476
476
  return typeof e == "object" && e !== null && e.$$typeof === h;
477
477
  }
478
- function Ye() {
478
+ function Ke() {
479
479
  {
480
- if (De.current) {
481
- var e = H(De.current.type);
480
+ if (Ue.current) {
481
+ var e = V(Ue.current.type);
482
482
  if (e)
483
483
  return `
484
484
 
@@ -490,10 +490,10 @@ Check the render method of \`` + e + "`.";
490
490
  function dr(e) {
491
491
  return "";
492
492
  }
493
- var Ve = {};
493
+ var Ze = {};
494
494
  function pr(e) {
495
495
  {
496
- var a = Ye();
496
+ var a = Ke();
497
497
  if (!a) {
498
498
  var d = typeof e == "string" ? e : e.displayName || e.name;
499
499
  d && (a = `
@@ -503,35 +503,35 @@ Check the top-level render call using <` + d + ">.");
503
503
  return a;
504
504
  }
505
505
  }
506
- function Xe(e, a) {
506
+ function qe(e, a) {
507
507
  {
508
508
  if (!e._store || e._store.validated || e.key != null)
509
509
  return;
510
510
  e._store.validated = !0;
511
511
  var d = pr(a);
512
- if (Ve[d])
512
+ if (Ze[d])
513
513
  return;
514
- Ve[d] = !0;
515
- var v = "";
516
- e && e._owner && e._owner !== De.current && (v = " It was passed a child from " + H(e._owner.type) + "."), we(e), r('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, v), we(null);
514
+ Ze[d] = !0;
515
+ var E = "";
516
+ e && e._owner && e._owner !== Ue.current && (E = " It was passed a child from " + V(e._owner.type) + "."), Te(e), r('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, E), Te(null);
517
517
  }
518
518
  }
519
- function Ke(e, a) {
519
+ function Je(e, a) {
520
520
  {
521
521
  if (typeof e != "object")
522
522
  return;
523
- if (_e(e))
523
+ if (_(e))
524
524
  for (var d = 0; d < e.length; d++) {
525
- var v = e[d];
526
- $e(v) && Xe(v, a);
525
+ var E = e[d];
526
+ Be(E) && qe(E, a);
527
527
  }
528
- else if ($e(e))
528
+ else if (Be(e))
529
529
  e._store && (e._store.validated = !0);
530
530
  else if (e) {
531
- var O = E(e);
532
- if (typeof O == "function" && O !== e.entries)
533
- for (var C = O.call(e), T; !(T = C.next()).done; )
534
- $e(T.value) && Xe(T.value, a);
531
+ var I = b(e);
532
+ if (typeof I == "function" && I !== e.entries)
533
+ for (var N = I.call(e), T; !(T = N.next()).done; )
534
+ Be(T.value) && qe(T.value, a);
535
535
  }
536
536
  }
537
537
  }
@@ -545,17 +545,17 @@ Check the top-level render call using <` + d + ">.");
545
545
  d = a.propTypes;
546
546
  else if (typeof a == "object" && (a.$$typeof === m || // Note: Memo only checks outer props here.
547
547
  // Inner props are checked in the reconciler.
548
- a.$$typeof === I))
548
+ a.$$typeof === F))
549
549
  d = a.propTypes;
550
550
  else
551
551
  return;
552
552
  if (d) {
553
- var v = H(a);
554
- he(d, e.props, "prop", v, e);
555
- } else if (a.PropTypes !== void 0 && !je) {
556
- je = !0;
557
- var O = H(a);
558
- r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
553
+ var E = V(a);
554
+ Fe(d, e.props, "prop", E, e);
555
+ } else if (a.PropTypes !== void 0 && !He) {
556
+ He = !0;
557
+ var I = V(a);
558
+ r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
559
559
  }
560
560
  typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && r("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
561
  }
@@ -563,72 +563,72 @@ Check the top-level render call using <` + d + ">.");
563
563
  function fr(e) {
564
564
  {
565
565
  for (var a = Object.keys(e.props), d = 0; d < a.length; d++) {
566
- var v = a[d];
567
- if (v !== "children" && v !== "key") {
568
- we(e), r("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
566
+ var E = a[d];
567
+ if (E !== "children" && E !== "key") {
568
+ Te(e), r("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", E), Te(null);
569
569
  break;
570
570
  }
571
571
  }
572
- e.ref !== null && (we(e), r("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
572
+ e.ref !== null && (Te(e), r("Invalid attribute `ref` supplied to `React.Fragment`."), Te(null));
573
573
  }
574
574
  }
575
- var Ze = {};
576
- function qe(e, a, d, v, O, C) {
575
+ var Qe = {};
576
+ function er(e, a, d, E, I, N) {
577
577
  {
578
- var T = N(e);
578
+ var T = O(e);
579
579
  if (!T) {
580
- var w = "";
581
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
- var V = dr();
583
- V ? w += V : w += Ye();
580
+ var k = "";
581
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
582
+ var G = dr();
583
+ G ? k += G : k += Ke();
584
584
  var $;
585
- e === null ? $ = "null" : _e(e) ? $ = "array" : e !== void 0 && e.$$typeof === h ? ($ = "<" + (H(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, r("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
585
+ e === null ? $ = "null" : _(e) ? $ = "array" : e !== void 0 && e.$$typeof === h ? ($ = "<" + (V(e.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, r("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, k);
586
586
  }
587
- var M = ur(e, a, d, O, C);
588
- if (M == null)
589
- return M;
587
+ var U = ur(e, a, d, I, N);
588
+ if (U == null)
589
+ return U;
590
590
  if (T) {
591
591
  var ee = a.children;
592
592
  if (ee !== void 0)
593
- if (v)
594
- if (_e(ee)) {
595
- for (var Se = 0; Se < ee.length; Se++)
596
- Ke(ee[Se], e);
593
+ if (E)
594
+ if (_(ee)) {
595
+ for (var Re = 0; Re < ee.length; Re++)
596
+ Je(ee[Re], e);
597
597
  Object.freeze && Object.freeze(ee);
598
598
  } else
599
599
  r("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
600
600
  else
601
- Ke(ee, e);
601
+ Je(ee, e);
602
602
  }
603
- if (ce.call(a, "key")) {
604
- var Ee = H(e), K = Object.keys(a).filter(function(yr) {
603
+ if (be.call(a, "key")) {
604
+ var Ee = V(e), K = Object.keys(a).filter(function(yr) {
605
605
  return yr !== "key";
606
- }), Me = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
607
- if (!Ze[Ee + Me]) {
606
+ }), ze = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
607
+ if (!Qe[Ee + ze]) {
608
608
  var Er = K.length > 0 ? "{" + K.join(": ..., ") + ": ...}" : "{}";
609
609
  r(`A props object containing a "key" prop is being spread into JSX:
610
610
  let props = %s;
611
611
  <%s {...props} />
612
612
  React keys must be passed directly to JSX without using spread:
613
613
  let props = %s;
614
- <%s key={someKey} {...props} />`, Me, Ee, Er, Ee), Ze[Ee + Me] = !0;
614
+ <%s key={someKey} {...props} />`, ze, Ee, Er, Ee), Qe[Ee + ze] = !0;
615
615
  }
616
616
  }
617
- return e === u ? fr(M) : hr(M), M;
617
+ return e === u ? fr(U) : hr(U), U;
618
618
  }
619
619
  }
620
620
  function gr(e, a, d) {
621
- return qe(e, a, d, !0);
621
+ return er(e, a, d, !0);
622
622
  }
623
623
  function mr(e, a, d) {
624
- return qe(e, a, d, !1);
624
+ return er(e, a, d, !1);
625
625
  }
626
626
  var br = mr, vr = gr;
627
- Oe.Fragment = u, Oe.jsx = br, Oe.jsxs = vr;
628
- }()), Oe;
627
+ Ne.Fragment = u, Ne.jsx = br, Ne.jsxs = vr;
628
+ }()), Ne;
629
629
  }
630
- process.env.NODE_ENV === "production" ? Be.exports = Sr() : Be.exports = Ar();
631
- var c = Be.exports, nr = { exports: {} };
630
+ process.env.NODE_ENV === "production" ? Ye.exports = Sr() : Ye.exports = Ar();
631
+ var c = Ye.exports, or = { exports: {} };
632
632
  (function(p) {
633
633
  var h = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
634
634
  /**
@@ -640,7 +640,7 @@ var c = Be.exports, nr = { exports: {} };
640
640
  * @public
641
641
  */
642
642
  var n = function(u) {
643
- var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, A = 0, R = {}, s = {
643
+ var v = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, A = 0, R = {}, s = {
644
644
  /**
645
645
  * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
646
646
  * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
@@ -738,26 +738,26 @@ var c = Be.exports, nr = { exports: {} };
738
738
  */
739
739
  clone: function r(t, i) {
740
740
  i = i || {};
741
- var o, l;
741
+ var l, o;
742
742
  switch (s.util.type(t)) {
743
743
  case "Object":
744
- if (l = s.util.objId(t), i[l])
745
- return i[l];
746
- o = /** @type {Record<string, any>} */
747
- {}, i[l] = o;
748
- for (var g in t)
749
- t.hasOwnProperty(g) && (o[g] = r(t[g], i));
744
+ if (o = s.util.objId(t), i[o])
745
+ return i[o];
746
+ l = /** @type {Record<string, any>} */
747
+ {}, i[o] = l;
748
+ for (var f in t)
749
+ t.hasOwnProperty(f) && (l[f] = r(t[f], i));
750
750
  return (
751
751
  /** @type {any} */
752
- o
752
+ l
753
753
  );
754
754
  case "Array":
755
- return l = s.util.objId(t), i[l] ? i[l] : (o = [], i[l] = o, /** @type {Array} */
755
+ return o = s.util.objId(t), i[o] ? i[o] : (l = [], i[o] = l, /** @type {Array} */
756
756
  /** @type {any} */
757
- t.forEach(function(x, f) {
758
- o[f] = r(x, i);
757
+ t.forEach(function(y, g) {
758
+ l[g] = r(y, i);
759
759
  }), /** @type {any} */
760
- o);
760
+ l);
761
761
  default:
762
762
  return t;
763
763
  }
@@ -772,7 +772,7 @@ var c = Be.exports, nr = { exports: {} };
772
772
  */
773
773
  getLanguage: function(r) {
774
774
  for (; r; ) {
775
- var t = b.exec(r.className);
775
+ var t = v.exec(r.className);
776
776
  if (t)
777
777
  return t[1].toLowerCase();
778
778
  r = r.parentElement;
@@ -787,7 +787,7 @@ var c = Be.exports, nr = { exports: {} };
787
787
  * @returns {void}
788
788
  */
789
789
  setLanguage: function(r, t) {
790
- r.className = r.className.replace(RegExp(b, "gi"), ""), r.classList.add("language-" + t);
790
+ r.className = r.className.replace(RegExp(v, "gi"), ""), r.classList.add("language-" + t);
791
791
  },
792
792
  /**
793
793
  * Returns the script element that is currently executing.
@@ -806,8 +806,8 @@ var c = Be.exports, nr = { exports: {} };
806
806
  );
807
807
  try {
808
808
  throw new Error();
809
- } catch (o) {
810
- var r = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.stack) || [])[1];
809
+ } catch (l) {
810
+ var r = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(l.stack) || [])[1];
811
811
  if (r) {
812
812
  var t = document.getElementsByTagName("script");
813
813
  for (var i in t)
@@ -837,11 +837,11 @@ var c = Be.exports, nr = { exports: {} };
837
837
  * @returns {boolean}
838
838
  */
839
839
  isActive: function(r, t, i) {
840
- for (var o = "no-" + t; r; ) {
841
- var l = r.classList;
842
- if (l.contains(t))
840
+ for (var l = "no-" + t; r; ) {
841
+ var o = r.classList;
842
+ if (o.contains(t))
843
843
  return !0;
844
- if (l.contains(o))
844
+ if (o.contains(l))
845
845
  return !1;
846
846
  r = r.parentElement;
847
847
  }
@@ -893,8 +893,8 @@ var c = Be.exports, nr = { exports: {} };
893
893
  */
894
894
  extend: function(r, t) {
895
895
  var i = s.util.clone(s.languages[r]);
896
- for (var o in t)
897
- i[o] = t[o];
896
+ for (var l in t)
897
+ i[l] = t[l];
898
898
  return i;
899
899
  },
900
900
  /**
@@ -972,31 +972,31 @@ var c = Be.exports, nr = { exports: {} };
972
972
  * @returns {Grammar} The new grammar object.
973
973
  * @public
974
974
  */
975
- insertBefore: function(r, t, i, o) {
976
- o = o || /** @type {any} */
975
+ insertBefore: function(r, t, i, l) {
976
+ l = l || /** @type {any} */
977
977
  s.languages;
978
- var l = o[r], g = {};
979
- for (var x in l)
980
- if (l.hasOwnProperty(x)) {
981
- if (x == t)
982
- for (var f in i)
983
- i.hasOwnProperty(f) && (g[f] = i[f]);
984
- i.hasOwnProperty(x) || (g[x] = l[x]);
978
+ var o = l[r], f = {};
979
+ for (var y in o)
980
+ if (o.hasOwnProperty(y)) {
981
+ if (y == t)
982
+ for (var g in i)
983
+ i.hasOwnProperty(g) && (f[g] = i[g]);
984
+ i.hasOwnProperty(y) || (f[y] = o[y]);
985
985
  }
986
- var N = o[r];
987
- return o[r] = g, s.languages.DFS(s.languages, function(j, W) {
988
- W === N && j != r && (this[j] = g);
989
- }), g;
986
+ var O = l[r];
987
+ return l[r] = f, s.languages.DFS(s.languages, function(D, j) {
988
+ j === O && D != r && (this[D] = f);
989
+ }), f;
990
990
  },
991
991
  // Traverse a language definition with Depth First Search
992
- DFS: function r(t, i, o, l) {
993
- l = l || {};
994
- var g = s.util.objId;
995
- for (var x in t)
996
- if (t.hasOwnProperty(x)) {
997
- i.call(t, x, t[x], o || x);
998
- var f = t[x], N = s.util.type(f);
999
- N === "Object" && !l[g(f)] ? (l[g(f)] = !0, r(f, i, null, l)) : N === "Array" && !l[g(f)] && (l[g(f)] = !0, r(f, i, x, l));
992
+ DFS: function r(t, i, l, o) {
993
+ o = o || {};
994
+ var f = s.util.objId;
995
+ for (var y in t)
996
+ if (t.hasOwnProperty(y)) {
997
+ i.call(t, y, t[y], l || y);
998
+ var g = t[y], O = s.util.type(g);
999
+ O === "Object" && !o[f(g)] ? (o[f(g)] = !0, r(g, i, null, o)) : O === "Array" && !o[f(g)] && (o[f(g)] = !0, r(g, i, y, o));
1000
1000
  }
1001
1001
  }
1002
1002
  },
@@ -1032,14 +1032,14 @@ var c = Be.exports, nr = { exports: {} };
1032
1032
  * @public
1033
1033
  */
1034
1034
  highlightAllUnder: function(r, t, i) {
1035
- var o = {
1035
+ var l = {
1036
1036
  callback: i,
1037
1037
  container: r,
1038
1038
  selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
1039
1039
  };
1040
- s.hooks.run("before-highlightall", o), o.elements = Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)), s.hooks.run("before-all-elements-highlight", o);
1041
- for (var l = 0, g; g = o.elements[l++]; )
1042
- s.highlightElement(g, t === !0, o.callback);
1040
+ s.hooks.run("before-highlightall", l), l.elements = Array.prototype.slice.apply(l.container.querySelectorAll(l.selector)), s.hooks.run("before-all-elements-highlight", l);
1041
+ for (var o = 0, f; f = l.elements[o++]; )
1042
+ s.highlightElement(f, t === !0, l.callback);
1043
1043
  },
1044
1044
  /**
1045
1045
  * Highlights the code inside a single element.
@@ -1070,38 +1070,38 @@ var c = Be.exports, nr = { exports: {} };
1070
1070
  * @public
1071
1071
  */
1072
1072
  highlightElement: function(r, t, i) {
1073
- var o = s.util.getLanguage(r), l = s.languages[o];
1074
- s.util.setLanguage(r, o);
1075
- var g = r.parentElement;
1076
- g && g.nodeName.toLowerCase() === "pre" && s.util.setLanguage(g, o);
1077
- var x = r.textContent, f = {
1073
+ var l = s.util.getLanguage(r), o = s.languages[l];
1074
+ s.util.setLanguage(r, l);
1075
+ var f = r.parentElement;
1076
+ f && f.nodeName.toLowerCase() === "pre" && s.util.setLanguage(f, l);
1077
+ var y = r.textContent, g = {
1078
1078
  element: r,
1079
- language: o,
1080
- grammar: l,
1081
- code: x
1079
+ language: l,
1080
+ grammar: o,
1081
+ code: y
1082
1082
  };
1083
- function N(W) {
1084
- f.highlightedCode = W, s.hooks.run("before-insert", f), f.element.innerHTML = f.highlightedCode, s.hooks.run("after-highlight", f), s.hooks.run("complete", f), i && i.call(f.element);
1083
+ function O(j) {
1084
+ g.highlightedCode = j, s.hooks.run("before-insert", g), g.element.innerHTML = g.highlightedCode, s.hooks.run("after-highlight", g), s.hooks.run("complete", g), i && i.call(g.element);
1085
1085
  }
1086
- if (s.hooks.run("before-sanity-check", f), g = f.element.parentElement, g && g.nodeName.toLowerCase() === "pre" && !g.hasAttribute("tabindex") && g.setAttribute("tabindex", "0"), !f.code) {
1087
- s.hooks.run("complete", f), i && i.call(f.element);
1086
+ if (s.hooks.run("before-sanity-check", g), f = g.element.parentElement, f && f.nodeName.toLowerCase() === "pre" && !f.hasAttribute("tabindex") && f.setAttribute("tabindex", "0"), !g.code) {
1087
+ s.hooks.run("complete", g), i && i.call(g.element);
1088
1088
  return;
1089
1089
  }
1090
- if (s.hooks.run("before-highlight", f), !f.grammar) {
1091
- N(s.util.encode(f.code));
1090
+ if (s.hooks.run("before-highlight", g), !g.grammar) {
1091
+ O(s.util.encode(g.code));
1092
1092
  return;
1093
1093
  }
1094
1094
  if (t && u.Worker) {
1095
- var j = new Worker(s.filename);
1096
- j.onmessage = function(W) {
1097
- N(W.data);
1098
- }, j.postMessage(JSON.stringify({
1099
- language: f.language,
1100
- code: f.code,
1095
+ var D = new Worker(s.filename);
1096
+ D.onmessage = function(j) {
1097
+ O(j.data);
1098
+ }, D.postMessage(JSON.stringify({
1099
+ language: g.language,
1100
+ code: g.code,
1101
1101
  immediateClose: !0
1102
1102
  }));
1103
1103
  } else
1104
- N(s.highlight(f.code, f.grammar, f.language));
1104
+ O(s.highlight(g.code, g.grammar, g.language));
1105
1105
  },
1106
1106
  /**
1107
1107
  * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
@@ -1124,14 +1124,14 @@ var c = Be.exports, nr = { exports: {} };
1124
1124
  * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
1125
1125
  */
1126
1126
  highlight: function(r, t, i) {
1127
- var o = {
1127
+ var l = {
1128
1128
  code: r,
1129
1129
  grammar: t,
1130
1130
  language: i
1131
1131
  };
1132
- if (s.hooks.run("before-tokenize", o), !o.grammar)
1133
- throw new Error('The language "' + o.language + '" has no grammar.');
1134
- return o.tokens = s.tokenize(o.code, o.grammar), s.hooks.run("after-tokenize", o), m.stringify(s.util.encode(o.tokens), o.language);
1132
+ if (s.hooks.run("before-tokenize", l), !l.grammar)
1133
+ throw new Error('The language "' + l.language + '" has no grammar.');
1134
+ return l.tokens = s.tokenize(l.code, l.grammar), s.hooks.run("after-tokenize", l), m.stringify(s.util.encode(l.tokens), l.language);
1135
1135
  },
1136
1136
  /**
1137
1137
  * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
@@ -1160,12 +1160,12 @@ var c = Be.exports, nr = { exports: {} };
1160
1160
  tokenize: function(r, t) {
1161
1161
  var i = t.rest;
1162
1162
  if (i) {
1163
- for (var o in i)
1164
- t[o] = i[o];
1163
+ for (var l in i)
1164
+ t[l] = i[l];
1165
1165
  delete t.rest;
1166
1166
  }
1167
- var l = new I();
1168
- return L(l, l.head, r), S(r, l, t, l.head, 0), Z(l);
1167
+ var o = new F();
1168
+ return L(o, o.head, r), w(r, o, t, o.head, 0), Z(o);
1169
1169
  },
1170
1170
  /**
1171
1171
  * @namespace
@@ -1202,109 +1202,109 @@ var c = Be.exports, nr = { exports: {} };
1202
1202
  run: function(r, t) {
1203
1203
  var i = s.hooks.all[r];
1204
1204
  if (!(!i || !i.length))
1205
- for (var o = 0, l; l = i[o++]; )
1206
- l(t);
1205
+ for (var l = 0, o; o = i[l++]; )
1206
+ o(t);
1207
1207
  }
1208
1208
  },
1209
1209
  Token: m
1210
1210
  };
1211
1211
  u.Prism = s;
1212
- function m(r, t, i, o) {
1213
- this.type = r, this.content = t, this.alias = i, this.length = (o || "").length | 0;
1212
+ function m(r, t, i, l) {
1213
+ this.type = r, this.content = t, this.alias = i, this.length = (l || "").length | 0;
1214
1214
  }
1215
1215
  m.stringify = function r(t, i) {
1216
1216
  if (typeof t == "string")
1217
1217
  return t;
1218
1218
  if (Array.isArray(t)) {
1219
- var o = "";
1220
- return t.forEach(function(N) {
1221
- o += r(N, i);
1222
- }), o;
1219
+ var l = "";
1220
+ return t.forEach(function(O) {
1221
+ l += r(O, i);
1222
+ }), l;
1223
1223
  }
1224
- var l = {
1224
+ var o = {
1225
1225
  type: t.type,
1226
1226
  content: r(t.content, i),
1227
1227
  tag: "span",
1228
1228
  classes: ["token", t.type],
1229
1229
  attributes: {},
1230
1230
  language: i
1231
- }, g = t.alias;
1232
- g && (Array.isArray(g) ? Array.prototype.push.apply(l.classes, g) : l.classes.push(g)), s.hooks.run("wrap", l);
1233
- var x = "";
1234
- for (var f in l.attributes)
1235
- x += " " + f + '="' + (l.attributes[f] || "").replace(/"/g, "&quot;") + '"';
1236
- return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + x + ">" + l.content + "</" + l.tag + ">";
1231
+ }, f = t.alias;
1232
+ f && (Array.isArray(f) ? Array.prototype.push.apply(o.classes, f) : o.classes.push(f)), s.hooks.run("wrap", o);
1233
+ var y = "";
1234
+ for (var g in o.attributes)
1235
+ y += " " + g + '="' + (o.attributes[g] || "").replace(/"/g, "&quot;") + '"';
1236
+ return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + y + ">" + o.content + "</" + o.tag + ">";
1237
1237
  };
1238
- function k(r, t, i, o) {
1238
+ function x(r, t, i, l) {
1239
1239
  r.lastIndex = t;
1240
- var l = r.exec(i);
1241
- if (l && o && l[1]) {
1242
- var g = l[1].length;
1243
- l.index += g, l[0] = l[0].slice(g);
1240
+ var o = r.exec(i);
1241
+ if (o && l && o[1]) {
1242
+ var f = o[1].length;
1243
+ o.index += f, o[0] = o[0].slice(f);
1244
1244
  }
1245
- return l;
1246
- }
1247
- function S(r, t, i, o, l, g) {
1248
- for (var x in i)
1249
- if (!(!i.hasOwnProperty(x) || !i[x])) {
1250
- var f = i[x];
1251
- f = Array.isArray(f) ? f : [f];
1252
- for (var N = 0; N < f.length; ++N) {
1253
- if (g && g.cause == x + "," + N)
1245
+ return o;
1246
+ }
1247
+ function w(r, t, i, l, o, f) {
1248
+ for (var y in i)
1249
+ if (!(!i.hasOwnProperty(y) || !i[y])) {
1250
+ var g = i[y];
1251
+ g = Array.isArray(g) ? g : [g];
1252
+ for (var O = 0; O < g.length; ++O) {
1253
+ if (f && f.cause == y + "," + O)
1254
1254
  return;
1255
- var j = f[N], W = j.inside, H = !!j.lookbehind, G = !!j.greedy, ne = j.alias;
1256
- if (G && !j.pattern.global) {
1257
- var ae = j.pattern.toString().match(/[imsuy]*$/)[0];
1258
- j.pattern = RegExp(j.pattern.source, ae + "g");
1255
+ var D = g[O], j = D.inside, V = !!D.lookbehind, q = !!D.greedy, ae = D.alias;
1256
+ if (q && !D.pattern.global) {
1257
+ var ie = D.pattern.toString().match(/[imsuy]*$/)[0];
1258
+ D.pattern = RegExp(D.pattern.source, ie + "g");
1259
1259
  }
1260
- for (var ue = j.pattern || j, D = o.next, z = l; D !== t.tail && !(g && z >= g.reach); z += D.value.length, D = D.next) {
1261
- var re = D.value;
1260
+ for (var oe = D.pattern || D, P = l.next, H = o; P !== t.tail && !(f && H >= f.reach); H += P.value.length, P = P.next) {
1261
+ var X = P.value;
1262
1262
  if (t.length > r.length)
1263
1263
  return;
1264
- if (!(re instanceof m)) {
1265
- var J = 1, B;
1266
- if (G) {
1267
- if (B = k(ue, z, r, H), !B || B.index >= r.length)
1264
+ if (!(X instanceof m)) {
1265
+ var se = 1, z;
1266
+ if (q) {
1267
+ if (z = x(oe, H, r, V), !z || z.index >= r.length)
1268
1268
  break;
1269
- var ie = B.index, le = B.index + B[0].length, q = z;
1270
- for (q += D.value.length; ie >= q; )
1271
- D = D.next, q += D.value.length;
1272
- if (q -= D.value.length, z = q, D.value instanceof m)
1269
+ var J = z.index, xe = z.index + z[0].length, W = H;
1270
+ for (W += P.value.length; J >= W; )
1271
+ P = P.next, W += P.value.length;
1272
+ if (W -= P.value.length, H = W, P.value instanceof m)
1273
1273
  continue;
1274
- for (var Q = D; Q !== t.tail && (q < le || typeof Q.value == "string"); Q = Q.next)
1275
- J++, q += Q.value.length;
1276
- J--, re = r.slice(z, q), B.index -= z;
1277
- } else if (B = k(ue, 0, re, H), !B)
1274
+ for (var le = P; le !== t.tail && (W < xe || typeof le.value == "string"); le = le.next)
1275
+ se++, W += le.value.length;
1276
+ se--, X = r.slice(H, W), z.index -= H;
1277
+ } else if (z = x(oe, 0, X, V), !z)
1278
1278
  continue;
1279
- var ie = B.index, oe = B[0], Y = re.slice(0, ie), de = re.slice(ie + oe.length), se = z + re.length;
1280
- g && se > g.reach && (g.reach = se);
1281
- var pe = D.prev;
1282
- Y && (pe = L(t, pe, Y), z += Y.length), U(t, pe, J);
1283
- var ye = new m(x, W ? s.tokenize(oe, W) : oe, ne, oe);
1284
- if (D = L(t, pe, ye), de && L(t, D, de), J > 1) {
1279
+ var J = z.index, re = z[0], te = X.slice(0, J), ne = X.slice(J + re.length), ce = H + X.length;
1280
+ f && ce > f.reach && (f.reach = ce);
1281
+ var de = P.prev;
1282
+ te && (de = L(t, de, te), H += te.length), B(t, de, se);
1283
+ var Q = new m(y, j ? s.tokenize(re, j) : re, ae, re);
1284
+ if (P = L(t, de, Q), ne && L(t, P, ne), se > 1) {
1285
1285
  var me = {
1286
- cause: x + "," + N,
1287
- reach: se
1286
+ cause: y + "," + O,
1287
+ reach: ce
1288
1288
  };
1289
- S(r, t, i, D.prev, z, me), g && me.reach > g.reach && (g.reach = me.reach);
1289
+ w(r, t, i, P.prev, H, me), f && me.reach > f.reach && (f.reach = me.reach);
1290
1290
  }
1291
1291
  }
1292
1292
  }
1293
1293
  }
1294
1294
  }
1295
1295
  }
1296
- function I() {
1296
+ function F() {
1297
1297
  var r = { value: null, prev: null, next: null }, t = { value: null, prev: r, next: null };
1298
1298
  r.next = t, this.head = r, this.tail = t, this.length = 0;
1299
1299
  }
1300
1300
  function L(r, t, i) {
1301
- var o = t.next, l = { value: i, prev: t, next: o };
1302
- return t.next = l, o.prev = l, r.length++, l;
1301
+ var l = t.next, o = { value: i, prev: t, next: l };
1302
+ return t.next = o, l.prev = o, r.length++, o;
1303
1303
  }
1304
- function U(r, t, i) {
1305
- for (var o = t.next, l = 0; l < i && o !== r.tail; l++)
1306
- o = o.next;
1307
- t.next = o, o.prev = t, r.length -= l;
1304
+ function B(r, t, i) {
1305
+ for (var l = t.next, o = 0; o < i && l !== r.tail; o++)
1306
+ l = l.next;
1307
+ t.next = l, l.prev = t, r.length -= o;
1308
1308
  }
1309
1309
  function Z(r) {
1310
1310
  for (var t = [], i = r.head.next; i !== r.tail; )
@@ -1313,21 +1313,21 @@ var c = Be.exports, nr = { exports: {} };
1313
1313
  }
1314
1314
  if (!u.document)
1315
1315
  return u.addEventListener && (s.disableWorkerMessageHandler || u.addEventListener("message", function(r) {
1316
- var t = JSON.parse(r.data), i = t.language, o = t.code, l = t.immediateClose;
1317
- u.postMessage(s.highlight(o, s.languages[i], i)), l && u.close();
1316
+ var t = JSON.parse(r.data), i = t.language, l = t.code, o = t.immediateClose;
1317
+ u.postMessage(s.highlight(l, s.languages[i], i)), o && u.close();
1318
1318
  }, !1)), s;
1319
- var _ = s.util.currentScript();
1320
- _ && (s.filename = _.src, _.hasAttribute("data-manual") && (s.manual = !0));
1321
- function E() {
1319
+ var C = s.util.currentScript();
1320
+ C && (s.filename = C.src, C.hasAttribute("data-manual") && (s.manual = !0));
1321
+ function b() {
1322
1322
  s.manual || s.highlightAll();
1323
1323
  }
1324
1324
  if (!s.manual) {
1325
- var y = document.readyState;
1326
- y === "loading" || y === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", E) : window.requestAnimationFrame ? window.requestAnimationFrame(E) : window.setTimeout(E, 16);
1325
+ var S = document.readyState;
1326
+ S === "loading" || S === "interactive" && C && C.defer ? document.addEventListener("DOMContentLoaded", b) : window.requestAnimationFrame ? window.requestAnimationFrame(b) : window.setTimeout(b, 16);
1327
1327
  }
1328
1328
  return s;
1329
1329
  }(h);
1330
- p.exports && (p.exports = n), typeof Je < "u" && (Je.Prism = n), n.languages.markup = {
1330
+ p.exports && (p.exports = n), typeof rr < "u" && (rr.Prism = n), n.languages.markup = {
1331
1331
  comment: {
1332
1332
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
1333
1333
  greedy: !0
@@ -1418,7 +1418,7 @@ var c = Be.exports, nr = { exports: {} };
1418
1418
  * @example
1419
1419
  * addInlined('style', 'css');
1420
1420
  */
1421
- value: function(b, A) {
1421
+ value: function(v, A) {
1422
1422
  var R = {};
1423
1423
  R["language-" + A] = {
1424
1424
  pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
@@ -1436,9 +1436,9 @@ var c = Be.exports, nr = { exports: {} };
1436
1436
  inside: n.languages[A]
1437
1437
  };
1438
1438
  var m = {};
1439
- m[b] = {
1439
+ m[v] = {
1440
1440
  pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
1441
- return b;
1441
+ return v;
1442
1442
  }), "i"),
1443
1443
  lookbehind: !0,
1444
1444
  greedy: !0,
@@ -1457,7 +1457,7 @@ var c = Be.exports, nr = { exports: {} };
1457
1457
  * @example
1458
1458
  * addAttribute('style', 'css');
1459
1459
  */
1460
- value: function(u, b) {
1460
+ value: function(u, v) {
1461
1461
  n.languages.markup.tag.inside["special-attr"].push({
1462
1462
  pattern: RegExp(
1463
1463
  /(^|["'\s])/.source + "(?:" + u + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
@@ -1472,8 +1472,8 @@ var c = Be.exports, nr = { exports: {} };
1472
1472
  value: {
1473
1473
  pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1474
1474
  lookbehind: !0,
1475
- alias: [b, "language-" + b],
1476
- inside: n.languages[b]
1475
+ alias: [v, "language-" + v],
1476
+ inside: n.languages[v]
1477
1477
  },
1478
1478
  punctuation: [
1479
1479
  {
@@ -1488,11 +1488,11 @@ var c = Be.exports, nr = { exports: {} };
1488
1488
  });
1489
1489
  }
1490
1490
  }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(u) {
1491
- var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1491
+ var v = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1492
1492
  u.languages.css = {
1493
1493
  comment: /\/\*[\s\S]*?\*\//,
1494
1494
  atrule: {
1495
- pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
1495
+ pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + v.source + ")*?" + /(?:;|(?=\s*\{))/.source),
1496
1496
  inside: {
1497
1497
  rule: /^@[\w-]+/,
1498
1498
  "selector-function-argument": {
@@ -1509,23 +1509,23 @@ var c = Be.exports, nr = { exports: {} };
1509
1509
  },
1510
1510
  url: {
1511
1511
  // https://drafts.csswg.org/css-values-3/#urls
1512
- pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
1512
+ pattern: RegExp("\\burl\\((?:" + v.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
1513
1513
  greedy: !0,
1514
1514
  inside: {
1515
1515
  function: /^url/i,
1516
1516
  punctuation: /^\(|\)$/,
1517
1517
  string: {
1518
- pattern: RegExp("^" + b.source + "$"),
1518
+ pattern: RegExp("^" + v.source + "$"),
1519
1519
  alias: "url"
1520
1520
  }
1521
1521
  }
1522
1522
  },
1523
1523
  selector: {
1524
- pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
1524
+ pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + v.source + ")*(?=\\s*\\{)"),
1525
1525
  lookbehind: !0
1526
1526
  },
1527
1527
  string: {
1528
- pattern: b,
1528
+ pattern: v,
1529
1529
  greedy: !0
1530
1530
  },
1531
1531
  property: {
@@ -1705,8 +1705,8 @@ var c = Be.exports, nr = { exports: {} };
1705
1705
  if (typeof n > "u" || typeof document > "u")
1706
1706
  return;
1707
1707
  Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1708
- var u = "Loading…", b = function(_, E) {
1709
- return "✖ Error " + _ + " while fetching file: " + E;
1708
+ var u = "Loading…", v = function(C, b) {
1709
+ return "✖ Error " + C + " while fetching file: " + b;
1710
1710
  }, A = "✖ Error: File does not exist or is empty", R = {
1711
1711
  js: "javascript",
1712
1712
  py: "python",
@@ -1717,52 +1717,52 @@ var c = Be.exports, nr = { exports: {} };
1717
1717
  bat: "batch",
1718
1718
  h: "c",
1719
1719
  tex: "latex"
1720
- }, s = "data-src-status", m = "loading", k = "loaded", S = "failed", I = "pre[data-src]:not([" + s + '="' + k + '"]):not([' + s + '="' + m + '"])';
1721
- function L(_, E, y) {
1720
+ }, s = "data-src-status", m = "loading", x = "loaded", w = "failed", F = "pre[data-src]:not([" + s + '="' + x + '"]):not([' + s + '="' + m + '"])';
1721
+ function L(C, b, S) {
1722
1722
  var r = new XMLHttpRequest();
1723
- r.open("GET", _, !0), r.onreadystatechange = function() {
1724
- r.readyState == 4 && (r.status < 400 && r.responseText ? E(r.responseText) : r.status >= 400 ? y(b(r.status, r.statusText)) : y(A));
1723
+ r.open("GET", C, !0), r.onreadystatechange = function() {
1724
+ r.readyState == 4 && (r.status < 400 && r.responseText ? b(r.responseText) : r.status >= 400 ? S(v(r.status, r.statusText)) : S(A));
1725
1725
  }, r.send(null);
1726
1726
  }
1727
- function U(_) {
1728
- var E = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_ || "");
1729
- if (E) {
1730
- var y = Number(E[1]), r = E[2], t = E[3];
1731
- return r ? t ? [y, Number(t)] : [y, void 0] : [y, y];
1727
+ function B(C) {
1728
+ var b = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(C || "");
1729
+ if (b) {
1730
+ var S = Number(b[1]), r = b[2], t = b[3];
1731
+ return r ? t ? [S, Number(t)] : [S, void 0] : [S, S];
1732
1732
  }
1733
1733
  }
1734
- n.hooks.add("before-highlightall", function(_) {
1735
- _.selector += ", " + I;
1736
- }), n.hooks.add("before-sanity-check", function(_) {
1737
- var E = (
1734
+ n.hooks.add("before-highlightall", function(C) {
1735
+ C.selector += ", " + F;
1736
+ }), n.hooks.add("before-sanity-check", function(C) {
1737
+ var b = (
1738
1738
  /** @type {HTMLPreElement} */
1739
- _.element
1739
+ C.element
1740
1740
  );
1741
- if (E.matches(I)) {
1742
- _.code = "", E.setAttribute(s, m);
1743
- var y = E.appendChild(document.createElement("CODE"));
1744
- y.textContent = u;
1745
- var r = E.getAttribute("data-src"), t = _.language;
1741
+ if (b.matches(F)) {
1742
+ C.code = "", b.setAttribute(s, m);
1743
+ var S = b.appendChild(document.createElement("CODE"));
1744
+ S.textContent = u;
1745
+ var r = b.getAttribute("data-src"), t = C.language;
1746
1746
  if (t === "none") {
1747
1747
  var i = (/\.(\w+)$/.exec(r) || [, "none"])[1];
1748
1748
  t = R[i] || i;
1749
1749
  }
1750
- n.util.setLanguage(y, t), n.util.setLanguage(E, t);
1751
- var o = n.plugins.autoloader;
1752
- o && o.loadLanguages(t), L(
1750
+ n.util.setLanguage(S, t), n.util.setLanguage(b, t);
1751
+ var l = n.plugins.autoloader;
1752
+ l && l.loadLanguages(t), L(
1753
1753
  r,
1754
- function(l) {
1755
- E.setAttribute(s, k);
1756
- var g = U(E.getAttribute("data-range"));
1757
- if (g) {
1758
- var x = l.split(/\r\n?|\n/g), f = g[0], N = g[1] == null ? x.length : g[1];
1759
- f < 0 && (f += x.length), f = Math.max(0, Math.min(f - 1, x.length)), N < 0 && (N += x.length), N = Math.max(0, Math.min(N, x.length)), l = x.slice(f, N).join(`
1760
- `), E.hasAttribute("data-start") || E.setAttribute("data-start", String(f + 1));
1754
+ function(o) {
1755
+ b.setAttribute(s, x);
1756
+ var f = B(b.getAttribute("data-range"));
1757
+ if (f) {
1758
+ var y = o.split(/\r\n?|\n/g), g = f[0], O = f[1] == null ? y.length : f[1];
1759
+ g < 0 && (g += y.length), g = Math.max(0, Math.min(g - 1, y.length)), O < 0 && (O += y.length), O = Math.max(0, Math.min(O, y.length)), o = y.slice(g, O).join(`
1760
+ `), b.hasAttribute("data-start") || b.setAttribute("data-start", String(g + 1));
1761
1761
  }
1762
- y.textContent = l, n.highlightElement(y);
1762
+ S.textContent = o, n.highlightElement(S);
1763
1763
  },
1764
- function(l) {
1765
- E.setAttribute(s, S), y.textContent = l;
1764
+ function(o) {
1765
+ b.setAttribute(s, w), S.textContent = o;
1766
1766
  }
1767
1767
  );
1768
1768
  }
@@ -1774,8 +1774,8 @@ var c = Be.exports, nr = { exports: {} };
1774
1774
  *
1775
1775
  * @param {ParentNode} [container=document]
1776
1776
  */
1777
- highlight: function(E) {
1778
- for (var y = (E || document).querySelectorAll(I), r = 0, t; t = y[r++]; )
1777
+ highlight: function(b) {
1778
+ for (var S = (b || document).querySelectorAll(F), r = 0, t; t = S[r++]; )
1779
1779
  n.highlightElement(t);
1780
1780
  }
1781
1781
  };
@@ -1784,9 +1784,9 @@ var c = Be.exports, nr = { exports: {} };
1784
1784
  Z || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), Z = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
1785
1785
  };
1786
1786
  }();
1787
- })(nr);
1788
- var Tr = nr.exports;
1789
- const ze = /* @__PURE__ */ wr(Tr);
1787
+ })(or);
1788
+ var Tr = or.exports;
1789
+ const Ve = /* @__PURE__ */ wr(Tr);
1790
1790
  Prism.languages.clike = {
1791
1791
  comment: [
1792
1792
  {
@@ -2582,7 +2582,7 @@ Prism.languages.sql = {
2582
2582
  lookbehind: !0
2583
2583
  }
2584
2584
  }, n.inside = p.languages.bash;
2585
- for (var b = [
2585
+ for (var v = [
2586
2586
  "comment",
2587
2587
  "function-name",
2588
2588
  "for-or-select",
@@ -2598,8 +2598,8 @@ Prism.languages.sql = {
2598
2598
  "operator",
2599
2599
  "punctuation",
2600
2600
  "number"
2601
- ], A = u.variable[1].inside, R = 0; R < b.length; R++)
2602
- A[b[R]] = p.languages.bash[b[R]];
2601
+ ], A = u.variable[1].inside, R = 0; R < v.length; R++)
2602
+ A[v[R]] = p.languages.bash[v[R]];
2603
2603
  p.languages.sh = p.languages.bash, p.languages.shell = p.languages.bash;
2604
2604
  })(Prism);
2605
2605
  Prism.languages.json = {
@@ -2789,13 +2789,13 @@ const Rr = `
2789
2789
  color: #333 !important;
2790
2790
  }
2791
2791
  `;
2792
- window.Prism = ze;
2792
+ window.Prism = Ve;
2793
2793
  function Fr(p) {
2794
2794
  if (typeof document > "u") return;
2795
2795
  const h = "hep-cr-prism-styles", n = document.getElementById(h), u = p === "dark" ? Rr : _r;
2796
2796
  n && n.remove();
2797
- const b = document.createElement("style");
2798
- b.id = h, b.textContent = u, document.head.appendChild(b);
2797
+ const v = document.createElement("style");
2798
+ v.id = h, v.textContent = u, document.head.appendChild(v);
2799
2799
  }
2800
2800
  const Ir = {
2801
2801
  javascript: "javascript",
@@ -2838,47 +2838,47 @@ const Nr = ({
2838
2838
  language: h,
2839
2839
  theme: n = "dark",
2840
2840
  disabled: u = !1,
2841
- onChange: b,
2841
+ onChange: v,
2842
2842
  onCodeChange: A
2843
2843
  }) => {
2844
- const R = Pe(null), s = Pe(null), m = Pe(null), k = Ae(() => Ir[h.toLowerCase()] || "javascript", [h]), S = n === "dark" ? "#1e1e1e" : "#fafafa", I = Ae(() => {
2844
+ const R = Le(null), s = Le(null), m = Le(null), x = _e(() => Ir[h.toLowerCase()] || "javascript", [h]), w = n === "dark" ? "#1e1e1e" : "#fafafa", F = _e(() => {
2845
2845
  try {
2846
- const E = ze.languages[k];
2847
- if (E)
2848
- return ze.highlight(p || "", E, k);
2846
+ const b = Ve.languages[x];
2847
+ if (b)
2848
+ return Ve.highlight(p || "", b, x);
2849
2849
  } catch {
2850
2850
  }
2851
2851
  return Or(p || "");
2852
- }, [p, k]), L = te((E) => {
2852
+ }, [p, x]), L = ue((b) => {
2853
2853
  m.current && clearTimeout(m.current), m.current = setTimeout(() => {
2854
- A == null || A(E);
2854
+ A == null || A(b);
2855
2855
  }, 500);
2856
- }, [A]), U = (E) => {
2857
- const y = E.target.value;
2858
- b == null || b(y), L(y);
2856
+ }, [A]), B = (b) => {
2857
+ const S = b.target.value;
2858
+ v == null || v(S), L(S);
2859
2859
  }, Z = () => {
2860
2860
  R.current && s.current && (s.current.scrollTop = R.current.scrollTop, s.current.scrollLeft = R.current.scrollLeft);
2861
- }, _ = (E) => {
2862
- if (E.key === "Tab") {
2863
- E.preventDefault();
2864
- const y = E.target, r = y.selectionStart, t = y.selectionEnd, i = p.substring(0, r) + " " + p.substring(t);
2865
- b == null || b(i), L(i), requestAnimationFrame(() => {
2866
- y.selectionStart = y.selectionEnd = r + 2;
2861
+ }, C = (b) => {
2862
+ if (b.key === "Tab") {
2863
+ b.preventDefault();
2864
+ const S = b.target, r = S.selectionStart, t = S.selectionEnd, i = p.substring(0, r) + " " + p.substring(t);
2865
+ v == null || v(i), L(i), requestAnimationFrame(() => {
2866
+ S.selectionStart = S.selectionEnd = r + 2;
2867
2867
  });
2868
2868
  }
2869
2869
  };
2870
- return Ne(() => () => {
2870
+ return ye(() => () => {
2871
2871
  m.current && clearTimeout(m.current);
2872
- }, []), Ne(() => {
2872
+ }, []), ye(() => {
2873
2873
  Fr(n);
2874
- }, [n]), /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: S }, children: [
2874
+ }, [n]), /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: w }, children: [
2875
2875
  /* @__PURE__ */ c.jsx(
2876
2876
  "pre",
2877
2877
  {
2878
2878
  ref: s,
2879
- className: `hep-cr-highlight language-${k}`,
2879
+ className: `hep-cr-highlight language-${x}`,
2880
2880
  "aria-hidden": "true",
2881
- children: /* @__PURE__ */ c.jsx("code", { dangerouslySetInnerHTML: { __html: I } })
2881
+ children: /* @__PURE__ */ c.jsx("code", { dangerouslySetInnerHTML: { __html: F } })
2882
2882
  }
2883
2883
  ),
2884
2884
  /* @__PURE__ */ c.jsx(
@@ -2888,15 +2888,15 @@ const Nr = ({
2888
2888
  className: "hep-cr-input",
2889
2889
  value: p,
2890
2890
  disabled: u,
2891
- onChange: U,
2891
+ onChange: B,
2892
2892
  onScroll: Z,
2893
- onKeyDown: _,
2893
+ onKeyDown: C,
2894
2894
  spellCheck: !1,
2895
2895
  placeholder: "Write your code here..."
2896
2896
  }
2897
2897
  )
2898
2898
  ] });
2899
- }, Cr = `
2899
+ }, Lr = `
2900
2900
  .hep-cr-editor {
2901
2901
  position: relative;
2902
2902
  flex: 1;
@@ -2958,18 +2958,18 @@ if (typeof document < "u") {
2958
2958
  const p = "hep-cr-editor-styles";
2959
2959
  if (!document.getElementById(p)) {
2960
2960
  const h = document.createElement("style");
2961
- h.id = p, h.textContent = Cr, document.head.appendChild(h);
2961
+ h.id = p, h.textContent = Lr, document.head.appendChild(h);
2962
2962
  }
2963
2963
  }
2964
- var Lr = Object.defineProperty, Pr = (p, h, n) => h in p ? Lr(p, h, { enumerable: !0, configurable: !0, writable: !0, value: n }) : p[h] = n, rr = (p, h, n) => Pr(p, typeof h != "symbol" ? h + "" : h, n);
2965
- let Ue = null;
2964
+ var Cr = Object.defineProperty, Pr = (p, h, n) => h in p ? Cr(p, h, { enumerable: !0, configurable: !0, writable: !0, value: n }) : p[h] = n, ar = (p, h, n) => Pr(p, typeof h != "symbol" ? h + "" : h, n);
2965
+ let We = null;
2966
2966
  class Dr {
2967
2967
  constructor(h = {}) {
2968
- rr(this, "baseUrl"), rr(this, "timeout"), this.baseUrl = h.pistonUrl || "/api/piston", this.timeout = h.timeout || 3e3;
2968
+ ar(this, "baseUrl"), ar(this, "timeout"), this.baseUrl = h.pistonUrl || "/api/piston", this.timeout = h.timeout || 3e3;
2969
2969
  }
2970
2970
  async getRuntimes(h = !1) {
2971
- if (Ue && !h)
2972
- return Ue;
2971
+ if (We && !h)
2972
+ return We;
2973
2973
  try {
2974
2974
  const n = await fetch(`${this.baseUrl}/runtimes`, {
2975
2975
  method: "GET",
@@ -2980,23 +2980,23 @@ class Dr {
2980
2980
  if (!n.ok)
2981
2981
  throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
2982
2982
  const u = await n.json();
2983
- return Ue = u, u;
2983
+ return We = u, u;
2984
2984
  } catch (n) {
2985
2985
  throw console.error("Failed to fetch runtimes:", n), n;
2986
2986
  }
2987
2987
  }
2988
2988
  async execute(h, n, u = {}) {
2989
- const b = (await this.getRuntimes()).find(
2989
+ const v = (await this.getRuntimes()).find(
2990
2990
  (m) => {
2991
- var k;
2992
- return m.language.toLowerCase() === h.toLowerCase() || ((k = m.aliases) == null ? void 0 : k.some((S) => S.toLowerCase() === h.toLowerCase()));
2991
+ var x;
2992
+ return m.language.toLowerCase() === h.toLowerCase() || ((x = m.aliases) == null ? void 0 : x.some((w) => w.toLowerCase() === h.toLowerCase()));
2993
2993
  }
2994
2994
  );
2995
- if (!b)
2995
+ if (!v)
2996
2996
  throw new Error(`Language '${h}' is not supported`);
2997
2997
  const A = this.getFileName(h), R = {
2998
- language: b.language,
2999
- version: u.version || b.version,
2998
+ language: v.language,
2999
+ version: u.version || v.version,
3000
3000
  files: [
3001
3001
  {
3002
3002
  name: A,
@@ -3018,17 +3018,17 @@ class Dr {
3018
3018
  });
3019
3019
  if (!m.ok)
3020
3020
  throw new Error(`Execute failed: ${m.statusText}`);
3021
- const k = await m.json(), S = Date.now() - s, I = k.run.stdout || "", L = k.run.stderr || "";
3021
+ const x = await m.json(), w = Date.now() - s, F = x.run.stdout || "", L = x.run.stderr || "";
3022
3022
  return {
3023
- success: k.run.code === 0,
3024
- output: I,
3023
+ success: x.run.code === 0,
3024
+ output: F,
3025
3025
  stderr: L,
3026
- code: k.run.code,
3027
- executionTime: S,
3028
- compile: k.compile ? {
3029
- stdout: k.compile.stdout || "",
3030
- stderr: k.compile.stderr || "",
3031
- code: k.compile.code
3026
+ code: x.run.code,
3027
+ executionTime: w,
3028
+ compile: x.compile ? {
3029
+ stdout: x.compile.stdout || "",
3030
+ stderr: x.compile.stderr || "",
3031
+ code: x.compile.code
3032
3032
  } : void 0
3033
3033
  };
3034
3034
  } catch (m) {
@@ -3169,7 +3169,7 @@ h1 {
3169
3169
 
3170
3170
  This is a sample markdown document.`
3171
3171
  };
3172
- function He(p) {
3172
+ function Ge(p) {
3173
3173
  const h = p.toLowerCase();
3174
3174
  return jr[h] || `// ${p}
3175
3175
  // Write your code here`;
@@ -3179,138 +3179,152 @@ const $r = ({
3179
3179
  language: h = "javascript",
3180
3180
  theme: n = "light",
3181
3181
  themeColor: u = "",
3182
- showLanguageSelector: b = !0,
3182
+ showLanguageSelector: v = !0,
3183
3183
  showEditor: A = !0,
3184
3184
  editable: R = !0,
3185
3185
  defaultCode: s = "",
3186
3186
  executorLabel: m = "运行",
3187
- onExecuteStart: k,
3188
- onExecuteEnd: S,
3189
- onLanguageChange: I,
3187
+ onExecuteStart: x,
3188
+ onExecuteEnd: w,
3189
+ onLanguageChange: F,
3190
3190
  onChange: L
3191
3191
  }) => {
3192
- const [U, Z] = X([]), [_, E] = X(h), [y, r] = X(n), [t, i] = X(s), [o, l] = X(""), [g, x] = X(""), [f, N] = X(!1), [j, W] = X(null), [H, G] = X("stdout"), [ne, ae] = X(null), [ue, D] = X(!0), [z, re] = X(60), [J, B] = X(!1), [le, q] = X(!1), Q = Ae(() => new Dr({ pistonUrl: p }), [p]), ie = Ae(() => U.map((F) => ({
3193
- value: `${F.language}:${F.version}`,
3194
- label: `${F.language.charAt(0).toUpperCase() + F.language.slice(1)} ${F.version}`
3195
- })), [U]), oe = Ae(() => {
3192
+ const B = "hep-cr-default-language", Z = () => typeof window > "u" ? h : localStorage.getItem(B) || h, C = () => {
3193
+ typeof window < "u" && localStorage.setItem(B, r);
3194
+ }, [b, S] = Y([]), [r, t] = Y(Z()), [i, l] = Y(n), [o, f] = Y(s), [y, g] = Y(""), [O, D] = Y(""), [j, V] = Y(!1), [q, ae] = Y(null), [ie, oe] = Y("stdout"), [P, H] = Y(null), [X, se] = Y(!0), [z, xe] = Y(60), [W, le] = Y(!1), [J, re] = Y(!1), te = Le(!1), ne = _e(() => new Dr({ pistonUrl: p }), [p]), ce = _e(() => b.map((_) => ({
3195
+ value: `${_.language}:${_.version}`,
3196
+ label: `${_.language.charAt(0).toUpperCase() + _.language.slice(1)} ${_.version}`
3197
+ })), [b]), de = _e(() => {
3196
3198
  if (!u) return {};
3197
- const F = n === "dark", P = (Fe, ve) => {
3198
- const fe = parseInt(Fe.replace("#", ""), 16), ge = Math.round(2.55 * ve), ke = Math.min(255, Math.max(0, (fe >> 16) + ge)), Ce = Math.min(255, Math.max(0, (fe >> 8 & 255) + ge)), Le = Math.min(255, Math.max(0, (fe & 255) + ge));
3199
- return "#" + (16777216 + ke * 65536 + Ce * 256 + Le).toString(16).slice(1);
3200
- }, _e = ((Fe) => {
3201
- const ve = parseInt(Fe.replace("#", ""), 16), fe = ve >> 16 & 255, ge = ve >> 8 & 255, ke = ve & 255;
3202
- return (0.299 * fe + 0.587 * ge + 0.114 * ke) / 255 > 0.5;
3199
+ const _ = n === "dark", M = (Ae, ve) => {
3200
+ const fe = parseInt(Ae.replace("#", ""), 16), ge = Math.round(2.55 * ve), Ie = Math.min(255, Math.max(0, (fe >> 16) + ge)), je = Math.min(255, Math.max(0, (fe >> 8 & 255) + ge)), Me = Math.min(255, Math.max(0, (fe & 255) + ge));
3201
+ return "#" + (16777216 + Ie * 65536 + je * 256 + Me).toString(16).slice(1);
3202
+ }, De = ((Ae) => {
3203
+ const ve = parseInt(Ae.replace("#", ""), 16), fe = ve >> 16 & 255, ge = ve >> 8 & 255, Ie = ve & 255;
3204
+ return (0.299 * fe + 0.587 * ge + 0.114 * Ie) / 255 > 0.5;
3203
3205
  })(u) ? "#000" : "#fff";
3204
3206
  return {
3205
3207
  "--hep-cr-theme-color": u,
3206
- "--hep-cr-theme-color-hover": F ? P(u, 20) : P(u, -20),
3207
- "--hep-cr-tab-active-color": _e
3208
+ "--hep-cr-theme-color-hover": _ ? M(u, 20) : M(u, -20),
3209
+ "--hep-cr-tab-active-color": De
3208
3210
  };
3209
- }, [u, n]), Y = Ae(() => _.includes(":") ? _.split(":")[0] : _, [_]);
3210
- Ne(() => {
3211
- async function F() {
3212
- D(!0), ae(null);
3211
+ }, [u, n]), Q = _e(() => r.includes(":") ? r.split(":")[0] : r, [r]);
3212
+ ye(() => {
3213
+ async function _() {
3214
+ se(!0), H(null);
3213
3215
  try {
3214
- const P = await Q.getRuntimes();
3215
- Z(P);
3216
- } catch (P) {
3217
- ae(P instanceof Error ? P.message : "Failed to load runtimes");
3216
+ const M = await ne.getRuntimes();
3217
+ S(M);
3218
+ } catch (M) {
3219
+ H(M instanceof Error ? M.message : "Failed to load runtimes");
3218
3220
  } finally {
3219
- D(!1);
3221
+ se(!1);
3220
3222
  }
3221
3223
  }
3222
- F();
3223
- }, [Q]), Ne(() => {
3224
- !t && U.length > 0 && i(s || He(Y));
3225
- }, [U, t, s, Y]);
3226
- const de = te(
3227
- (F) => {
3228
- const P = F.target.value, he = P.includes(":") ? P.split(":")[0] : P;
3229
- E(P);
3230
- const be = He(he);
3231
- i(be), I == null || I(he, be);
3224
+ _();
3225
+ }, [ne]), ye(() => {
3226
+ !o && b.length > 0 && f(s || Ge(Q));
3227
+ }, [b, o, s, Q]), ye(() => {
3228
+ L == null || L(o);
3229
+ }, []), ye(() => {
3230
+ !X && b.length > 0 && F && !te.current && (te.current = !0, F(Q, o));
3231
+ }, [X, b.length]);
3232
+ const me = ue(
3233
+ (_) => {
3234
+ const M = _.target.value, pe = M.includes(":") ? M.split(":")[0] : M;
3235
+ t(M);
3236
+ const he = Ge(pe);
3237
+ f(he), F == null || F(pe, he);
3232
3238
  },
3233
- [I]
3234
- ), se = te(async () => {
3235
- if (!f) {
3236
- N(!0), l(""), x(""), W(null), ae(null), G("stdout"), k == null || k();
3239
+ [F]
3240
+ ), $e = ue(async () => {
3241
+ if (!j) {
3242
+ V(!0), g(""), D(""), ae(null), H(null), oe("stdout"), x == null || x();
3237
3243
  try {
3238
- const F = await Q.execute(Y, t);
3239
- l(F.output), x(F.stderr), W(F.executionTime || null), G(F.stderr ? "stderr" : "stdout"), S == null || S(F);
3240
- } catch (F) {
3241
- const P = F instanceof Error ? F.message : "Execution failed";
3242
- ae(P), S == null || S({
3244
+ const _ = await ne.execute(Q, o);
3245
+ g(_.output), D(_.stderr), ae(_.executionTime || null), oe(_.stderr ? "stderr" : "stdout"), w == null || w(_);
3246
+ } catch (_) {
3247
+ const M = _ instanceof Error ? _.message : "Execution failed";
3248
+ H(M), w == null || w({
3243
3249
  success: !1,
3244
3250
  output: "",
3245
- stderr: P,
3251
+ stderr: M,
3246
3252
  code: -1
3247
3253
  });
3248
3254
  } finally {
3249
- N(!1);
3255
+ V(!1);
3250
3256
  }
3251
3257
  }
3252
- }, [f, _, t, Q, k, S]);
3253
- te(() => {
3254
- l(""), x(""), W(null), ae(null);
3255
- }, []);
3256
- const pe = te(async () => {
3257
- await navigator.clipboard.writeText(t), B(!0), setTimeout(() => {
3258
- B(!1);
3258
+ }, [j, r, o, ne, x, w]), ke = ue(async () => {
3259
+ await navigator.clipboard.writeText(o), le(!0), setTimeout(() => {
3260
+ le(!1);
3259
3261
  }, 2e3);
3260
- }, [t]), ye = te(async () => {
3261
- const F = H === "stdout" ? o : g;
3262
- await navigator.clipboard.writeText(F), q(!0), setTimeout(() => {
3263
- q(!1);
3262
+ }, [o]), be = ue(async () => {
3263
+ const _ = ie === "stdout" ? y : O;
3264
+ await navigator.clipboard.writeText(_), re(!0), setTimeout(() => {
3265
+ re(!1);
3264
3266
  }, 2e3);
3265
- }, [H, o, g]), me = te(() => {
3266
- i(He(Y));
3267
- }, [_]), Te = Pe(!1), xe = te((F) => {
3268
- Te.current = !0, document.addEventListener("mousemove", ce), document.addEventListener("mouseup", Re), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
3269
- }, []), ce = te((F) => {
3270
- if (!Te.current) return;
3271
- const P = document.querySelector(".hep-cr-main");
3272
- if (!P) return;
3273
- const he = P.getBoundingClientRect(), be = (F.clientX - he.left) / he.width * 100;
3274
- re(Math.max(20, Math.min(80, be)));
3275
- }, []), Re = te(() => {
3276
- Te.current = !1, document.removeEventListener("mousemove", ce), document.removeEventListener("mouseup", Re), document.body.style.cursor = "", document.body.style.userSelect = "";
3277
- }, [ce]);
3278
- return /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${y}`, style: oe, children: [
3267
+ }, [ie, y, O]), Ce = ue(() => {
3268
+ f(Ge(Q));
3269
+ }, [r]), we = Le(!1), Se = ue((_) => {
3270
+ we.current = !0, document.addEventListener("mousemove", Fe), document.addEventListener("mouseup", Pe), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
3271
+ }, []), Fe = ue((_) => {
3272
+ if (!we.current) return;
3273
+ const M = document.querySelector(".hep-cr-main");
3274
+ if (!M) return;
3275
+ const pe = M.getBoundingClientRect(), he = (_.clientX - pe.left) / pe.width * 100;
3276
+ xe(Math.max(20, Math.min(80, he)));
3277
+ }, []), Pe = ue(() => {
3278
+ we.current = !1, document.removeEventListener("mousemove", Fe), document.removeEventListener("mouseup", Pe), document.body.style.cursor = "", document.body.style.userSelect = "";
3279
+ }, [Fe]);
3280
+ return /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${i}`, style: de, children: [
3279
3281
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-header", children: [
3280
- /* @__PURE__ */ c.jsx("div", { className: "hep-cr-controls", children: b && /* @__PURE__ */ c.jsxs(
3281
- "select",
3282
- {
3283
- value: _,
3284
- onChange: de,
3285
- className: "hep-cr-language-select",
3286
- disabled: f,
3287
- children: [
3288
- ue && /* @__PURE__ */ c.jsx("option", { value: "", children: "加载中..." }),
3289
- ie.map((F) => /* @__PURE__ */ c.jsx("option", { value: F.value, children: F.label }, F.value))
3290
- ]
3291
- }
3292
- ) }),
3282
+ /* @__PURE__ */ c.jsx("div", { className: "hep-cr-controls", children: v && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
3283
+ /* @__PURE__ */ c.jsxs(
3284
+ "select",
3285
+ {
3286
+ value: r,
3287
+ onChange: me,
3288
+ className: "hep-cr-language-select",
3289
+ disabled: j,
3290
+ children: [
3291
+ X && /* @__PURE__ */ c.jsx("option", { value: "", children: "加载中..." }),
3292
+ ce.map((_) => /* @__PURE__ */ c.jsx("option", { value: _.value, children: _.label }, _.value))
3293
+ ]
3294
+ }
3295
+ ),
3296
+ /* @__PURE__ */ c.jsx(
3297
+ "button",
3298
+ {
3299
+ className: "hep-cr-btn hep-cr-btn-set-default",
3300
+ disabled: j,
3301
+ onClick: C,
3302
+ title: "设为默认语言",
3303
+ children: "★"
3304
+ }
3305
+ )
3306
+ ] }) }),
3293
3307
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-actions", children: [
3294
3308
  /* @__PURE__ */ c.jsxs(
3295
3309
  "button",
3296
3310
  {
3297
3311
  className: "hep-cr-btn hep-cr-btn-run",
3298
- disabled: f || ue,
3299
- onClick: se,
3312
+ disabled: j || X,
3313
+ onClick: $e,
3300
3314
  children: [
3301
- f ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-spinner" }) : /* @__PURE__ */ c.jsx("span", { className: "hep-cr-run-icon", children: "▶" }),
3302
- f ? "运行中..." : m
3315
+ j ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-spinner" }) : /* @__PURE__ */ c.jsx("span", { className: "hep-cr-run-icon", children: "▶" }),
3316
+ j ? "运行中..." : m
3303
3317
  ]
3304
3318
  }
3305
3319
  ),
3306
- A && R && /* @__PURE__ */ c.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: me, children: "重置" }),
3320
+ A && R && /* @__PURE__ */ c.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: Ce, children: "重置" }),
3307
3321
  /* @__PURE__ */ c.jsx(
3308
3322
  "button",
3309
3323
  {
3310
3324
  className: "hep-cr-btn hep-cr-btn-theme",
3311
- onClick: () => r(y === "light" ? "dark" : "light"),
3312
- title: y === "light" ? "Switch to dark mode" : "Switch to light mode",
3313
- children: y === "light" ? /* @__PURE__ */ c.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ c.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : /* @__PURE__ */ c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3325
+ onClick: () => l(i === "light" ? "dark" : "light"),
3326
+ title: i === "light" ? "Switch to dark mode" : "Switch to light mode",
3327
+ children: i === "light" ? /* @__PURE__ */ c.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ c.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : /* @__PURE__ */ c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
3314
3328
  /* @__PURE__ */ c.jsx("circle", { cx: "12", cy: "12", r: "5" }),
3315
3329
  /* @__PURE__ */ c.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
3316
3330
  /* @__PURE__ */ c.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
@@ -3325,21 +3339,21 @@ const $r = ({
3325
3339
  )
3326
3340
  ] })
3327
3341
  ] }),
3328
- ne && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-error-message", children: ne }),
3342
+ P && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-error-message", children: P }),
3329
3343
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-main", children: [
3330
3344
  A && /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${z}%` }, children: [
3331
3345
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-panel-header", children: [
3332
3346
  /* @__PURE__ */ c.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
3333
3347
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
3334
- /* @__PURE__ */ c.jsx("span", { className: "hep-cr-language-badge", children: Y }),
3348
+ /* @__PURE__ */ c.jsx("span", { className: "hep-cr-language-badge", children: Q }),
3335
3349
  /* @__PURE__ */ c.jsx(
3336
3350
  "button",
3337
3351
  {
3338
- className: `hep-cr-btn-icon ${J ? "hep-cr-btn-copied" : ""}`,
3339
- disabled: J,
3340
- onClick: pe,
3341
- title: J ? "已复制" : "复制",
3342
- children: J ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
3352
+ className: `hep-cr-btn-icon ${W ? "hep-cr-btn-copied" : ""}`,
3353
+ disabled: W,
3354
+ onClick: ke,
3355
+ title: W ? "已复制" : "复制",
3356
+ children: W ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
3343
3357
  "svg",
3344
3358
  {
3345
3359
  width: "14",
@@ -3361,16 +3375,16 @@ const $r = ({
3361
3375
  /* @__PURE__ */ c.jsx(
3362
3376
  Nr,
3363
3377
  {
3364
- value: t,
3365
- language: Y,
3366
- theme: y,
3367
- disabled: !R || f,
3368
- onChange: i,
3378
+ value: o,
3379
+ language: Q,
3380
+ theme: i,
3381
+ disabled: !R || j,
3382
+ onChange: f,
3369
3383
  onCodeChange: L
3370
3384
  }
3371
3385
  )
3372
3386
  ] }),
3373
- A && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: xe, children: /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-line" }) }),
3387
+ A && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: Se, children: /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-line" }) }),
3374
3388
  /* @__PURE__ */ c.jsxs(
3375
3389
  "div",
3376
3390
  {
@@ -3382,33 +3396,33 @@ const $r = ({
3382
3396
  /* @__PURE__ */ c.jsx(
3383
3397
  "button",
3384
3398
  {
3385
- className: `hep-cr-tab ${H === "stdout" ? "active" : ""}`,
3386
- onClick: () => G("stdout"),
3399
+ className: `hep-cr-tab ${ie === "stdout" ? "active" : ""}`,
3400
+ onClick: () => oe("stdout"),
3387
3401
  children: "输出"
3388
3402
  }
3389
3403
  ),
3390
- g && /* @__PURE__ */ c.jsx(
3404
+ O && /* @__PURE__ */ c.jsx(
3391
3405
  "button",
3392
3406
  {
3393
- className: `hep-cr-tab hep-cr-tab-error ${H === "stderr" ? "active" : ""}`,
3394
- onClick: () => G("stderr"),
3407
+ className: `hep-cr-tab hep-cr-tab-error ${ie === "stderr" ? "active" : ""}`,
3408
+ onClick: () => oe("stderr"),
3395
3409
  children: "错误"
3396
3410
  }
3397
3411
  )
3398
3412
  ] }),
3399
3413
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
3400
- j !== null && /* @__PURE__ */ c.jsxs("span", { className: "hep-cr-execution-time", children: [
3401
- j,
3414
+ q !== null && /* @__PURE__ */ c.jsxs("span", { className: "hep-cr-execution-time", children: [
3415
+ q,
3402
3416
  "ms"
3403
3417
  ] }),
3404
3418
  /* @__PURE__ */ c.jsx(
3405
3419
  "button",
3406
3420
  {
3407
- className: `hep-cr-btn-icon ${le ? "hep-cr-btn-copied" : ""}`,
3408
- disabled: le,
3409
- onClick: ye,
3410
- title: le ? "已复制" : "复制",
3411
- children: le ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
3421
+ className: `hep-cr-btn-icon ${J ? "hep-cr-btn-copied" : ""}`,
3422
+ disabled: J,
3423
+ onClick: be,
3424
+ title: J ? "已复制" : "复制",
3425
+ children: J ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
3412
3426
  "svg",
3413
3427
  {
3414
3428
  width: "14",
@@ -3427,7 +3441,7 @@ const $r = ({
3427
3441
  )
3428
3442
  ] })
3429
3443
  ] }),
3430
- /* @__PURE__ */ c.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ c.jsx("pre", { children: H === "stdout" ? f ? "代码执行中..." : o || '点击"运行"执行代码' : g }) })
3444
+ /* @__PURE__ */ c.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ c.jsx("pre", { children: ie === "stdout" ? j ? "代码执行中..." : y || '点击"运行"执行代码' : O }) })
3431
3445
  ]
3432
3446
  }
3433
3447
  )
@@ -3492,6 +3506,18 @@ const $r = ({
3492
3506
  .hep-cr-runner-light .hep-cr-btn-theme { color: #f57c00; }
3493
3507
  .hep-cr-btn-theme:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
3494
3508
  .hep-cr-runner-light .hep-cr-btn-theme:hover { background: rgba(0, 0, 0, 0.05); }
3509
+ .hep-cr-btn-set-default {
3510
+ background: transparent;
3511
+ color: #888;
3512
+ padding: 6px 10px;
3513
+ font-size: 16px;
3514
+ line-height: 1;
3515
+ min-height: 28px;
3516
+ height: auto;
3517
+ }
3518
+ .hep-cr-runner-light .hep-cr-btn-set-default { color: #bbb; }
3519
+ .hep-cr-btn-set-default:hover:not(:disabled) { color: #fdd835; background: transparent; }
3520
+ .hep-cr-runner-light .hep-cr-btn-set-default:hover:not(:disabled) { color: #f57c00; }
3495
3521
  .hep-cr-error-message {
3496
3522
  padding: 10px 16px;
3497
3523
  background: #c62828;
@@ -3668,29 +3694,29 @@ const $r = ({
3668
3694
  defaultOpen: h = !1,
3669
3695
  title: n = "代码执行器",
3670
3696
  width: u = 800,
3671
- onClose: b,
3697
+ onClose: v,
3672
3698
  footer: A,
3673
3699
  theme: R = "light",
3674
3700
  ...s
3675
3701
  }, m) => {
3676
- const [k, S] = X(h), I = p !== void 0, L = I ? p : k;
3677
- Ne(() => {
3678
- I && p !== k && S(p);
3679
- }, [p, I]);
3680
- const U = te(() => {
3681
- I || S(!1), b == null || b();
3682
- }, [I, b]), Z = (E) => {
3683
- E.target === E.currentTarget && U();
3702
+ const [x, w] = Y(h), F = p !== void 0, L = F ? p : x;
3703
+ ye(() => {
3704
+ F && p !== x && w(p);
3705
+ }, [p, F]);
3706
+ const B = ue(() => {
3707
+ F || w(!1), v == null || v();
3708
+ }, [F, v]), Z = (b) => {
3709
+ b.target === b.currentTarget && B();
3684
3710
  };
3685
3711
  kr(m, () => ({
3686
- close: U
3712
+ close: B
3687
3713
  }));
3688
- const _ = typeof u == "number" ? `${u}px` : u;
3714
+ const C = typeof u == "number" ? `${u}px` : u;
3689
3715
  return L ? /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: Z, children: [
3690
- /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-container", style: { width: _ }, children: [
3716
+ /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-container", style: { width: C }, children: [
3691
3717
  /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-header", children: [
3692
3718
  /* @__PURE__ */ c.jsx("h3", { className: "hep-cr-dialog-title", children: n }),
3693
- /* @__PURE__ */ c.jsx("button", { className: "hep-cr-dialog-close", onClick: U, children: /* @__PURE__ */ c.jsxs(
3719
+ /* @__PURE__ */ c.jsx("button", { className: "hep-cr-dialog-close", onClick: B, children: /* @__PURE__ */ c.jsxs(
3694
3720
  "svg",
3695
3721
  {
3696
3722
  width: "16",