@hep-code-runner/vue3 1.0.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { defineComponent as ue, useCssVars as he, ref as C, computed as G, onMounted as ce, watch as de, openBlock as x, createElementBlock as N, normalizeClass as W, createElementVNode as A, withDirectives as be, createCommentVNode as H, Fragment as Ee, renderList as ve, toDisplayString as B, vModelSelect as ye, createTextVNode as Ae, normalizeStyle as ie, createVNode as Se } from "vue";
2
- var we = Object.defineProperty, Te = (o, d, a) => d in o ? we(o, d, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[d] = a, oe = (o, d, a) => Te(o, typeof d != "symbol" ? d + "" : d, a);
3
- let te = null;
4
- class ke {
5
- constructor(d = {}) {
6
- oe(this, "baseUrl"), oe(this, "timeout"), this.baseUrl = d.pistonUrl || "/api/piston", this.timeout = d.timeout || 3e3;
1
+ import { defineComponent as oe, useCssVars as be, ref as L, computed as G, onMounted as ge, watch as le, openBlock as F, createElementBlock as R, normalizeClass as W, createElementVNode as E, withDirectives as Ee, createCommentVNode as U, Fragment as ve, renderList as ye, toDisplayString as H, vModelSelect as Ae, createTextVNode as Se, normalizeStyle as se, createVNode as ie, createBlock as we, Teleport as Te, Transition as ke, withCtx as Ie, normalizeProps as _e, guardReactiveProps as Fe, renderSlot as Re } from "vue";
2
+ var xe = Object.defineProperty, Oe = (o, c, a) => c in o ? xe(o, c, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[c] = a, ce = (o, c, a) => Oe(o, typeof c != "symbol" ? c + "" : c, a);
3
+ let ae = null;
4
+ class Ne {
5
+ constructor(c = {}) {
6
+ ce(this, "baseUrl"), ce(this, "timeout"), this.baseUrl = c.pistonUrl || "/api/piston", this.timeout = c.timeout || 3e3;
7
7
  }
8
- async getRuntimes(d = !1) {
9
- if (te && !d)
10
- return te;
8
+ async getRuntimes(c = !1) {
9
+ if (ae && !c)
10
+ return ae;
11
11
  try {
12
12
  const a = await fetch(`${this.baseUrl}/runtimes`, {
13
13
  method: "GET",
@@ -18,26 +18,26 @@ class ke {
18
18
  if (!a.ok)
19
19
  throw new Error(`Failed to fetch runtimes: ${a.statusText}`);
20
20
  const l = await a.json();
21
- return te = l, l;
21
+ return ae = l, l;
22
22
  } catch (a) {
23
23
  throw console.error("Failed to fetch runtimes:", a), a;
24
24
  }
25
25
  }
26
- async execute(d, a, l = {}) {
27
- const b = (await this.getRuntimes()).find(
26
+ async execute(c, a, l = {}) {
27
+ const m = (await this.getRuntimes()).find(
28
28
  (f) => {
29
- var S;
30
- return f.language.toLowerCase() === d.toLowerCase() || ((S = f.aliases) == null ? void 0 : S.some((k) => k.toLowerCase() === d.toLowerCase()));
29
+ var h;
30
+ return f.language.toLowerCase() === c.toLowerCase() || ((h = f.aliases) == null ? void 0 : h.some((k) => k.toLowerCase() === c.toLowerCase()));
31
31
  }
32
32
  );
33
- if (!b)
34
- throw new Error(`Language '${d}' is not supported`);
35
- const v = this.getFileName(d), E = {
36
- language: b.language,
37
- version: l.version || b.version,
33
+ if (!m)
34
+ throw new Error(`Language '${c}' is not supported`);
35
+ const y = this.getFileName(c), A = {
36
+ language: m.language,
37
+ version: l.version || m.version,
38
38
  files: [
39
39
  {
40
- name: v,
40
+ name: y,
41
41
  content: a
42
42
  }
43
43
  ],
@@ -45,28 +45,28 @@ class ke {
45
45
  args: l.args || [],
46
46
  run_timeout: l.runTimeout || this.timeout,
47
47
  compile_timeout: this.timeout
48
- }, i = Date.now();
48
+ }, s = Date.now();
49
49
  try {
50
50
  const f = await fetch(`${this.baseUrl}/execute`, {
51
51
  method: "POST",
52
52
  headers: {
53
53
  "Content-Type": "application/json"
54
54
  },
55
- body: JSON.stringify(E)
55
+ body: JSON.stringify(A)
56
56
  });
57
57
  if (!f.ok)
58
58
  throw new Error(`Execute failed: ${f.statusText}`);
59
- const S = await f.json(), k = Date.now() - i, O = S.run.stdout || "", I = S.run.stderr || "";
59
+ const h = await f.json(), k = Date.now() - s, N = h.run.stdout || "", I = h.run.stderr || "";
60
60
  return {
61
- success: S.run.code === 0,
62
- output: O,
61
+ success: h.run.code === 0,
62
+ output: N,
63
63
  stderr: I,
64
- code: S.run.code,
64
+ code: h.run.code,
65
65
  executionTime: k,
66
- compile: S.compile ? {
67
- stdout: S.compile.stdout || "",
68
- stderr: S.compile.stderr || "",
69
- code: S.compile.code
66
+ compile: h.compile ? {
67
+ stdout: h.compile.stdout || "",
68
+ stderr: h.compile.stderr || "",
69
+ code: h.compile.code
70
70
  } : void 0
71
71
  };
72
72
  } catch (f) {
@@ -75,11 +75,11 @@ class ke {
75
75
  output: "",
76
76
  stderr: f instanceof Error ? f.message : "Unknown error",
77
77
  code: -1,
78
- executionTime: Date.now() - i
78
+ executionTime: Date.now() - s
79
79
  };
80
80
  }
81
81
  }
82
- getFileName(d) {
82
+ getFileName(c) {
83
83
  return {
84
84
  javascript: "main.js",
85
85
  typescript: "main.ts",
@@ -106,10 +106,10 @@ class ke {
106
106
  css: "style.css",
107
107
  sql: "query.sql",
108
108
  markdown: "readme.md"
109
- }[d.toLowerCase()] || `main.${d}`;
109
+ }[c.toLowerCase()] || `main.${c}`;
110
110
  }
111
111
  }
112
- const Ie = {
112
+ const Le = {
113
113
  javascript: 'console.log("Hello, World!");',
114
114
  typescript: 'console.log("Hello, World!");',
115
115
  python: 'print("Hello, World!")',
@@ -207,18 +207,18 @@ h1 {
207
207
 
208
208
  This is a sample markdown document.`
209
209
  };
210
- function ae(o) {
211
- const d = o.toLowerCase();
212
- return Ie[d] || `// ${o}
210
+ function ne(o) {
211
+ const c = o.toLowerCase();
212
+ return Le[c] || `// ${o}
213
213
  // Write your code here`;
214
214
  }
215
- var le = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
216
- function Fe(o) {
215
+ var pe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
216
+ function Ce(o) {
217
217
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
218
218
  }
219
- var pe = { exports: {} };
219
+ var me = { exports: {} };
220
220
  (function(o) {
221
- var d = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
221
+ var c = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
222
222
  /**
223
223
  * Prism: Lightweight, robust, elegant syntax highlighting
224
224
  *
@@ -228,7 +228,7 @@ var pe = { exports: {} };
228
228
  * @public
229
229
  */
230
230
  var a = function(l) {
231
- var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, v = 0, E = {}, i = {
231
+ var m = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, y = 0, A = {}, s = {
232
232
  /**
233
233
  * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
234
234
  * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
@@ -312,7 +312,7 @@ var pe = { exports: {} };
312
312
  * @returns {number}
313
313
  */
314
314
  objId: function(t) {
315
- return t.__id || Object.defineProperty(t, "__id", { value: ++v }), t.__id;
315
+ return t.__id || Object.defineProperty(t, "__id", { value: ++y }), t.__id;
316
316
  },
317
317
  /**
318
318
  * Creates a deep clone of the given object.
@@ -326,24 +326,24 @@ var pe = { exports: {} };
326
326
  */
327
327
  clone: function t(e, n) {
328
328
  n = n || {};
329
- var r, s;
330
- switch (i.util.type(e)) {
329
+ var r, i;
330
+ switch (s.util.type(e)) {
331
331
  case "Object":
332
- if (s = i.util.objId(e), n[s])
333
- return n[s];
332
+ if (i = s.util.objId(e), n[i])
333
+ return n[i];
334
334
  r = /** @type {Record<string, any>} */
335
- {}, n[s] = r;
336
- for (var c in e)
337
- e.hasOwnProperty(c) && (r[c] = t(e[c], n));
335
+ {}, n[i] = r;
336
+ for (var d in e)
337
+ e.hasOwnProperty(d) && (r[d] = t(e[d], n));
338
338
  return (
339
339
  /** @type {any} */
340
340
  r
341
341
  );
342
342
  case "Array":
343
- return s = i.util.objId(e), n[s] ? n[s] : (r = [], n[s] = r, /** @type {Array} */
343
+ return i = s.util.objId(e), n[i] ? n[i] : (r = [], n[i] = r, /** @type {Array} */
344
344
  /** @type {any} */
345
- e.forEach(function(m, u) {
346
- r[u] = t(m, n);
345
+ e.forEach(function(b, u) {
346
+ r[u] = t(b, n);
347
347
  }), /** @type {any} */
348
348
  r);
349
349
  default:
@@ -360,7 +360,7 @@ var pe = { exports: {} };
360
360
  */
361
361
  getLanguage: function(t) {
362
362
  for (; t; ) {
363
- var e = b.exec(t.className);
363
+ var e = m.exec(t.className);
364
364
  if (e)
365
365
  return e[1].toLowerCase();
366
366
  t = t.parentElement;
@@ -375,7 +375,7 @@ var pe = { exports: {} };
375
375
  * @returns {void}
376
376
  */
377
377
  setLanguage: function(t, e) {
378
- t.className = t.className.replace(RegExp(b, "gi"), ""), t.classList.add("language-" + e);
378
+ t.className = t.className.replace(RegExp(m, "gi"), ""), t.classList.add("language-" + e);
379
379
  },
380
380
  /**
381
381
  * Returns the script element that is currently executing.
@@ -426,10 +426,10 @@ var pe = { exports: {} };
426
426
  */
427
427
  isActive: function(t, e, n) {
428
428
  for (var r = "no-" + e; t; ) {
429
- var s = t.classList;
430
- if (s.contains(e))
429
+ var i = t.classList;
430
+ if (i.contains(e))
431
431
  return !0;
432
- if (s.contains(r))
432
+ if (i.contains(r))
433
433
  return !1;
434
434
  t = t.parentElement;
435
435
  }
@@ -447,10 +447,10 @@ var pe = { exports: {} };
447
447
  /**
448
448
  * The grammar for plain, unformatted text.
449
449
  */
450
- plain: E,
451
- plaintext: E,
452
- text: E,
453
- txt: E,
450
+ plain: A,
451
+ plaintext: A,
452
+ text: A,
453
+ txt: A,
454
454
  /**
455
455
  * Creates a deep copy of the language with the given id and appends the given tokens.
456
456
  *
@@ -480,7 +480,7 @@ var pe = { exports: {} };
480
480
  * });
481
481
  */
482
482
  extend: function(t, e) {
483
- var n = i.util.clone(i.languages[t]);
483
+ var n = s.util.clone(s.languages[t]);
484
484
  for (var r in e)
485
485
  n[r] = e[r];
486
486
  return n;
@@ -562,29 +562,29 @@ var pe = { exports: {} };
562
562
  */
563
563
  insertBefore: function(t, e, n, r) {
564
564
  r = r || /** @type {any} */
565
- i.languages;
566
- var s = r[t], c = {};
567
- for (var m in s)
568
- if (s.hasOwnProperty(m)) {
569
- if (m == e)
565
+ s.languages;
566
+ var i = r[t], d = {};
567
+ for (var b in i)
568
+ if (i.hasOwnProperty(b)) {
569
+ if (b == e)
570
570
  for (var u in n)
571
- n.hasOwnProperty(u) && (c[u] = n[u]);
572
- n.hasOwnProperty(m) || (c[m] = s[m]);
571
+ n.hasOwnProperty(u) && (d[u] = n[u]);
572
+ n.hasOwnProperty(b) || (d[b] = i[b]);
573
573
  }
574
574
  var w = r[t];
575
- return r[t] = c, i.languages.DFS(i.languages, function(F, P) {
576
- P === w && F != t && (this[F] = c);
577
- }), c;
575
+ return r[t] = d, s.languages.DFS(s.languages, function(_, P) {
576
+ P === w && _ != t && (this[_] = d);
577
+ }), d;
578
578
  },
579
579
  // Traverse a language definition with Depth First Search
580
- DFS: function t(e, n, r, s) {
581
- s = s || {};
582
- var c = i.util.objId;
583
- for (var m in e)
584
- if (e.hasOwnProperty(m)) {
585
- n.call(e, m, e[m], r || m);
586
- var u = e[m], w = i.util.type(u);
587
- w === "Object" && !s[c(u)] ? (s[c(u)] = !0, t(u, n, null, s)) : w === "Array" && !s[c(u)] && (s[c(u)] = !0, t(u, n, m, s));
580
+ DFS: function t(e, n, r, i) {
581
+ i = i || {};
582
+ var d = s.util.objId;
583
+ for (var b in e)
584
+ if (e.hasOwnProperty(b)) {
585
+ n.call(e, b, e[b], r || b);
586
+ var u = e[b], w = s.util.type(u);
587
+ w === "Object" && !i[d(u)] ? (i[d(u)] = !0, t(u, n, null, i)) : w === "Array" && !i[d(u)] && (i[d(u)] = !0, t(u, n, b, i));
588
588
  }
589
589
  }
590
590
  },
@@ -602,7 +602,7 @@ var pe = { exports: {} };
602
602
  * @public
603
603
  */
604
604
  highlightAll: function(t, e) {
605
- i.highlightAllUnder(document, t, e);
605
+ s.highlightAllUnder(document, t, e);
606
606
  },
607
607
  /**
608
608
  * Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
@@ -625,9 +625,9 @@ var pe = { exports: {} };
625
625
  container: t,
626
626
  selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
627
627
  };
628
- i.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), i.hooks.run("before-all-elements-highlight", r);
629
- for (var s = 0, c; c = r.elements[s++]; )
630
- i.highlightElement(c, e === !0, r.callback);
628
+ s.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), s.hooks.run("before-all-elements-highlight", r);
629
+ for (var i = 0, d; d = r.elements[i++]; )
630
+ s.highlightElement(d, e === !0, r.callback);
631
631
  },
632
632
  /**
633
633
  * Highlights the code inside a single element.
@@ -658,38 +658,38 @@ var pe = { exports: {} };
658
658
  * @public
659
659
  */
660
660
  highlightElement: function(t, e, n) {
661
- var r = i.util.getLanguage(t), s = i.languages[r];
662
- i.util.setLanguage(t, r);
663
- var c = t.parentElement;
664
- c && c.nodeName.toLowerCase() === "pre" && i.util.setLanguage(c, r);
665
- var m = t.textContent, u = {
661
+ var r = s.util.getLanguage(t), i = s.languages[r];
662
+ s.util.setLanguage(t, r);
663
+ var d = t.parentElement;
664
+ d && d.nodeName.toLowerCase() === "pre" && s.util.setLanguage(d, r);
665
+ var b = t.textContent, u = {
666
666
  element: t,
667
667
  language: r,
668
- grammar: s,
669
- code: m
668
+ grammar: i,
669
+ code: b
670
670
  };
671
671
  function w(P) {
672
- u.highlightedCode = P, i.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, i.hooks.run("after-highlight", u), i.hooks.run("complete", u), n && n.call(u.element);
672
+ u.highlightedCode = P, s.hooks.run("before-insert", u), u.element.innerHTML = u.highlightedCode, s.hooks.run("after-highlight", u), s.hooks.run("complete", u), n && n.call(u.element);
673
673
  }
674
- if (i.hooks.run("before-sanity-check", u), c = u.element.parentElement, c && c.nodeName.toLowerCase() === "pre" && !c.hasAttribute("tabindex") && c.setAttribute("tabindex", "0"), !u.code) {
675
- i.hooks.run("complete", u), n && n.call(u.element);
674
+ if (s.hooks.run("before-sanity-check", u), d = u.element.parentElement, d && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !u.code) {
675
+ s.hooks.run("complete", u), n && n.call(u.element);
676
676
  return;
677
677
  }
678
- if (i.hooks.run("before-highlight", u), !u.grammar) {
679
- w(i.util.encode(u.code));
678
+ if (s.hooks.run("before-highlight", u), !u.grammar) {
679
+ w(s.util.encode(u.code));
680
680
  return;
681
681
  }
682
682
  if (e && l.Worker) {
683
- var F = new Worker(i.filename);
684
- F.onmessage = function(P) {
683
+ var _ = new Worker(s.filename);
684
+ _.onmessage = function(P) {
685
685
  w(P.data);
686
- }, F.postMessage(JSON.stringify({
686
+ }, _.postMessage(JSON.stringify({
687
687
  language: u.language,
688
688
  code: u.code,
689
689
  immediateClose: !0
690
690
  }));
691
691
  } else
692
- w(i.highlight(u.code, u.grammar, u.language));
692
+ w(s.highlight(u.code, u.grammar, u.language));
693
693
  },
694
694
  /**
695
695
  * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
@@ -717,9 +717,9 @@ var pe = { exports: {} };
717
717
  grammar: e,
718
718
  language: n
719
719
  };
720
- if (i.hooks.run("before-tokenize", r), !r.grammar)
720
+ if (s.hooks.run("before-tokenize", r), !r.grammar)
721
721
  throw new Error('The language "' + r.language + '" has no grammar.');
722
- return r.tokens = i.tokenize(r.code, r.grammar), i.hooks.run("after-tokenize", r), f.stringify(i.util.encode(r.tokens), r.language);
722
+ return r.tokens = s.tokenize(r.code, r.grammar), s.hooks.run("after-tokenize", r), f.stringify(s.util.encode(r.tokens), r.language);
723
723
  },
724
724
  /**
725
725
  * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
@@ -752,8 +752,8 @@ var pe = { exports: {} };
752
752
  e[r] = n[r];
753
753
  delete e.rest;
754
754
  }
755
- var s = new O();
756
- return I(s, s.head, t), k(t, s, e, s.head, 0), D(s);
755
+ var i = new N();
756
+ return I(i, i.head, t), k(t, i, e, i.head, 0), D(i);
757
757
  },
758
758
  /**
759
759
  * @namespace
@@ -775,7 +775,7 @@ var pe = { exports: {} };
775
775
  * @public
776
776
  */
777
777
  add: function(t, e) {
778
- var n = i.hooks.all;
778
+ var n = s.hooks.all;
779
779
  n[t] = n[t] || [], n[t].push(e);
780
780
  },
781
781
  /**
@@ -788,15 +788,15 @@ var pe = { exports: {} };
788
788
  * @public
789
789
  */
790
790
  run: function(t, e) {
791
- var n = i.hooks.all[t];
791
+ var n = s.hooks.all[t];
792
792
  if (!(!n || !n.length))
793
- for (var r = 0, s; s = n[r++]; )
794
- s(e);
793
+ for (var r = 0, i; i = n[r++]; )
794
+ i(e);
795
795
  }
796
796
  },
797
797
  Token: f
798
798
  };
799
- l.Prism = i;
799
+ l.Prism = s;
800
800
  function f(t, e, n, r) {
801
801
  this.type = t, this.content = e, this.alias = n, this.length = (r || "").length | 0;
802
802
  }
@@ -809,90 +809,90 @@ var pe = { exports: {} };
809
809
  r += t(w, n);
810
810
  }), r;
811
811
  }
812
- var s = {
812
+ var i = {
813
813
  type: e.type,
814
814
  content: t(e.content, n),
815
815
  tag: "span",
816
816
  classes: ["token", e.type],
817
817
  attributes: {},
818
818
  language: n
819
- }, c = e.alias;
820
- c && (Array.isArray(c) ? Array.prototype.push.apply(s.classes, c) : s.classes.push(c)), i.hooks.run("wrap", s);
821
- var m = "";
822
- for (var u in s.attributes)
823
- m += " " + u + '="' + (s.attributes[u] || "").replace(/"/g, "&quot;") + '"';
824
- return "<" + s.tag + ' class="' + s.classes.join(" ") + '"' + m + ">" + s.content + "</" + s.tag + ">";
819
+ }, d = e.alias;
820
+ d && (Array.isArray(d) ? Array.prototype.push.apply(i.classes, d) : i.classes.push(d)), s.hooks.run("wrap", i);
821
+ var b = "";
822
+ for (var u in i.attributes)
823
+ b += " " + u + '="' + (i.attributes[u] || "").replace(/"/g, "&quot;") + '"';
824
+ return "<" + i.tag + ' class="' + i.classes.join(" ") + '"' + b + ">" + i.content + "</" + i.tag + ">";
825
825
  };
826
- function S(t, e, n, r) {
826
+ function h(t, e, n, r) {
827
827
  t.lastIndex = e;
828
- var s = t.exec(n);
829
- if (s && r && s[1]) {
830
- var c = s[1].length;
831
- s.index += c, s[0] = s[0].slice(c);
828
+ var i = t.exec(n);
829
+ if (i && r && i[1]) {
830
+ var d = i[1].length;
831
+ i.index += d, i[0] = i[0].slice(d);
832
832
  }
833
- return s;
833
+ return i;
834
834
  }
835
- function k(t, e, n, r, s, c) {
836
- for (var m in n)
837
- if (!(!n.hasOwnProperty(m) || !n[m])) {
838
- var u = n[m];
835
+ function k(t, e, n, r, i, d) {
836
+ for (var b in n)
837
+ if (!(!n.hasOwnProperty(b) || !n[b])) {
838
+ var u = n[b];
839
839
  u = Array.isArray(u) ? u : [u];
840
840
  for (var w = 0; w < u.length; ++w) {
841
- if (c && c.cause == m + "," + w)
841
+ if (d && d.cause == b + "," + w)
842
842
  return;
843
- var F = u[w], P = F.inside, V = !!F.lookbehind, h = !!F.greedy, T = F.alias;
844
- if (h && !F.pattern.global) {
845
- var _ = F.pattern.toString().match(/[imsuy]*$/)[0];
846
- F.pattern = RegExp(F.pattern.source, _ + "g");
843
+ var _ = u[w], P = _.inside, V = !!_.lookbehind, v = !!_.greedy, T = _.alias;
844
+ if (v && !_.pattern.global) {
845
+ var x = _.pattern.toString().match(/[imsuy]*$/)[0];
846
+ _.pattern = RegExp(_.pattern.source, x + "g");
847
847
  }
848
- for (var Y = F.pattern || F, R = r.next, M = s; R !== e.tail && !(c && M >= c.reach); M += R.value.length, R = R.next) {
849
- var z = R.value;
848
+ for (var Y = _.pattern || _, O = r.next, M = i; O !== e.tail && !(d && M >= d.reach); M += O.value.length, O = O.next) {
849
+ var z = O.value;
850
850
  if (e.length > t.length)
851
851
  return;
852
852
  if (!(z instanceof f)) {
853
853
  var X = 1, $;
854
- if (h) {
855
- if ($ = S(Y, M, t, V), !$ || $.index >= t.length)
854
+ if (v) {
855
+ if ($ = h(Y, M, t, V), !$ || $.index >= t.length)
856
856
  break;
857
- var Z = $.index, me = $.index + $[0].length, U = M;
858
- for (U += R.value.length; Z >= U; )
859
- R = R.next, U += R.value.length;
860
- if (U -= R.value.length, M = U, R.value instanceof f)
857
+ var Z = $.index, fe = $.index + $[0].length, B = M;
858
+ for (B += O.value.length; Z >= B; )
859
+ O = O.next, B += O.value.length;
860
+ if (B -= O.value.length, M = B, O.value instanceof f)
861
861
  continue;
862
- for (var j = R; j !== e.tail && (U < me || typeof j.value == "string"); j = j.next)
863
- X++, U += j.value.length;
864
- X--, z = t.slice(M, U), $.index -= M;
865
- } else if ($ = S(Y, 0, z, V), !$)
862
+ for (var j = O; j !== e.tail && (B < fe || typeof j.value == "string"); j = j.next)
863
+ X++, B += j.value.length;
864
+ X--, z = t.slice(M, B), $.index -= M;
865
+ } else if ($ = h(Y, 0, z, V), !$)
866
866
  continue;
867
- var Z = $.index, K = $[0], J = z.slice(0, Z), se = z.slice(Z + K.length), Q = M + z.length;
868
- c && Q > c.reach && (c.reach = Q);
869
- var q = R.prev;
870
- J && (q = I(e, q, J), M += J.length), L(e, q, X);
871
- var fe = new f(m, P ? i.tokenize(K, P) : K, T, K);
872
- if (R = I(e, q, fe), se && I(e, R, se), X > 1) {
873
- var ee = {
874
- cause: m + "," + w,
875
- reach: Q
867
+ var Z = $.index, K = $[0], Q = z.slice(0, Z), de = z.slice(Z + K.length), ee = M + z.length;
868
+ d && ee > d.reach && (d.reach = ee);
869
+ var q = O.prev;
870
+ Q && (q = I(e, q, Q), M += Q.length), C(e, q, X);
871
+ var he = new f(b, P ? s.tokenize(K, P) : K, T, K);
872
+ if (O = I(e, q, he), de && I(e, O, de), X > 1) {
873
+ var te = {
874
+ cause: b + "," + w,
875
+ reach: ee
876
876
  };
877
- k(t, e, n, R.prev, M, ee), c && ee.reach > c.reach && (c.reach = ee.reach);
877
+ k(t, e, n, O.prev, M, te), d && te.reach > d.reach && (d.reach = te.reach);
878
878
  }
879
879
  }
880
880
  }
881
881
  }
882
882
  }
883
883
  }
884
- function O() {
884
+ function N() {
885
885
  var t = { value: null, prev: null, next: null }, e = { value: null, prev: t, next: null };
886
886
  t.next = e, this.head = t, this.tail = e, this.length = 0;
887
887
  }
888
888
  function I(t, e, n) {
889
- var r = e.next, s = { value: n, prev: e, next: r };
890
- return e.next = s, r.prev = s, t.length++, s;
889
+ var r = e.next, i = { value: n, prev: e, next: r };
890
+ return e.next = i, r.prev = i, t.length++, i;
891
891
  }
892
- function L(t, e, n) {
893
- for (var r = e.next, s = 0; s < n && r !== t.tail; s++)
892
+ function C(t, e, n) {
893
+ for (var r = e.next, i = 0; i < n && r !== t.tail; i++)
894
894
  r = r.next;
895
- e.next = r, r.prev = e, t.length -= s;
895
+ e.next = r, r.prev = e, t.length -= i;
896
896
  }
897
897
  function D(t) {
898
898
  for (var e = [], n = t.head.next; n !== t.tail; )
@@ -900,22 +900,22 @@ var pe = { exports: {} };
900
900
  return e;
901
901
  }
902
902
  if (!l.document)
903
- return l.addEventListener && (i.disableWorkerMessageHandler || l.addEventListener("message", function(t) {
904
- var e = JSON.parse(t.data), n = e.language, r = e.code, s = e.immediateClose;
905
- l.postMessage(i.highlight(r, i.languages[n], n)), s && l.close();
906
- }, !1)), i;
907
- var g = i.util.currentScript();
908
- g && (i.filename = g.src, g.hasAttribute("data-manual") && (i.manual = !0));
903
+ return l.addEventListener && (s.disableWorkerMessageHandler || l.addEventListener("message", function(t) {
904
+ var e = JSON.parse(t.data), n = e.language, r = e.code, i = e.immediateClose;
905
+ l.postMessage(s.highlight(r, s.languages[n], n)), i && l.close();
906
+ }, !1)), s;
907
+ var g = s.util.currentScript();
908
+ g && (s.filename = g.src, g.hasAttribute("data-manual") && (s.manual = !0));
909
909
  function p() {
910
- i.manual || i.highlightAll();
910
+ s.manual || s.highlightAll();
911
911
  }
912
- if (!i.manual) {
913
- var y = document.readyState;
914
- y === "loading" || y === "interactive" && g && g.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
912
+ if (!s.manual) {
913
+ var S = document.readyState;
914
+ S === "loading" || S === "interactive" && g && g.defer ? document.addEventListener("DOMContentLoaded", p) : window.requestAnimationFrame ? window.requestAnimationFrame(p) : window.setTimeout(p, 16);
915
915
  }
916
- return i;
917
- }(d);
918
- o.exports && (o.exports = a), typeof le < "u" && (le.Prism = a), a.languages.markup = {
916
+ return s;
917
+ }(c);
918
+ o.exports && (o.exports = a), typeof pe < "u" && (pe.Prism = a), a.languages.markup = {
919
919
  comment: {
920
920
  pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
921
921
  greedy: !0
@@ -1006,31 +1006,31 @@ var pe = { exports: {} };
1006
1006
  * @example
1007
1007
  * addInlined('style', 'css');
1008
1008
  */
1009
- value: function(b, v) {
1010
- var E = {};
1011
- E["language-" + v] = {
1009
+ value: function(m, y) {
1010
+ var A = {};
1011
+ A["language-" + y] = {
1012
1012
  pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
1013
1013
  lookbehind: !0,
1014
- inside: a.languages[v]
1015
- }, E.cdata = /^<!\[CDATA\[|\]\]>$/i;
1016
- var i = {
1014
+ inside: a.languages[y]
1015
+ }, A.cdata = /^<!\[CDATA\[|\]\]>$/i;
1016
+ var s = {
1017
1017
  "included-cdata": {
1018
1018
  pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
1019
- inside: E
1019
+ inside: A
1020
1020
  }
1021
1021
  };
1022
- i["language-" + v] = {
1022
+ s["language-" + y] = {
1023
1023
  pattern: /[\s\S]+/,
1024
- inside: a.languages[v]
1024
+ inside: a.languages[y]
1025
1025
  };
1026
1026
  var f = {};
1027
- f[b] = {
1027
+ f[m] = {
1028
1028
  pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
1029
- return b;
1029
+ return m;
1030
1030
  }), "i"),
1031
1031
  lookbehind: !0,
1032
1032
  greedy: !0,
1033
- inside: i
1033
+ inside: s
1034
1034
  }, a.languages.insertBefore("markup", "cdata", f);
1035
1035
  }
1036
1036
  }), Object.defineProperty(a.languages.markup.tag, "addAttribute", {
@@ -1045,7 +1045,7 @@ var pe = { exports: {} };
1045
1045
  * @example
1046
1046
  * addAttribute('style', 'css');
1047
1047
  */
1048
- value: function(l, b) {
1048
+ value: function(l, m) {
1049
1049
  a.languages.markup.tag.inside["special-attr"].push({
1050
1050
  pattern: RegExp(
1051
1051
  /(^|["'\s])/.source + "(?:" + l + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
@@ -1060,8 +1060,8 @@ var pe = { exports: {} };
1060
1060
  value: {
1061
1061
  pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
1062
1062
  lookbehind: !0,
1063
- alias: [b, "language-" + b],
1064
- inside: a.languages[b]
1063
+ alias: [m, "language-" + m],
1064
+ inside: a.languages[m]
1065
1065
  },
1066
1066
  punctuation: [
1067
1067
  {
@@ -1076,11 +1076,11 @@ var pe = { exports: {} };
1076
1076
  });
1077
1077
  }
1078
1078
  }), a.languages.html = a.languages.markup, a.languages.mathml = a.languages.markup, a.languages.svg = a.languages.markup, a.languages.xml = a.languages.extend("markup", {}), a.languages.ssml = a.languages.xml, a.languages.atom = a.languages.xml, a.languages.rss = a.languages.xml, function(l) {
1079
- var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1079
+ var m = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
1080
1080
  l.languages.css = {
1081
1081
  comment: /\/\*[\s\S]*?\*\//,
1082
1082
  atrule: {
1083
- pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
1083
+ pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + m.source + ")*?" + /(?:;|(?=\s*\{))/.source),
1084
1084
  inside: {
1085
1085
  rule: /^@[\w-]+/,
1086
1086
  "selector-function-argument": {
@@ -1097,23 +1097,23 @@ var pe = { exports: {} };
1097
1097
  },
1098
1098
  url: {
1099
1099
  // https://drafts.csswg.org/css-values-3/#urls
1100
- pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
1100
+ pattern: RegExp("\\burl\\((?:" + m.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
1101
1101
  greedy: !0,
1102
1102
  inside: {
1103
1103
  function: /^url/i,
1104
1104
  punctuation: /^\(|\)$/,
1105
1105
  string: {
1106
- pattern: RegExp("^" + b.source + "$"),
1106
+ pattern: RegExp("^" + m.source + "$"),
1107
1107
  alias: "url"
1108
1108
  }
1109
1109
  }
1110
1110
  },
1111
1111
  selector: {
1112
- pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
1112
+ pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + m.source + ")*(?=\\s*\\{)"),
1113
1113
  lookbehind: !0
1114
1114
  },
1115
1115
  string: {
1116
- pattern: b,
1116
+ pattern: m,
1117
1117
  greedy: !0
1118
1118
  },
1119
1119
  property: {
@@ -1127,8 +1127,8 @@ var pe = { exports: {} };
1127
1127
  },
1128
1128
  punctuation: /[(){};:,]/
1129
1129
  }, l.languages.css.atrule.inside.rest = l.languages.css;
1130
- var v = l.languages.markup;
1131
- v && (v.tag.addInlined("style", "css"), v.tag.addAttribute("style", "css"));
1130
+ var y = l.languages.markup;
1131
+ y && (y.tag.addInlined("style", "css"), y.tag.addAttribute("style", "css"));
1132
1132
  }(a), a.languages.clike = {
1133
1133
  comment: [
1134
1134
  {
@@ -1293,9 +1293,9 @@ var pe = { exports: {} };
1293
1293
  if (typeof a > "u" || typeof document > "u")
1294
1294
  return;
1295
1295
  Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
1296
- var l = "Loading…", b = function(g, p) {
1296
+ var l = "Loading…", m = function(g, p) {
1297
1297
  return "✖ Error " + g + " while fetching file: " + p;
1298
- }, v = "✖ Error: File does not exist or is empty", E = {
1298
+ }, y = "✖ Error: File does not exist or is empty", A = {
1299
1299
  js: "javascript",
1300
1300
  py: "python",
1301
1301
  rb: "ruby",
@@ -1305,52 +1305,52 @@ var pe = { exports: {} };
1305
1305
  bat: "batch",
1306
1306
  h: "c",
1307
1307
  tex: "latex"
1308
- }, i = "data-src-status", f = "loading", S = "loaded", k = "failed", O = "pre[data-src]:not([" + i + '="' + S + '"]):not([' + i + '="' + f + '"])';
1309
- function I(g, p, y) {
1308
+ }, s = "data-src-status", f = "loading", h = "loaded", k = "failed", N = "pre[data-src]:not([" + s + '="' + h + '"]):not([' + s + '="' + f + '"])';
1309
+ function I(g, p, S) {
1310
1310
  var t = new XMLHttpRequest();
1311
1311
  t.open("GET", g, !0), t.onreadystatechange = function() {
1312
- t.readyState == 4 && (t.status < 400 && t.responseText ? p(t.responseText) : t.status >= 400 ? y(b(t.status, t.statusText)) : y(v));
1312
+ t.readyState == 4 && (t.status < 400 && t.responseText ? p(t.responseText) : t.status >= 400 ? S(m(t.status, t.statusText)) : S(y));
1313
1313
  }, t.send(null);
1314
1314
  }
1315
- function L(g) {
1315
+ function C(g) {
1316
1316
  var p = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(g || "");
1317
1317
  if (p) {
1318
- var y = Number(p[1]), t = p[2], e = p[3];
1319
- return t ? e ? [y, Number(e)] : [y, void 0] : [y, y];
1318
+ var S = Number(p[1]), t = p[2], e = p[3];
1319
+ return t ? e ? [S, Number(e)] : [S, void 0] : [S, S];
1320
1320
  }
1321
1321
  }
1322
1322
  a.hooks.add("before-highlightall", function(g) {
1323
- g.selector += ", " + O;
1323
+ g.selector += ", " + N;
1324
1324
  }), a.hooks.add("before-sanity-check", function(g) {
1325
1325
  var p = (
1326
1326
  /** @type {HTMLPreElement} */
1327
1327
  g.element
1328
1328
  );
1329
- if (p.matches(O)) {
1330
- g.code = "", p.setAttribute(i, f);
1331
- var y = p.appendChild(document.createElement("CODE"));
1332
- y.textContent = l;
1329
+ if (p.matches(N)) {
1330
+ g.code = "", p.setAttribute(s, f);
1331
+ var S = p.appendChild(document.createElement("CODE"));
1332
+ S.textContent = l;
1333
1333
  var t = p.getAttribute("data-src"), e = g.language;
1334
1334
  if (e === "none") {
1335
1335
  var n = (/\.(\w+)$/.exec(t) || [, "none"])[1];
1336
- e = E[n] || n;
1336
+ e = A[n] || n;
1337
1337
  }
1338
- a.util.setLanguage(y, e), a.util.setLanguage(p, e);
1338
+ a.util.setLanguage(S, e), a.util.setLanguage(p, e);
1339
1339
  var r = a.plugins.autoloader;
1340
1340
  r && r.loadLanguages(e), I(
1341
1341
  t,
1342
- function(s) {
1343
- p.setAttribute(i, S);
1344
- var c = L(p.getAttribute("data-range"));
1345
- if (c) {
1346
- var m = s.split(/\r\n?|\n/g), u = c[0], w = c[1] == null ? m.length : c[1];
1347
- u < 0 && (u += m.length), u = Math.max(0, Math.min(u - 1, m.length)), w < 0 && (w += m.length), w = Math.max(0, Math.min(w, m.length)), s = m.slice(u, w).join(`
1342
+ function(i) {
1343
+ p.setAttribute(s, h);
1344
+ var d = C(p.getAttribute("data-range"));
1345
+ if (d) {
1346
+ var b = i.split(/\r\n?|\n/g), u = d[0], w = d[1] == null ? b.length : d[1];
1347
+ u < 0 && (u += b.length), u = Math.max(0, Math.min(u - 1, b.length)), w < 0 && (w += b.length), w = Math.max(0, Math.min(w, b.length)), i = b.slice(u, w).join(`
1348
1348
  `), p.hasAttribute("data-start") || p.setAttribute("data-start", String(u + 1));
1349
1349
  }
1350
- y.textContent = s, a.highlightElement(y);
1350
+ S.textContent = i, a.highlightElement(S);
1351
1351
  },
1352
- function(s) {
1353
- p.setAttribute(i, k), y.textContent = s;
1352
+ function(i) {
1353
+ p.setAttribute(s, k), S.textContent = i;
1354
1354
  }
1355
1355
  );
1356
1356
  }
@@ -1363,7 +1363,7 @@ var pe = { exports: {} };
1363
1363
  * @param {ParentNode} [container=document]
1364
1364
  */
1365
1365
  highlight: function(p) {
1366
- for (var y = (p || document).querySelectorAll(O), t = 0, e; e = y[t++]; )
1366
+ for (var S = (p || document).querySelectorAll(N), t = 0, e; e = S[t++]; )
1367
1367
  a.highlightElement(e);
1368
1368
  }
1369
1369
  };
@@ -1372,9 +1372,9 @@ var pe = { exports: {} };
1372
1372
  D || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), D = !0), a.plugins.fileHighlight.highlight.apply(this, arguments);
1373
1373
  };
1374
1374
  }();
1375
- })(pe);
1376
- var _e = pe.exports;
1377
- const ne = /* @__PURE__ */ Fe(_e);
1375
+ })(me);
1376
+ var De = me.exports;
1377
+ const re = /* @__PURE__ */ Ce(De);
1378
1378
  Prism.languages.clike = {
1379
1379
  comment: [
1380
1380
  {
@@ -1633,7 +1633,7 @@ Prism.languages.insertBefore("go", "string", {
1633
1633
  });
1634
1634
  delete Prism.languages.go["class-name"];
1635
1635
  (function(o) {
1636
- var d = /\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/, a = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = {
1636
+ var c = /\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/, a = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = {
1637
1637
  pattern: RegExp(/(^|[^\w.])/.source + a + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
1638
1638
  lookbehind: !0,
1639
1639
  inside: {
@@ -1669,7 +1669,7 @@ delete Prism.languages.go["class-name"];
1669
1669
  inside: l.inside
1670
1670
  }
1671
1671
  ],
1672
- keyword: d,
1672
+ keyword: c,
1673
1673
  function: [
1674
1674
  o.languages.clike.function,
1675
1675
  {
@@ -1704,7 +1704,7 @@ delete Prism.languages.go["class-name"];
1704
1704
  pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
1705
1705
  inside: {
1706
1706
  "class-name": l,
1707
- keyword: d,
1707
+ keyword: c,
1708
1708
  punctuation: /[<>(),.:]/,
1709
1709
  operator: /[?&|]/
1710
1710
  }
@@ -1736,7 +1736,7 @@ delete Prism.languages.go["class-name"];
1736
1736
  namespace: {
1737
1737
  pattern: RegExp(
1738
1738
  /(\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() {
1739
- return d.source;
1739
+ return c.source;
1740
1740
  })
1741
1741
  ),
1742
1742
  lookbehind: !0,
@@ -1823,16 +1823,16 @@ Prism.languages.insertBefore("c", "function", {
1823
1823
  });
1824
1824
  delete Prism.languages.c.boolean;
1825
1825
  (function(o) {
1826
- for (var d = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, a = 0; a < 2; a++)
1827
- d = d.replace(/<self>/g, function() {
1828
- return d;
1826
+ for (var c = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, a = 0; a < 2; a++)
1827
+ c = c.replace(/<self>/g, function() {
1828
+ return c;
1829
1829
  });
1830
- d = d.replace(/<self>/g, function() {
1830
+ c = c.replace(/<self>/g, function() {
1831
1831
  return /[^\s\S]/.source;
1832
1832
  }), o.languages.rust = {
1833
1833
  comment: [
1834
1834
  {
1835
- pattern: RegExp(/(^|[^\\])/.source + d),
1835
+ pattern: RegExp(/(^|[^\\])/.source + c),
1836
1836
  lookbehind: !0,
1837
1837
  greedy: !0
1838
1838
  },
@@ -1972,7 +1972,7 @@ Prism.languages.sql = {
1972
1972
  punctuation: /[;[\]()`,.]/
1973
1973
  };
1974
1974
  (function(o) {
1975
- var d = "\\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", a = {
1975
+ var c = "\\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", a = {
1976
1976
  pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
1977
1977
  lookbehind: !0,
1978
1978
  alias: "punctuation",
@@ -1982,7 +1982,7 @@ Prism.languages.sql = {
1982
1982
  }, l = {
1983
1983
  bash: a,
1984
1984
  environment: {
1985
- pattern: RegExp("\\$" + d),
1985
+ pattern: RegExp("\\$" + c),
1986
1986
  alias: "constant"
1987
1987
  },
1988
1988
  variable: [
@@ -2022,7 +2022,7 @@ Prism.languages.sql = {
2022
2022
  operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
2023
2023
  punctuation: /[\[\]]/,
2024
2024
  environment: {
2025
- pattern: RegExp("(\\{)" + d),
2025
+ pattern: RegExp("(\\{)" + c),
2026
2026
  lookbehind: !0,
2027
2027
  alias: "constant"
2028
2028
  }
@@ -2071,7 +2071,7 @@ Prism.languages.sql = {
2071
2071
  pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
2072
2072
  inside: {
2073
2073
  environment: {
2074
- pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + d),
2074
+ pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + c),
2075
2075
  lookbehind: !0,
2076
2076
  alias: "constant"
2077
2077
  }
@@ -2127,7 +2127,7 @@ Prism.languages.sql = {
2127
2127
  }
2128
2128
  ],
2129
2129
  environment: {
2130
- pattern: RegExp("\\$?" + d),
2130
+ pattern: RegExp("\\$?" + c),
2131
2131
  alias: "constant"
2132
2132
  },
2133
2133
  variable: l.variable,
@@ -2170,7 +2170,7 @@ Prism.languages.sql = {
2170
2170
  lookbehind: !0
2171
2171
  }
2172
2172
  }, a.inside = o.languages.bash;
2173
- for (var b = [
2173
+ for (var m = [
2174
2174
  "comment",
2175
2175
  "function-name",
2176
2176
  "for-or-select",
@@ -2186,8 +2186,8 @@ Prism.languages.sql = {
2186
2186
  "operator",
2187
2187
  "punctuation",
2188
2188
  "number"
2189
- ], v = l.variable[1].inside, E = 0; E < b.length; E++)
2190
- v[b[E]] = o.languages.bash[b[E]];
2189
+ ], y = l.variable[1].inside, A = 0; A < m.length; A++)
2190
+ y[m[A]] = o.languages.bash[m[A]];
2191
2191
  o.languages.sh = o.languages.bash, o.languages.shell = o.languages.bash;
2192
2192
  })(Prism);
2193
2193
  Prism.languages.json = {
@@ -2215,7 +2215,7 @@ Prism.languages.json = {
2215
2215
  }
2216
2216
  };
2217
2217
  Prism.languages.webmanifest = Prism.languages.json;
2218
- const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2218
+ const Pe = ["innerHTML"], $e = ["value", "disabled"], Me = /* @__PURE__ */ oe({
2219
2219
  __name: "CodeEditor",
2220
2220
  props: {
2221
2221
  modelValue: {},
@@ -2224,22 +2224,22 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2224
2224
  disabled: { type: Boolean, default: !1 }
2225
2225
  },
2226
2226
  emits: ["update:modelValue"],
2227
- setup(o, { emit: d }) {
2228
- he((g) => ({
2229
- v4a58b198: S.value
2227
+ setup(o, { emit: c }) {
2228
+ be((g) => ({
2229
+ v4a58b198: h.value
2230
2230
  }));
2231
2231
  function a(g) {
2232
2232
  if (typeof document > "u") return;
2233
- const p = g === "dark" ? "prism-okaidia" : "prism", y = document.getElementById("prism-theme-style"), t = `https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/${p}.min.css`;
2234
- if (y)
2235
- y.setAttribute("href", t);
2233
+ const p = g === "dark" ? "prism-okaidia" : "prism", S = document.getElementById("prism-theme-style"), t = `https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/${p}.min.css`;
2234
+ if (S)
2235
+ S.setAttribute("href", t);
2236
2236
  else {
2237
2237
  const e = document.createElement("link");
2238
2238
  e.id = "prism-theme-style", e.rel = "stylesheet", e.href = t, document.head.appendChild(e);
2239
2239
  }
2240
2240
  }
2241
- typeof window < "u" && (window.Prism = ne);
2242
- const l = o, b = d, v = C(null), E = C(null), i = {
2241
+ typeof window < "u" && (window.Prism = re);
2242
+ const l = o, m = c, y = L(null), A = L(null), s = {
2243
2243
  javascript: "javascript",
2244
2244
  js: "javascript",
2245
2245
  typescript: "typescript",
@@ -2270,86 +2270,86 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2270
2270
  yml: "yaml",
2271
2271
  markdown: "markdown",
2272
2272
  md: "markdown"
2273
- }, f = G(() => i[l.language.toLowerCase()] || "javascript"), S = G(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), k = G(() => {
2273
+ }, f = G(() => s[l.language.toLowerCase()] || "javascript"), h = G(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), k = G(() => {
2274
2274
  try {
2275
- const g = ne.languages[f.value];
2275
+ const g = re.languages[f.value];
2276
2276
  if (g)
2277
- return ne.highlight(l.modelValue || "", g, f.value);
2277
+ return re.highlight(l.modelValue || "", g, f.value);
2278
2278
  } catch {
2279
2279
  }
2280
- return O(l.modelValue || "");
2280
+ return N(l.modelValue || "");
2281
2281
  });
2282
- function O(g) {
2282
+ function N(g) {
2283
2283
  const p = document.createElement("div");
2284
2284
  return p.textContent = g, p.innerHTML;
2285
2285
  }
2286
2286
  function I(g) {
2287
2287
  const p = g.target;
2288
- b("update:modelValue", p.value);
2288
+ m("update:modelValue", p.value);
2289
2289
  }
2290
- function L() {
2291
- v.value && E.value && (E.value.scrollTop = v.value.scrollTop, E.value.scrollLeft = v.value.scrollLeft);
2290
+ function C() {
2291
+ y.value && A.value && (A.value.scrollTop = y.value.scrollTop, A.value.scrollLeft = y.value.scrollLeft);
2292
2292
  }
2293
2293
  function D(g) {
2294
2294
  if (g.key === "Tab") {
2295
2295
  g.preventDefault();
2296
- const p = g.target, y = p.selectionStart, t = p.selectionEnd, e = p.value;
2297
- p.value = e.substring(0, y) + " " + e.substring(t), p.selectionStart = p.selectionEnd = y + 2, b("update:modelValue", p.value);
2296
+ const p = g.target, S = p.selectionStart, t = p.selectionEnd, e = p.value;
2297
+ p.value = e.substring(0, S) + " " + e.substring(t), p.selectionStart = p.selectionEnd = S + 2, m("update:modelValue", p.value);
2298
2298
  }
2299
2299
  }
2300
- return ce(() => {
2300
+ return ge(() => {
2301
2301
  a(l.theme);
2302
- }), de(() => l.theme, (g) => {
2302
+ }), le(() => l.theme, (g) => {
2303
2303
  a(g);
2304
- }), (g, p) => (x(), N("div", {
2304
+ }), (g, p) => (F(), R("div", {
2305
2305
  class: W(["code-editor", `theme-${o.theme}`])
2306
2306
  }, [
2307
- A("pre", {
2307
+ E("pre", {
2308
2308
  ref_key: "highlightRef",
2309
- ref: E,
2309
+ ref: A,
2310
2310
  class: W(["code-highlight", [`language-${f.value}`, `prism-theme-${o.theme}`]]),
2311
2311
  "aria-hidden": "true"
2312
2312
  }, [
2313
- A("code", { innerHTML: k.value }, null, 8, Re)
2313
+ E("code", { innerHTML: k.value }, null, 8, Pe)
2314
2314
  ], 2),
2315
- A("textarea", {
2315
+ E("textarea", {
2316
2316
  ref_key: "codeRef",
2317
- ref: v,
2317
+ ref: y,
2318
2318
  class: "code-input",
2319
2319
  value: o.modelValue,
2320
2320
  disabled: o.disabled,
2321
2321
  onInput: I,
2322
- onScroll: L,
2322
+ onScroll: C,
2323
2323
  onKeydown: D,
2324
2324
  spellcheck: "false",
2325
2325
  placeholder: "Write your code here..."
2326
- }, null, 40, xe)
2326
+ }, null, 40, $e)
2327
2327
  ], 2));
2328
2328
  }
2329
- }), ge = (o, d) => {
2329
+ }), ue = (o, c) => {
2330
2330
  const a = o.__vccOpts || o;
2331
- for (const [l, b] of d)
2332
- a[l] = b;
2331
+ for (const [l, m] of c)
2332
+ a[l] = m;
2333
2333
  return a;
2334
- }, Oe = /* @__PURE__ */ ge(Ne, [["__scopeId", "data-v-0ec35612"]]), Le = { class: "code-runner-header" }, Ce = { class: "code-runner-controls" }, De = ["disabled"], Pe = {
2334
+ }, Ue = /* @__PURE__ */ ue(Me, [["__scopeId", "data-v-0ec35612"]]), He = { class: "code-runner-header" }, Be = { class: "code-runner-controls" }, Ge = ["disabled"], ze = {
2335
2335
  key: 0,
2336
2336
  value: ""
2337
- }, $e = ["value"], Me = { class: "code-runner-actions" }, Ue = ["disabled"], He = {
2337
+ }, je = ["value"], We = { class: "code-runner-actions" }, Ve = ["disabled"], Ye = {
2338
2338
  key: 0,
2339
2339
  class: "spinner"
2340
- }, Be = {
2340
+ }, Xe = {
2341
2341
  key: 1,
2342
2342
  class: "run-icon"
2343
- }, Ge = ["title"], ze = {
2343
+ }, Ze = ["title"], Ke = {
2344
2344
  key: 0,
2345
2345
  class: "error-message"
2346
- }, je = { class: "code-runner-main" }, We = { class: "panel-header" }, Ve = { class: "language-badge" }, Ye = { class: "panel-header" }, Xe = { class: "output-tabs" }, Ze = { class: "output-actions" }, Ke = {
2346
+ }, qe = { class: "code-runner-main" }, Je = { class: "panel-header" }, Qe = { class: "language-badge" }, et = { class: "panel-header" }, tt = { class: "output-tabs" }, at = { class: "output-actions" }, nt = {
2347
2347
  key: 0,
2348
2348
  class: "execution-time"
2349
- }, qe = { class: "output-content" }, Je = { key: 0 }, Qe = {
2349
+ }, rt = { class: "output-content" }, st = { key: 0 }, it = {
2350
2350
  key: 1,
2351
2351
  class: "stderr"
2352
- }, et = /* @__PURE__ */ ue({
2352
+ }, ot = /* @__PURE__ */ oe({
2353
2353
  __name: "CodeRunner",
2354
2354
  props: {
2355
2355
  pistonUrl: { default: "/api/piston" },
@@ -2362,45 +2362,45 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2362
2362
  executorLabel: { default: "运行" }
2363
2363
  },
2364
2364
  emits: ["execute-start", "execute-end", "language-change"],
2365
- setup(o, { emit: d }) {
2366
- const a = o, l = d, b = C([]), v = C(a.language), E = C(a.theme), i = C(""), f = C(""), S = C(""), k = C(!1), O = C(null), I = C("stdout"), L = C(null), D = C(!1), g = C(60);
2365
+ setup(o, { emit: c }) {
2366
+ const a = o, l = c, m = L([]), y = L(a.language), A = L(a.theme), s = L(""), f = L(""), h = L(""), k = L(!1), N = L(null), I = L("stdout"), C = L(null), D = L(!1), g = L(60);
2367
2367
  function p() {
2368
- E.value = E.value === "light" ? "dark" : "light";
2368
+ A.value = A.value === "light" ? "dark" : "light";
2369
2369
  }
2370
- const y = G(
2371
- () => new ke({ pistonUrl: a.pistonUrl })
2372
- ), t = G(() => b.value.map((h) => ({
2373
- value: `${h.language}:${h.version}`,
2374
- label: `${h.language.charAt(0).toUpperCase() + h.language.slice(1)} ${h.version}`
2370
+ const S = G(
2371
+ () => new Ne({ pistonUrl: a.pistonUrl })
2372
+ ), t = G(() => m.value.map((v) => ({
2373
+ value: `${v.language}:${v.version}`,
2374
+ label: `${v.language.charAt(0).toUpperCase() + v.language.slice(1)} ${v.version}`
2375
2375
  }))), e = G(() => {
2376
- const h = v.value;
2377
- return h.includes(":") ? h.split(":")[0] : h;
2376
+ const v = y.value;
2377
+ return v.includes(":") ? v.split(":")[0] : v;
2378
2378
  });
2379
2379
  async function n() {
2380
- D.value = !0, L.value = null;
2380
+ D.value = !0, C.value = null;
2381
2381
  try {
2382
- b.value = await y.value.getRuntimes();
2383
- } catch (h) {
2384
- L.value = h instanceof Error ? h.message : "Failed to load runtimes";
2382
+ m.value = await S.value.getRuntimes();
2383
+ } catch (v) {
2384
+ C.value = v instanceof Error ? v.message : "Failed to load runtimes";
2385
2385
  } finally {
2386
2386
  D.value = !1;
2387
2387
  }
2388
2388
  }
2389
- de(v, (h) => {
2390
- const T = h.includes(":") ? h.split(":")[0] : h, _ = ae(T);
2391
- i.value = _, l("language-change", T, _);
2389
+ le(y, (v) => {
2390
+ const T = v.includes(":") ? v.split(":")[0] : v, x = ne(T);
2391
+ s.value = x, l("language-change", T, x);
2392
2392
  });
2393
2393
  async function r() {
2394
2394
  if (!k.value) {
2395
- k.value = !0, f.value = "", S.value = "", O.value = null, L.value = null, I.value = "stdout", l("execute-start");
2395
+ k.value = !0, f.value = "", h.value = "", N.value = null, C.value = null, I.value = "stdout", l("execute-start");
2396
2396
  try {
2397
- const h = await y.value.execute(e.value, i.value);
2398
- f.value = h.output, S.value = h.stderr, O.value = h.executionTime || null, I.value = h.stderr ? "stderr" : "stdout", l("execute-end", h);
2399
- } catch (h) {
2400
- L.value = h instanceof Error ? h.message : "Execution failed", l("execute-end", {
2397
+ const v = await S.value.execute(e.value, s.value);
2398
+ f.value = v.output, h.value = v.stderr, N.value = v.executionTime || null, I.value = v.stderr ? "stderr" : "stdout", l("execute-end", v);
2399
+ } catch (v) {
2400
+ C.value = v instanceof Error ? v.message : "Execution failed", l("execute-end", {
2401
2401
  success: !1,
2402
2402
  output: "",
2403
- stderr: L.value,
2403
+ stderr: C.value,
2404
2404
  code: -1
2405
2405
  });
2406
2406
  } finally {
@@ -2408,127 +2408,127 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2408
2408
  }
2409
2409
  }
2410
2410
  }
2411
- function s() {
2412
- f.value = "", S.value = "", O.value = null, L.value = null;
2411
+ function i() {
2412
+ f.value = "", h.value = "", N.value = null, C.value = null;
2413
2413
  }
2414
- async function c() {
2415
- const h = I.value === "stdout" ? f.value : S.value;
2416
- await navigator.clipboard.writeText(h);
2414
+ async function d() {
2415
+ const v = I.value === "stdout" ? f.value : h.value;
2416
+ await navigator.clipboard.writeText(v);
2417
2417
  }
2418
- function m() {
2419
- i.value = ae(e.value);
2418
+ function b() {
2419
+ s.value = ne(e.value);
2420
2420
  }
2421
2421
  let u = !1;
2422
- function w(h) {
2423
- u = !0, document.addEventListener("mousemove", F), document.addEventListener("mouseup", P), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2422
+ function w(v) {
2423
+ u = !0, document.addEventListener("mousemove", _), document.addEventListener("mouseup", P), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
2424
2424
  }
2425
- function F(h) {
2425
+ function _(v) {
2426
2426
  if (!u) return;
2427
2427
  const T = document.querySelector(
2428
2428
  ".code-runner-main"
2429
2429
  );
2430
2430
  if (!T) return;
2431
- const _ = T.getBoundingClientRect(), Y = (h.clientX - _.left) / _.width * 100;
2431
+ const x = T.getBoundingClientRect(), Y = (v.clientX - x.left) / x.width * 100;
2432
2432
  g.value = Math.max(20, Math.min(80, Y));
2433
2433
  }
2434
2434
  function P() {
2435
- u = !1, document.removeEventListener("mousemove", F), document.removeEventListener("mouseup", P), document.body.style.cursor = "", document.body.style.userSelect = "";
2435
+ u = !1, document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", P), document.body.style.cursor = "", document.body.style.userSelect = "";
2436
2436
  }
2437
- ce(async () => {
2438
- await n(), i.value || (i.value = a.defaultCode || ae(v.value));
2437
+ ge(async () => {
2438
+ await n(), s.value || (s.value = a.defaultCode || ne(y.value));
2439
2439
  });
2440
- const V = G(() => `code-runner-${E.value}`);
2441
- return (h, T) => (x(), N("div", {
2440
+ const V = G(() => `code-runner-${A.value}`);
2441
+ return (v, T) => (F(), R("div", {
2442
2442
  class: W(["code-runner", V.value])
2443
2443
  }, [
2444
- A("div", Le, [
2445
- A("div", Ce, [
2446
- o.showLanguageSelector ? be((x(), N("select", {
2444
+ E("div", He, [
2445
+ E("div", Be, [
2446
+ o.showLanguageSelector ? Ee((F(), R("select", {
2447
2447
  key: 0,
2448
- "onUpdate:modelValue": T[0] || (T[0] = (_) => v.value = _),
2448
+ "onUpdate:modelValue": T[0] || (T[0] = (x) => y.value = x),
2449
2449
  class: "language-select",
2450
2450
  disabled: k.value
2451
2451
  }, [
2452
- D.value ? (x(), N("option", Pe, "加载中...")) : H("", !0),
2453
- (x(!0), N(Ee, null, ve(t.value, (_) => (x(), N("option", {
2454
- key: _.value,
2455
- value: _.value
2456
- }, B(_.label), 9, $e))), 128))
2457
- ], 8, De)), [
2458
- [ye, v.value]
2459
- ]) : H("", !0)
2452
+ D.value ? (F(), R("option", ze, "加载中...")) : U("", !0),
2453
+ (F(!0), R(ve, null, ye(t.value, (x) => (F(), R("option", {
2454
+ key: x.value,
2455
+ value: x.value
2456
+ }, H(x.label), 9, je))), 128))
2457
+ ], 8, Ge)), [
2458
+ [Ae, y.value]
2459
+ ]) : U("", !0)
2460
2460
  ]),
2461
- A("div", Me, [
2462
- A("button", {
2461
+ E("div", We, [
2462
+ E("button", {
2463
2463
  class: "btn btn-run",
2464
2464
  disabled: k.value || D.value,
2465
2465
  onClick: r
2466
2466
  }, [
2467
- k.value ? (x(), N("span", He)) : (x(), N("span", Be, "▶")),
2468
- Ae(" " + B(k.value ? "运行中..." : o.executorLabel), 1)
2469
- ], 8, Ue),
2470
- o.showEditor && o.editable ? (x(), N("button", {
2467
+ k.value ? (F(), R("span", Ye)) : (F(), R("span", Xe, "▶")),
2468
+ Se(" " + H(k.value ? "运行中..." : o.executorLabel), 1)
2469
+ ], 8, Ve),
2470
+ o.showEditor && o.editable ? (F(), R("button", {
2471
2471
  key: 0,
2472
2472
  class: "btn btn-reset",
2473
- onClick: m
2474
- }, " 重置 ")) : H("", !0),
2475
- A("button", {
2473
+ onClick: b
2474
+ }, " 重置 ")) : U("", !0),
2475
+ E("button", {
2476
2476
  class: "btn btn-theme",
2477
2477
  onClick: p,
2478
- title: E.value === "light" ? "Switch to dark mode" : "Switch to light mode"
2479
- }, B(E.value === "light" ? "🌙" : "☀️"), 9, Ge)
2478
+ title: A.value === "light" ? "Switch to dark mode" : "Switch to light mode"
2479
+ }, H(A.value === "light" ? "🌙" : "☀️"), 9, Ze)
2480
2480
  ])
2481
2481
  ]),
2482
- L.value ? (x(), N("div", ze, B(L.value), 1)) : H("", !0),
2483
- A("div", je, [
2484
- o.showEditor ? (x(), N("div", {
2482
+ C.value ? (F(), R("div", Ke, H(C.value), 1)) : U("", !0),
2483
+ E("div", qe, [
2484
+ o.showEditor ? (F(), R("div", {
2485
2485
  key: 0,
2486
2486
  class: "editor-panel",
2487
- style: ie({ width: g.value + "%" })
2487
+ style: se({ width: g.value + "%" })
2488
2488
  }, [
2489
- A("div", We, [
2490
- T[4] || (T[4] = A("span", { class: "panel-title" }, "编辑器", -1)),
2491
- A("span", Ve, B(e.value), 1)
2489
+ E("div", Je, [
2490
+ T[4] || (T[4] = E("span", { class: "panel-title" }, "编辑器", -1)),
2491
+ E("span", Qe, H(e.value), 1)
2492
2492
  ]),
2493
- Se(Oe, {
2494
- modelValue: i.value,
2495
- "onUpdate:modelValue": T[1] || (T[1] = (_) => i.value = _),
2493
+ ie(Ue, {
2494
+ modelValue: s.value,
2495
+ "onUpdate:modelValue": T[1] || (T[1] = (x) => s.value = x),
2496
2496
  language: e.value,
2497
- theme: E.value,
2497
+ theme: A.value,
2498
2498
  disabled: !o.editable || k.value
2499
2499
  }, null, 8, ["modelValue", "language", "theme", "disabled"])
2500
- ], 4)) : H("", !0),
2501
- o.showEditor ? (x(), N("div", {
2500
+ ], 4)) : U("", !0),
2501
+ o.showEditor ? (F(), R("div", {
2502
2502
  key: 1,
2503
2503
  class: "resize-handle",
2504
2504
  onMousedown: w
2505
2505
  }, [...T[5] || (T[5] = [
2506
- A("div", { class: "resize-line" }, null, -1)
2507
- ])], 32)) : H("", !0),
2508
- A("div", {
2506
+ E("div", { class: "resize-line" }, null, -1)
2507
+ ])], 32)) : U("", !0),
2508
+ E("div", {
2509
2509
  class: "output-panel",
2510
- style: ie({ width: o.showEditor ? 100 - g.value + "%" : "100%" })
2510
+ style: se({ width: o.showEditor ? 100 - g.value + "%" : "100%" })
2511
2511
  }, [
2512
- A("div", Ye, [
2513
- A("div", Xe, [
2514
- A("button", {
2512
+ E("div", et, [
2513
+ E("div", tt, [
2514
+ E("button", {
2515
2515
  class: W(["tab", { active: I.value === "stdout" }]),
2516
- onClick: T[2] || (T[2] = (_) => I.value = "stdout")
2516
+ onClick: T[2] || (T[2] = (x) => I.value = "stdout")
2517
2517
  }, " 输出 ", 2),
2518
- S.value ? (x(), N("button", {
2518
+ h.value ? (F(), R("button", {
2519
2519
  key: 0,
2520
2520
  class: W(["tab", { active: I.value === "stderr" }]),
2521
- onClick: T[3] || (T[3] = (_) => I.value = "stderr")
2522
- }, " 错误 ", 2)) : H("", !0)
2521
+ onClick: T[3] || (T[3] = (x) => I.value = "stderr")
2522
+ }, " 错误 ", 2)) : U("", !0)
2523
2523
  ]),
2524
- A("div", Ze, [
2525
- O.value !== null ? (x(), N("span", Ke, B(O.value) + "ms ", 1)) : H("", !0),
2526
- A("button", {
2524
+ E("div", at, [
2525
+ N.value !== null ? (F(), R("span", nt, H(N.value) + "ms ", 1)) : U("", !0),
2526
+ E("button", {
2527
2527
  class: "btn-icon",
2528
- onClick: c,
2528
+ onClick: d,
2529
2529
  title: "复制"
2530
2530
  }, [...T[6] || (T[6] = [
2531
- A("svg", {
2531
+ E("svg", {
2532
2532
  width: "14",
2533
2533
  height: "14",
2534
2534
  viewBox: "0 0 24 24",
@@ -2536,7 +2536,7 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2536
2536
  stroke: "currentColor",
2537
2537
  "stroke-width": "2"
2538
2538
  }, [
2539
- A("rect", {
2539
+ E("rect", {
2540
2540
  x: "9",
2541
2541
  y: "9",
2542
2542
  width: "13",
@@ -2544,15 +2544,15 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2544
2544
  rx: "2",
2545
2545
  ry: "2"
2546
2546
  }),
2547
- A("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2547
+ E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
2548
2548
  ], -1)
2549
2549
  ])]),
2550
- A("button", {
2550
+ E("button", {
2551
2551
  class: "btn-icon",
2552
- onClick: s,
2552
+ onClick: i,
2553
2553
  title: "清除"
2554
2554
  }, [...T[7] || (T[7] = [
2555
- A("svg", {
2555
+ E("svg", {
2556
2556
  width: "14",
2557
2557
  height: "14",
2558
2558
  viewBox: "0 0 24 24",
@@ -2560,29 +2560,119 @@ const Re = ["innerHTML"], xe = ["value", "disabled"], Ne = /* @__PURE__ */ ue({
2560
2560
  stroke: "currentColor",
2561
2561
  "stroke-width": "2"
2562
2562
  }, [
2563
- A("polyline", { points: "3 6 5 6 21 6" }),
2564
- A("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
2563
+ E("polyline", { points: "3 6 5 6 21 6" }),
2564
+ E("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
2565
2565
  ], -1)
2566
2566
  ])])
2567
2567
  ])
2568
2568
  ]),
2569
- A("div", qe, [
2570
- I.value === "stdout" ? (x(), N("pre", Je, B(f.value || '点击"运行"执行代码'), 1)) : (x(), N("pre", Qe, B(S.value), 1))
2569
+ E("div", rt, [
2570
+ I.value === "stdout" ? (F(), R("pre", st, H(f.value || '点击"运行"执行代码'), 1)) : (F(), R("pre", it, H(h.value), 1))
2571
2571
  ])
2572
2572
  ], 4)
2573
2573
  ])
2574
2574
  ], 2));
2575
2575
  }
2576
- }), re = /* @__PURE__ */ ge(et, [["__scopeId", "data-v-6e14ca02"]]);
2577
- re.install = (o) => {
2578
- o.component("CodeRunner", re);
2576
+ }), J = /* @__PURE__ */ ue(ot, [["__scopeId", "data-v-6e14ca02"]]), lt = { class: "dialog-header" }, ut = { class: "dialog-title" }, dt = { class: "dialog-body" }, ct = {
2577
+ key: 0,
2578
+ class: "dialog-footer"
2579
+ }, pt = /* @__PURE__ */ oe({
2580
+ __name: "CodeRunnerDialog",
2581
+ props: {
2582
+ modelValue: { type: Boolean, default: !1 },
2583
+ title: { default: "代码执行器" },
2584
+ width: { default: 800 },
2585
+ pistonUrl: { default: "/api/piston" },
2586
+ language: { default: "javascript" },
2587
+ theme: { default: "light" },
2588
+ showLanguageSelector: { type: Boolean, default: !0 },
2589
+ showEditor: { type: Boolean, default: !0 },
2590
+ editable: { type: Boolean, default: !0 },
2591
+ defaultCode: {},
2592
+ executorLabel: { default: "运行" }
2593
+ },
2594
+ emits: ["update:modelValue", "close"],
2595
+ setup(o, { expose: c, emit: a }) {
2596
+ const l = o, m = a, y = L(l.modelValue), A = G(() => l.modelValue !== void 0 ? l.modelValue : y.value);
2597
+ le(
2598
+ () => l.modelValue,
2599
+ (h) => {
2600
+ h !== void 0 && (y.value = h);
2601
+ }
2602
+ );
2603
+ function s() {
2604
+ y.value = !1, m("update:modelValue", !1), m("close");
2605
+ }
2606
+ function f(h) {
2607
+ h.target === h.currentTarget && s();
2608
+ }
2609
+ return c({
2610
+ close: s
2611
+ }), (h, k) => (F(), we(Te, { to: "body" }, [
2612
+ ie(ke, { name: "dialog-fade" }, {
2613
+ default: Ie(() => [
2614
+ A.value ? (F(), R("div", {
2615
+ key: 0,
2616
+ class: "dialog-overlay",
2617
+ onClick: f
2618
+ }, [
2619
+ E("div", {
2620
+ class: "dialog-container",
2621
+ style: se({ width: typeof o.width == "number" ? o.width + "px" : o.width })
2622
+ }, [
2623
+ E("div", lt, [
2624
+ E("h3", ut, H(o.title), 1),
2625
+ E("button", {
2626
+ class: "dialog-close",
2627
+ onClick: s
2628
+ }, [...k[0] || (k[0] = [
2629
+ E("svg", {
2630
+ width: "16",
2631
+ height: "16",
2632
+ viewBox: "0 0 24 24",
2633
+ fill: "none",
2634
+ stroke: "currentColor",
2635
+ "stroke-width": "2"
2636
+ }, [
2637
+ E("line", {
2638
+ x1: "18",
2639
+ y1: "6",
2640
+ x2: "6",
2641
+ y2: "18"
2642
+ }),
2643
+ E("line", {
2644
+ x1: "6",
2645
+ y1: "6",
2646
+ x2: "18",
2647
+ y2: "18"
2648
+ })
2649
+ ], -1)
2650
+ ])])
2651
+ ]),
2652
+ E("div", dt, [
2653
+ ie(J, _e(Fe(h.$attrs)), null, 16)
2654
+ ]),
2655
+ h.$slots.footer ? (F(), R("div", ct, [
2656
+ Re(h.$slots, "footer", { close: s }, void 0, !0)
2657
+ ])) : U("", !0)
2658
+ ], 4)
2659
+ ])) : U("", !0)
2660
+ ]),
2661
+ _: 3
2662
+ })
2663
+ ]));
2664
+ }
2665
+ }), mt = /* @__PURE__ */ ue(pt, [["__scopeId", "data-v-8a12e3c8"]]);
2666
+ J.install = (o) => {
2667
+ o.component("CodeRunner", J);
2579
2668
  };
2580
- const at = {
2669
+ const ft = {
2581
2670
  install(o) {
2582
- o.component("CodeRunner", re);
2671
+ o.component("CodeRunner", J);
2583
2672
  }
2584
2673
  };
2585
2674
  export {
2586
- re as CodeRunner,
2587
- at as default
2675
+ J as CodeRunner,
2676
+ mt as CodeRunnerDialog,
2677
+ ft as default
2588
2678
  };