@hep-code-runner/vue3 2.3.12 → 2.3.14

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,46 +1,46 @@
1
- import { defineComponent as se, useCssVars as pe, ref as I, computed as M, onMounted as ge, watch as U, onUnmounted as he, openBlock as w, createElementBlock as T, normalizeClass as B, createElementVNode as E, normalizeStyle as K, withDirectives as me, createCommentVNode as P, Fragment as fe, renderList as be, toDisplayString as $, vModelSelect as Ee, createTextVNode as ve, createStaticVNode as ye, createVNode as oe, createBlock as ke, Teleport as Se, Transition as we, withCtx as Ae, renderSlot as Te } from "vue";
2
- var xe = Object.defineProperty, ne = (u, n, i) => ((l, h, f) => h in l ? xe(l, h, { enumerable: !0, configurable: !0, writable: !0, value: f }) : l[h] = f)(u, typeof n != "symbol" ? n + "" : n, i);
3
- let ae = null;
4
- class Fe {
1
+ import { defineComponent as le, useCssVars as ge, ref as I, computed as M, onMounted as he, watch as U, onUnmounted as me, openBlock as A, createElementBlock as x, normalizeClass as B, createElementVNode as b, normalizeStyle as q, withDirectives as fe, createCommentVNode as D, Fragment as be, renderList as ve, toDisplayString as $, vModelSelect as Ee, createTextVNode as ye, createStaticVNode as ke, createVNode as se, createBlock as Se, Teleport as we, Transition as Ae, withCtx as Te, renderSlot as xe } from "vue";
2
+ var Fe = Object.defineProperty, ae = (u, n, l) => ((i, h, k) => h in i ? Fe(i, h, { enumerable: !0, configurable: !0, writable: !0, value: k }) : i[h] = k)(u, typeof n != "symbol" ? n + "" : n, l);
3
+ let re = null;
4
+ class Ie {
5
5
  constructor(n = {}) {
6
- ne(this, "baseUrl"), ne(this, "timeout"), ne(this, "token"), this.baseUrl = n.pistonUrl || "/api/piston", this.timeout = n.timeout || 3e3, this.token = n.token;
6
+ ae(this, "baseUrl"), ae(this, "timeout"), ae(this, "token"), this.baseUrl = n.pistonUrl || "/api/piston", this.timeout = n.timeout || 3e3, this.token = n.token;
7
7
  }
8
8
  authHeaders() {
9
9
  const n = { "Content-Type": "application/json" };
10
10
  return this.token && (n.authorization = `Bearer ${this.token}`, n["id-token"] = this.token), n;
11
11
  }
12
12
  async getRuntimes(n = !1) {
13
- if (ae && !n) return ae;
13
+ if (re && !n) return re;
14
14
  try {
15
- const i = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
16
- if (!i.ok) throw new Error(`Failed to fetch runtimes: ${i.statusText}`);
17
- const l = await i.json();
18
- return ae = l, l;
19
- } catch (i) {
20
- throw i;
15
+ const l = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
16
+ if (!l.ok) throw new Error(`Failed to fetch runtimes: ${l.statusText}`);
17
+ const i = await l.json();
18
+ return re = i, i;
19
+ } catch (l) {
20
+ throw l;
21
21
  }
22
22
  }
23
- async execute(n, i, l = {}) {
24
- const h = (await this.getRuntimes()).find((k) => {
25
- var b;
26
- return k.language.toLowerCase() === n.toLowerCase() || ((b = k.aliases) == null ? void 0 : b.some((A) => A.toLowerCase() === n.toLowerCase()));
23
+ async execute(n, l, i = {}) {
24
+ const h = (await this.getRuntimes()).find((y) => {
25
+ var v;
26
+ return y.language.toLowerCase() === n.toLowerCase() || ((v = y.aliases) == null ? void 0 : v.some((F) => F.toLowerCase() === n.toLowerCase()));
27
27
  });
28
28
  if (!h) throw new Error(`Language '${n}' is not supported`);
29
- const f = this.getFileName(n), s = { language: h.language, version: l.version || h.version, files: [{ name: f, content: i }], stdin: l.stdin || "", args: l.args || [], run_timeout: l.runTimeout || this.timeout, compile_timeout: this.timeout }, S = Date.now();
29
+ const k = this.getFileName(n), o = { language: h.language, version: i.version || h.version, files: [{ name: k, content: l }], stdin: i.stdin || "", args: i.args || [], run_timeout: i.runTimeout || this.timeout, compile_timeout: this.timeout }, E = Date.now();
30
30
  try {
31
- const k = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(s) });
32
- if (!k.ok) throw new Error(`Execute failed: ${k.statusText}`);
33
- const b = await k.json(), A = Date.now() - S, x = b.run.stdout || "", v = b.run.stderr || "";
34
- return { success: b.run.code === 0, output: x, stderr: v, code: b.run.code, executionTime: A, compile: b.compile ? { stdout: b.compile.stdout || "", stderr: b.compile.stderr || "", code: b.compile.code } : void 0 };
35
- } catch (k) {
36
- return { success: !1, output: "", stderr: k instanceof Error ? k.message : "Unknown error", code: -1, executionTime: Date.now() - S };
31
+ const y = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(o) });
32
+ if (!y.ok) throw new Error(`Execute failed: ${y.statusText}`);
33
+ const v = await y.json(), F = Date.now() - E, R = v.run.stdout || "", _ = v.run.stderr || "";
34
+ return { success: v.run.code === 0, output: R, stderr: _, code: v.run.code, executionTime: F, compile: v.compile ? { stdout: v.compile.stdout || "", stderr: v.compile.stderr || "", code: v.compile.code } : void 0 };
35
+ } catch (y) {
36
+ return { success: !1, output: "", stderr: y instanceof Error ? y.message : "Unknown error", code: -1, executionTime: Date.now() - E };
37
37
  }
38
38
  }
39
39
  getFileName(n) {
40
40
  return { javascript: "main.js", typescript: "main.ts", python: "main.py", python3: "main.py", go: "main.go", rust: "main.rs", java: "Main.java", c: "main.c", cpp: "main.cpp", csharp: "Main.cs", ruby: "main.rb", php: "main.php", bash: "main.sh", shell: "main.sh", perl: "main.pl", lua: "main.lua", swift: "main.swift", kotlin: "Main.kt", scala: "Main.scala", haskell: "main.hs", dart: "main.dart", html: "index.html", css: "style.css", sql: "query.sql", markdown: "readme.md" }[n.toLowerCase()] || `main.${n}`;
41
41
  }
42
42
  }
43
- const Ie = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
43
+ const _e = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
44
44
 
45
45
  import "fmt"
46
46
 
@@ -106,42 +106,47 @@ h1 {
106
106
  }`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
107
107
 
108
108
  This is a sample markdown document.` };
109
- var le = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
110
- function _e(u) {
109
+ function ie(u) {
110
+ const n = u.toLowerCase().split(":")[0];
111
+ return _e[n] || `// ${u}
112
+ // Write your code here`;
113
+ }
114
+ var ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
115
+ function Re(u) {
111
116
  return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
112
117
  }
113
- var ue = { exports: {} };
118
+ var de = { exports: {} };
114
119
  (function(u) {
115
- var n = function(i) {
116
- var l = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, h = 0, f = {}, s = { manual: i.Prism && i.Prism.manual, disableWorkerMessageHandler: i.Prism && i.Prism.disableWorkerMessageHandler, util: { encode: function t(e) {
117
- return e instanceof S ? new S(e.type, t(e.content), e.alias) : Array.isArray(e) ? e.map(t) : e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
120
+ var n = function(l) {
121
+ var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, h = 0, k = {}, o = { manual: l.Prism && l.Prism.manual, disableWorkerMessageHandler: l.Prism && l.Prism.disableWorkerMessageHandler, util: { encode: function t(e) {
122
+ return e instanceof E ? new E(e.type, t(e.content), e.alias) : Array.isArray(e) ? e.map(t) : e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
118
123
  }, type: function(t) {
119
124
  return Object.prototype.toString.call(t).slice(8, -1);
120
125
  }, objId: function(t) {
121
126
  return t.__id || Object.defineProperty(t, "__id", { value: ++h }), t.__id;
122
127
  }, clone: function t(e, a) {
123
- var r, o;
124
- switch (a = a || {}, s.util.type(e)) {
128
+ var r, s;
129
+ switch (a = a || {}, o.util.type(e)) {
125
130
  case "Object":
126
- if (o = s.util.objId(e), a[o]) return a[o];
127
- for (var d in r = {}, a[o] = r, e) e.hasOwnProperty(d) && (r[d] = t(e[d], a));
131
+ if (s = o.util.objId(e), a[s]) return a[s];
132
+ for (var p in r = {}, a[s] = r, e) e.hasOwnProperty(p) && (r[p] = t(e[p], a));
128
133
  return r;
129
134
  case "Array":
130
- return o = s.util.objId(e), a[o] ? a[o] : (r = [], a[o] = r, e.forEach(function(p, m) {
131
- r[m] = t(p, a);
135
+ return s = o.util.objId(e), a[s] ? a[s] : (r = [], a[s] = r, e.forEach(function(d, f) {
136
+ r[f] = t(d, a);
132
137
  }), r);
133
138
  default:
134
139
  return e;
135
140
  }
136
141
  }, getLanguage: function(t) {
137
142
  for (; t; ) {
138
- var e = l.exec(t.className);
143
+ var e = i.exec(t.className);
139
144
  if (e) return e[1].toLowerCase();
140
145
  t = t.parentElement;
141
146
  }
142
147
  return "none";
143
148
  }, setLanguage: function(t, e) {
144
- t.className = t.className.replace(RegExp(l, "gi"), ""), t.classList.add("language-" + e);
149
+ t.className = t.className.replace(RegExp(i, "gi"), ""), t.classList.add("language-" + e);
145
150
  }, currentScript: function() {
146
151
  if (typeof document > "u") return null;
147
152
  if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
@@ -157,263 +162,263 @@ var ue = { exports: {} };
157
162
  }
158
163
  }, isActive: function(t, e, a) {
159
164
  for (var r = "no-" + e; t; ) {
160
- var o = t.classList;
161
- if (o.contains(e)) return !0;
162
- if (o.contains(r)) return !1;
165
+ var s = t.classList;
166
+ if (s.contains(e)) return !0;
167
+ if (s.contains(r)) return !1;
163
168
  t = t.parentElement;
164
169
  }
165
170
  return !!a;
166
- } }, languages: { plain: f, plaintext: f, text: f, txt: f, extend: function(t, e) {
167
- var a = s.util.clone(s.languages[t]);
171
+ } }, languages: { plain: k, plaintext: k, text: k, txt: k, extend: function(t, e) {
172
+ var a = o.util.clone(o.languages[t]);
168
173
  for (var r in e) a[r] = e[r];
169
174
  return a;
170
175
  }, insertBefore: function(t, e, a, r) {
171
- var o = (r = r || s.languages)[t], d = {};
172
- for (var p in o) if (o.hasOwnProperty(p)) {
173
- if (p == e) for (var m in a) a.hasOwnProperty(m) && (d[m] = a[m]);
174
- a.hasOwnProperty(p) || (d[p] = o[p]);
176
+ var s = (r = r || o.languages)[t], p = {};
177
+ for (var d in s) if (s.hasOwnProperty(d)) {
178
+ if (d == e) for (var f in a) a.hasOwnProperty(f) && (p[f] = a[f]);
179
+ a.hasOwnProperty(d) || (p[d] = s[d]);
175
180
  }
176
- var F = r[t];
177
- return r[t] = d, s.languages.DFS(s.languages, function(R, j) {
178
- j === F && R != t && (this[R] = d);
179
- }), d;
180
- }, DFS: function t(e, a, r, o) {
181
- o = o || {};
182
- var d = s.util.objId;
183
- for (var p in e) if (e.hasOwnProperty(p)) {
184
- a.call(e, p, e[p], r || p);
185
- var m = e[p], F = s.util.type(m);
186
- F !== "Object" || o[d(m)] ? F !== "Array" || o[d(m)] || (o[d(m)] = !0, t(m, a, p, o)) : (o[d(m)] = !0, t(m, a, null, o));
181
+ var T = r[t];
182
+ return r[t] = p, o.languages.DFS(o.languages, function(N, j) {
183
+ j === T && N != t && (this[N] = p);
184
+ }), p;
185
+ }, DFS: function t(e, a, r, s) {
186
+ s = s || {};
187
+ var p = o.util.objId;
188
+ for (var d in e) if (e.hasOwnProperty(d)) {
189
+ a.call(e, d, e[d], r || d);
190
+ var f = e[d], T = o.util.type(f);
191
+ T !== "Object" || s[p(f)] ? T !== "Array" || s[p(f)] || (s[p(f)] = !0, t(f, a, d, s)) : (s[p(f)] = !0, t(f, a, null, s));
187
192
  }
188
193
  } }, plugins: {}, highlightAll: function(t, e) {
189
- s.highlightAllUnder(document, t, e);
194
+ o.highlightAllUnder(document, t, e);
190
195
  }, highlightAllUnder: function(t, e, a) {
191
196
  var r = { callback: a, container: t, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
192
- 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);
193
- for (var o, d = 0; o = r.elements[d++]; ) s.highlightElement(o, e === !0, r.callback);
197
+ o.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), o.hooks.run("before-all-elements-highlight", r);
198
+ for (var s, p = 0; s = r.elements[p++]; ) o.highlightElement(s, e === !0, r.callback);
194
199
  }, highlightElement: function(t, e, a) {
195
- var r = s.util.getLanguage(t), o = s.languages[r];
196
- s.util.setLanguage(t, r);
197
- var d = t.parentElement;
198
- d && d.nodeName.toLowerCase() === "pre" && s.util.setLanguage(d, r);
199
- var p = { element: t, language: r, grammar: o, code: t.textContent };
200
- function m(R) {
201
- p.highlightedCode = R, s.hooks.run("before-insert", p), p.element.innerHTML = p.highlightedCode, s.hooks.run("after-highlight", p), s.hooks.run("complete", p), a && a.call(p.element);
200
+ var r = o.util.getLanguage(t), s = o.languages[r];
201
+ o.util.setLanguage(t, r);
202
+ var p = t.parentElement;
203
+ p && p.nodeName.toLowerCase() === "pre" && o.util.setLanguage(p, r);
204
+ var d = { element: t, language: r, grammar: s, code: t.textContent };
205
+ function f(N) {
206
+ d.highlightedCode = N, o.hooks.run("before-insert", d), d.element.innerHTML = d.highlightedCode, o.hooks.run("after-highlight", d), o.hooks.run("complete", d), a && a.call(d.element);
202
207
  }
203
- if (s.hooks.run("before-sanity-check", p), (d = p.element.parentElement) && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !p.code) return s.hooks.run("complete", p), void (a && a.call(p.element));
204
- if (s.hooks.run("before-highlight", p), p.grammar) if (e && i.Worker) {
205
- var F = new Worker(s.filename);
206
- F.onmessage = function(R) {
207
- m(R.data);
208
- }, F.postMessage(JSON.stringify({ language: p.language, code: p.code, immediateClose: !0 }));
209
- } else m(s.highlight(p.code, p.grammar, p.language));
210
- else m(s.util.encode(p.code));
208
+ if (o.hooks.run("before-sanity-check", d), (p = d.element.parentElement) && p.nodeName.toLowerCase() === "pre" && !p.hasAttribute("tabindex") && p.setAttribute("tabindex", "0"), !d.code) return o.hooks.run("complete", d), void (a && a.call(d.element));
209
+ if (o.hooks.run("before-highlight", d), d.grammar) if (e && l.Worker) {
210
+ var T = new Worker(o.filename);
211
+ T.onmessage = function(N) {
212
+ f(N.data);
213
+ }, T.postMessage(JSON.stringify({ language: d.language, code: d.code, immediateClose: !0 }));
214
+ } else f(o.highlight(d.code, d.grammar, d.language));
215
+ else f(o.util.encode(d.code));
211
216
  }, highlight: function(t, e, a) {
212
217
  var r = { code: t, grammar: e, language: a };
213
- if (s.hooks.run("before-tokenize", r), !r.grammar) throw new Error('The language "' + r.language + '" has no grammar.');
214
- return r.tokens = s.tokenize(r.code, r.grammar), s.hooks.run("after-tokenize", r), S.stringify(s.util.encode(r.tokens), r.language);
218
+ if (o.hooks.run("before-tokenize", r), !r.grammar) throw new Error('The language "' + r.language + '" has no grammar.');
219
+ return r.tokens = o.tokenize(r.code, r.grammar), o.hooks.run("after-tokenize", r), E.stringify(o.util.encode(r.tokens), r.language);
215
220
  }, tokenize: function(t, e) {
216
221
  var a = e.rest;
217
222
  if (a) {
218
223
  for (var r in a) e[r] = a[r];
219
224
  delete e.rest;
220
225
  }
221
- var o = new A();
222
- return x(o, o.head, t), b(t, o, e, o.head, 0), function(d) {
223
- for (var p = [], m = d.head.next; m !== d.tail; ) p.push(m.value), m = m.next;
224
- return p;
225
- }(o);
226
+ var s = new F();
227
+ return R(s, s.head, t), v(t, s, e, s.head, 0), function(p) {
228
+ for (var d = [], f = p.head.next; f !== p.tail; ) d.push(f.value), f = f.next;
229
+ return d;
230
+ }(s);
226
231
  }, hooks: { all: {}, add: function(t, e) {
227
- var a = s.hooks.all;
232
+ var a = o.hooks.all;
228
233
  a[t] = a[t] || [], a[t].push(e);
229
234
  }, run: function(t, e) {
230
- var a = s.hooks.all[t];
231
- if (a && a.length) for (var r, o = 0; r = a[o++]; ) r(e);
232
- } }, Token: S };
233
- function S(t, e, a, r) {
235
+ var a = o.hooks.all[t];
236
+ if (a && a.length) for (var r, s = 0; r = a[s++]; ) r(e);
237
+ } }, Token: E };
238
+ function E(t, e, a, r) {
234
239
  this.type = t, this.content = e, this.alias = a, this.length = 0 | (r || "").length;
235
240
  }
236
- function k(t, e, a, r) {
241
+ function y(t, e, a, r) {
237
242
  t.lastIndex = e;
238
- var o = t.exec(a);
239
- if (o && r && o[1]) {
240
- var d = o[1].length;
241
- o.index += d, o[0] = o[0].slice(d);
243
+ var s = t.exec(a);
244
+ if (s && r && s[1]) {
245
+ var p = s[1].length;
246
+ s.index += p, s[0] = s[0].slice(p);
242
247
  }
243
- return o;
248
+ return s;
244
249
  }
245
- function b(t, e, a, r, o, d) {
246
- for (var p in a) if (a.hasOwnProperty(p) && a[p]) {
247
- var m = a[p];
248
- m = Array.isArray(m) ? m : [m];
249
- for (var F = 0; F < m.length; ++F) {
250
- if (d && d.cause == p + "," + F) return;
251
- var R = m[F], j = R.inside, V = !!R.lookbehind, G = !!R.greedy, J = R.alias;
252
- if (G && !R.pattern.global) {
253
- var Y = R.pattern.toString().match(/[imsuy]*$/)[0];
254
- R.pattern = RegExp(R.pattern.source, Y + "g");
250
+ function v(t, e, a, r, s, p) {
251
+ for (var d in a) if (a.hasOwnProperty(d) && a[d]) {
252
+ var f = a[d];
253
+ f = Array.isArray(f) ? f : [f];
254
+ for (var T = 0; T < f.length; ++T) {
255
+ if (p && p.cause == d + "," + T) return;
256
+ var N = f[T], j = N.inside, Y = !!N.lookbehind, X = !!N.greedy, G = N.alias;
257
+ if (X && !N.pattern.global) {
258
+ var Q = N.pattern.toString().match(/[imsuy]*$/)[0];
259
+ N.pattern = RegExp(N.pattern.source, Q + "g");
255
260
  }
256
- for (var z = R.pattern || R, O = r.next, c = o; O !== e.tail && !(d && c >= d.reach); c += O.value.length, O = O.next) {
257
- var g = O.value;
261
+ for (var z = N.pattern || N, L = r.next, C = s; L !== e.tail && !(p && C >= p.reach); C += L.value.length, L = L.next) {
262
+ var c = L.value;
258
263
  if (e.length > t.length) return;
259
- if (!(g instanceof S)) {
260
- var y, C = 1;
261
- if (G) {
262
- if (!(y = k(z, c, t, V)) || y.index >= t.length) break;
263
- var D = y.index, de = y.index + y[0].length, H = c;
264
- for (H += O.value.length; D >= H; ) H += (O = O.next).value.length;
265
- if (c = H -= O.value.length, O.value instanceof S) continue;
266
- for (var W = O; W !== e.tail && (H < de || typeof W.value == "string"); W = W.next) C++, H += W.value.length;
267
- C--, g = t.slice(c, H), y.index -= c;
268
- } else if (!(y = k(z, 0, g, V))) continue;
269
- D = y.index;
270
- var X = y[0], Q = g.slice(0, D), ie = g.slice(D + X.length), ee = c + g.length;
271
- d && ee > d.reach && (d.reach = ee);
272
- var Z = O.prev;
273
- if (Q && (Z = x(e, Z, Q), c += Q.length), v(e, Z, C), O = x(e, Z, new S(p, j ? s.tokenize(X, j) : X, J, X)), ie && x(e, O, ie), C > 1) {
274
- var te = { cause: p + "," + F, reach: ee };
275
- b(t, e, a, O.prev, c, te), d && te.reach > d.reach && (d.reach = te.reach);
264
+ if (!(c instanceof E)) {
265
+ var g, w = 1;
266
+ if (X) {
267
+ if (!(g = y(z, C, t, Y)) || g.index >= t.length) break;
268
+ var P = g.index, W = g.index + g[0].length, H = C;
269
+ for (H += L.value.length; P >= H; ) H += (L = L.next).value.length;
270
+ if (C = H -= L.value.length, L.value instanceof E) continue;
271
+ for (var V = L; V !== e.tail && (H < W || typeof V.value == "string"); V = V.next) w++, H += V.value.length;
272
+ w--, c = t.slice(C, H), g.index -= C;
273
+ } else if (!(g = y(z, 0, c, Y))) continue;
274
+ P = g.index;
275
+ var Z = g[0], ee = c.slice(0, P), ue = c.slice(P + Z.length), te = C + c.length;
276
+ p && te > p.reach && (p.reach = te);
277
+ var K = L.prev;
278
+ if (ee && (K = R(e, K, ee), C += ee.length), _(e, K, w), L = R(e, K, new E(d, j ? o.tokenize(Z, j) : Z, G, Z)), ue && R(e, L, ue), w > 1) {
279
+ var ne = { cause: d + "," + T, reach: te };
280
+ v(t, e, a, L.prev, C, ne), p && ne.reach > p.reach && (p.reach = ne.reach);
276
281
  }
277
282
  }
278
283
  }
279
284
  }
280
285
  }
281
286
  }
282
- function A() {
287
+ function F() {
283
288
  var t = { value: null, prev: null, next: null }, e = { value: null, prev: t, next: null };
284
289
  t.next = e, this.head = t, this.tail = e, this.length = 0;
285
290
  }
286
- function x(t, e, a) {
287
- var r = e.next, o = { value: a, prev: e, next: r };
288
- return e.next = o, r.prev = o, t.length++, o;
291
+ function R(t, e, a) {
292
+ var r = e.next, s = { value: a, prev: e, next: r };
293
+ return e.next = s, r.prev = s, t.length++, s;
289
294
  }
290
- function v(t, e, a) {
291
- for (var r = e.next, o = 0; o < a && r !== t.tail; o++) r = r.next;
292
- e.next = r, r.prev = e, t.length -= o;
295
+ function _(t, e, a) {
296
+ for (var r = e.next, s = 0; s < a && r !== t.tail; s++) r = r.next;
297
+ e.next = r, r.prev = e, t.length -= s;
293
298
  }
294
- if (i.Prism = s, S.stringify = function t(e, a) {
299
+ if (l.Prism = o, E.stringify = function t(e, a) {
295
300
  if (typeof e == "string") return e;
296
301
  if (Array.isArray(e)) {
297
302
  var r = "";
298
- return e.forEach(function(F) {
299
- r += t(F, a);
303
+ return e.forEach(function(T) {
304
+ r += t(T, a);
300
305
  }), r;
301
306
  }
302
- var o = { type: e.type, content: t(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a }, d = e.alias;
303
- d && (Array.isArray(d) ? Array.prototype.push.apply(o.classes, d) : o.classes.push(d)), s.hooks.run("wrap", o);
304
- var p = "";
305
- for (var m in o.attributes) p += " " + m + '="' + (o.attributes[m] || "").replace(/"/g, "&quot;") + '"';
306
- return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + p + ">" + o.content + "</" + o.tag + ">";
307
- }, !i.document) return i.addEventListener && (s.disableWorkerMessageHandler || i.addEventListener("message", function(t) {
308
- var e = JSON.parse(t.data), a = e.language, r = e.code, o = e.immediateClose;
309
- i.postMessage(s.highlight(r, s.languages[a], a)), o && i.close();
310
- }, !1)), s;
311
- var _ = s.util.currentScript();
312
- function N() {
313
- s.manual || s.highlightAll();
307
+ var s = { type: e.type, content: t(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a }, p = e.alias;
308
+ p && (Array.isArray(p) ? Array.prototype.push.apply(s.classes, p) : s.classes.push(p)), o.hooks.run("wrap", s);
309
+ var d = "";
310
+ for (var f in s.attributes) d += " " + f + '="' + (s.attributes[f] || "").replace(/"/g, "&quot;") + '"';
311
+ return "<" + s.tag + ' class="' + s.classes.join(" ") + '"' + d + ">" + s.content + "</" + s.tag + ">";
312
+ }, !l.document) return l.addEventListener && (o.disableWorkerMessageHandler || l.addEventListener("message", function(t) {
313
+ var e = JSON.parse(t.data), a = e.language, r = e.code, s = e.immediateClose;
314
+ l.postMessage(o.highlight(r, o.languages[a], a)), s && l.close();
315
+ }, !1)), o;
316
+ var O = o.util.currentScript();
317
+ function m() {
318
+ o.manual || o.highlightAll();
314
319
  }
315
- if (_ && (s.filename = _.src, _.hasAttribute("data-manual") && (s.manual = !0)), !s.manual) {
316
- var L = document.readyState;
317
- L === "loading" || L === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", N) : window.requestAnimationFrame ? window.requestAnimationFrame(N) : window.setTimeout(N, 16);
320
+ if (O && (o.filename = O.src, O.hasAttribute("data-manual") && (o.manual = !0)), !o.manual) {
321
+ var S = document.readyState;
322
+ S === "loading" || S === "interactive" && O && O.defer ? document.addEventListener("DOMContentLoaded", m) : window.requestAnimationFrame ? window.requestAnimationFrame(m) : window.setTimeout(m, 16);
318
323
  }
319
- return s;
324
+ return o;
320
325
  }(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
321
- u.exports && (u.exports = n), le !== void 0 && (le.Prism = n), n.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(i) {
322
- i.type === "entity" && (i.attributes.title = i.content.replace(/&amp;/, "&"));
323
- }), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(i, l) {
326
+ u.exports && (u.exports = n), ce !== void 0 && (ce.Prism = n), n.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(l) {
327
+ l.type === "entity" && (l.attributes.title = l.content.replace(/&amp;/, "&"));
328
+ }), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(l, i) {
324
329
  var h = {};
325
- h["language-" + l] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: n.languages[l] }, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
326
- var f = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: h } };
327
- f["language-" + l] = { pattern: /[\s\S]+/, inside: n.languages[l] };
328
- var s = {};
329
- s[i] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
330
- return i;
331
- }), "i"), lookbehind: !0, greedy: !0, inside: f }, n.languages.insertBefore("markup", "cdata", s);
332
- } }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(i, l) {
333
- n.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + i + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [l, "language-" + l], inside: n.languages[l] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
334
- } }), 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(i) {
335
- var l = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
336
- i.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + l.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + l.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + l.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + l.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: l, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, i.languages.css.atrule.inside.rest = i.languages.css;
337
- var h = i.languages.markup;
330
+ h["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: n.languages[i] }, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
331
+ var k = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: h } };
332
+ k["language-" + i] = { pattern: /[\s\S]+/, inside: n.languages[i] };
333
+ var o = {};
334
+ o[l] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
335
+ return l;
336
+ }), "i"), lookbehind: !0, greedy: !0, inside: k }, n.languages.insertBefore("markup", "cdata", o);
337
+ } }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(l, i) {
338
+ n.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + l + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [i, "language-" + i], inside: n.languages[i] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
339
+ } }), 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(l) {
340
+ var i = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
341
+ l.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + i.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + i.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + i.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + i.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: i, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, l.languages.css.atrule.inside.rest = l.languages.css;
342
+ var h = l.languages.markup;
338
343
  h && (h.tag.addInlined("style", "css"), h.tag.addAttribute("style", "css"));
339
344
  }(n), n.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, n.languages.javascript = n.languages.extend("clike", { "class-name": [n.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), n.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, n.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: n.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: n.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: n.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: n.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: n.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), n.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: n.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), n.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), n.languages.markup && (n.languages.markup.tag.addInlined("script", "javascript"), n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), n.languages.js = n.languages.javascript, function() {
340
345
  if (n !== void 0 && typeof document < "u") {
341
346
  Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
342
- var i = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, l = "data-src-status", h = "loading", f = "loaded", s = "pre[data-src]:not([" + l + '="' + f + '"]):not([' + l + '="' + h + '"])';
343
- n.hooks.add("before-highlightall", function(k) {
344
- k.selector += ", " + s;
345
- }), n.hooks.add("before-sanity-check", function(k) {
346
- var b = k.element;
347
- if (b.matches(s)) {
348
- k.code = "", b.setAttribute(l, h);
349
- var A = b.appendChild(document.createElement("CODE"));
350
- A.textContent = "Loading…";
351
- var x = b.getAttribute("data-src"), v = k.language;
352
- if (v === "none") {
353
- var _ = (/\.(\w+)$/.exec(x) || [, "none"])[1];
354
- v = i[_] || _;
347
+ var l = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, i = "data-src-status", h = "loading", k = "loaded", o = "pre[data-src]:not([" + i + '="' + k + '"]):not([' + i + '="' + h + '"])';
348
+ n.hooks.add("before-highlightall", function(y) {
349
+ y.selector += ", " + o;
350
+ }), n.hooks.add("before-sanity-check", function(y) {
351
+ var v = y.element;
352
+ if (v.matches(o)) {
353
+ y.code = "", v.setAttribute(i, h);
354
+ var F = v.appendChild(document.createElement("CODE"));
355
+ F.textContent = "Loading…";
356
+ var R = v.getAttribute("data-src"), _ = y.language;
357
+ if (_ === "none") {
358
+ var O = (/\.(\w+)$/.exec(R) || [, "none"])[1];
359
+ _ = l[O] || O;
355
360
  }
356
- n.util.setLanguage(A, v), n.util.setLanguage(b, v);
357
- var N = n.plugins.autoloader;
358
- N && N.loadLanguages(v), function(L, t, e) {
361
+ n.util.setLanguage(F, _), n.util.setLanguage(v, _);
362
+ var m = n.plugins.autoloader;
363
+ m && m.loadLanguages(_), function(S, t, e) {
359
364
  var a = new XMLHttpRequest();
360
- a.open("GET", L, !0), a.onreadystatechange = function() {
365
+ a.open("GET", S, !0), a.onreadystatechange = function() {
361
366
  a.readyState == 4 && (a.status < 400 && a.responseText ? t(a.responseText) : a.status >= 400 ? e("✖ Error " + a.status + " while fetching file: " + a.statusText) : e("✖ Error: File does not exist or is empty"));
362
367
  }, a.send(null);
363
- }(x, function(L) {
364
- b.setAttribute(l, f);
365
- var t = function(o) {
366
- var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o || "");
367
- if (d) {
368
- var p = Number(d[1]), m = d[2], F = d[3];
369
- return m ? F ? [p, Number(F)] : [p, void 0] : [p, p];
368
+ }(R, function(S) {
369
+ v.setAttribute(i, k);
370
+ var t = function(s) {
371
+ var p = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(s || "");
372
+ if (p) {
373
+ var d = Number(p[1]), f = p[2], T = p[3];
374
+ return f ? T ? [d, Number(T)] : [d, void 0] : [d, d];
370
375
  }
371
- }(b.getAttribute("data-range"));
376
+ }(v.getAttribute("data-range"));
372
377
  if (t) {
373
- var e = L.split(/\r\n?|\n/g), a = t[0], r = t[1] == null ? e.length : t[1];
374
- a < 0 && (a += e.length), a = Math.max(0, Math.min(a - 1, e.length)), r < 0 && (r += e.length), r = Math.max(0, Math.min(r, e.length)), L = e.slice(a, r).join(`
375
- `), b.hasAttribute("data-start") || b.setAttribute("data-start", String(a + 1));
378
+ var e = S.split(/\r\n?|\n/g), a = t[0], r = t[1] == null ? e.length : t[1];
379
+ a < 0 && (a += e.length), a = Math.max(0, Math.min(a - 1, e.length)), r < 0 && (r += e.length), r = Math.max(0, Math.min(r, e.length)), S = e.slice(a, r).join(`
380
+ `), v.hasAttribute("data-start") || v.setAttribute("data-start", String(a + 1));
376
381
  }
377
- A.textContent = L, n.highlightElement(A);
378
- }, function(L) {
379
- b.setAttribute(l, "failed"), A.textContent = L;
382
+ F.textContent = S, n.highlightElement(F);
383
+ }, function(S) {
384
+ v.setAttribute(i, "failed"), F.textContent = S;
380
385
  });
381
386
  }
382
- }), n.plugins.fileHighlight = { highlight: function(k) {
383
- for (var b, A = (k || document).querySelectorAll(s), x = 0; b = A[x++]; ) n.highlightElement(b);
387
+ }), n.plugins.fileHighlight = { highlight: function(y) {
388
+ for (var v, F = (y || document).querySelectorAll(o), R = 0; v = F[R++]; ) n.highlightElement(v);
384
389
  } };
385
- var S = !1;
390
+ var E = !1;
386
391
  n.fileHighlight = function() {
387
- S || (S = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
392
+ E || (E = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
388
393
  };
389
394
  }
390
395
  }();
391
- })(ue);
392
- const re = _e(ue.exports);
396
+ })(de);
397
+ const oe = Re(de.exports);
393
398
  Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: /![sra](?=[:}]$)/, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], function(u) {
394
- var n = /\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/, i = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
395
- u.languages.java = u.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [l, { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: l.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + i + /[A-Z]\w*\b/.source), lookbehind: !0, inside: l.inside }], keyword: n, function: [u.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), u.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), u.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": l, keyword: n, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + i + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: l.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + i + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: l.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
399
+ var n = /\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/, l = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, i = { pattern: RegExp(/(^|[^\w.])/.source + l + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
400
+ u.languages.java = u.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [i, { pattern: RegExp(/(^|[^\w.])/.source + l + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: i.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + l + /[A-Z]\w*\b/.source), lookbehind: !0, inside: i.inside }], keyword: n, function: [u.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), u.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), u.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": i, keyword: n, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + l + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: i.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + l + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: i.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
396
401
  return n.source;
397
402
  })), lookbehind: !0, inside: { punctuation: /\./ } } });
398
403
  }(Prism), Prism.languages.c = Prism.languages.extend("clike", { comment: { pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, string: { pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, greedy: !0 }, "class-name": { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: !0 }, keyword: /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, function: /\b[a-z_]\w*(?=\s*\()/i, number: /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, operator: />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ }), Prism.languages.insertBefore("c", "string", { char: { pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/, greedy: !0 } }), Prism.languages.insertBefore("c", "string", { macro: { pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: !0, greedy: !0, alias: "property", inside: { string: [{ pattern: /^(#\s*include\s*)<[^>]+>/, lookbehind: !0 }, Prism.languages.c.string], char: Prism.languages.c.char, comment: Prism.languages.c.comment, "macro-name": [{ pattern: /(^#\s*define\s+)\w+\b(?!\()/i, lookbehind: !0 }, { pattern: /(^#\s*define\s+)\w+\b(?=\()/i, lookbehind: !0, alias: "function" }], directive: { pattern: /^(#\s*)[a-z]+/, lookbehind: !0, alias: "keyword" }, "directive-hash": /^#/, punctuation: /##|\\(?=[\r\n])/, expression: { pattern: /\S[\s\S]*/, inside: Prism.languages.c } } } }), Prism.languages.insertBefore("c", "function", { constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }), delete Prism.languages.c.boolean, function(u) {
399
- for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, i = 0; i < 2; i++) n = n.replace(/<self>/g, function() {
404
+ for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, l = 0; l < 2; l++) n = n.replace(/<self>/g, function() {
400
405
  return n;
401
406
  });
402
407
  n = n.replace(/<self>/g, function() {
403
408
  return /[^\s\S]/.source;
404
409
  }), u.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + n), lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: !0 }, char: { pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: !0 }, attribute: { pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/, greedy: !0, alias: "attr-name", inside: { string: null } }, "closure-params": { pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, lookbehind: !0, greedy: !0, inside: { "closure-punctuation": { pattern: /^\||\|$/, alias: "punctuation" }, rest: null } }, "lifetime-annotation": { pattern: /'\w+/, alias: "symbol" }, "fragment-specifier": { pattern: /(\$\w+:)[a-z]+/, lookbehind: !0, alias: "punctuation" }, variable: /\$\w+/, "function-definition": { pattern: /(\bfn\s+)\w+/, lookbehind: !0, alias: "function" }, "type-definition": { pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/, lookbehind: !0, alias: "class-name" }, "module-declaration": [{ pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/, lookbehind: !0, alias: "namespace" }, { pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/, lookbehind: !0, alias: "namespace", inside: { punctuation: /::/ } }], keyword: [/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/], function: /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/, macro: { pattern: /\b\w+!/, alias: "property" }, constant: /\b[A-Z_][A-Z_\d]+\b/, "class-name": /\b[A-Z]\w*\b/, namespace: { pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/, inside: { punctuation: /::/ } }, number: /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, boolean: /\b(?:false|true)\b/, punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ }, u.languages.rust["closure-params"].inside.rest = u.languages.rust, u.languages.rust.attribute.inside.string = u.languages.rust.string;
405
410
  }(Prism), Prism.languages.sql = { comment: { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: !0 }, variable: [{ pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, greedy: !0 }, /@[\w.$]+/], string: { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: !0, lookbehind: !0 }, identifier: { pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, greedy: !0, lookbehind: !0, inside: { punctuation: /^`|`$/ } }, function: /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, keyword: /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, boolean: /\b(?:FALSE|NULL|TRUE)\b/i, number: /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, punctuation: /[;[\]()`,.]/ }, function(u) {
406
- var n = "\\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", i = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, l = { bash: i, environment: { pattern: RegExp("\\$" + n), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + n), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ };
407
- u.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + n), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: i } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: l.entity } }], environment: { pattern: RegExp("\\$?" + n), alias: "constant" }, variable: l.variable, function: { pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, i.inside = u.languages.bash;
408
- for (var h = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], f = l.variable[1].inside, s = 0; s < h.length; s++) f[h[s]] = u.languages.bash[h[s]];
411
+ var n = "\\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", l = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, i = { bash: l, environment: { pattern: RegExp("\\$" + n), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + n), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ };
412
+ u.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + n), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: i }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: l } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: i }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: i.entity } }], environment: { pattern: RegExp("\\$?" + n), alias: "constant" }, variable: i.variable, function: { pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, l.inside = u.languages.bash;
413
+ for (var h = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], k = i.variable[1].inside, o = 0; o < h.length; o++) k[h[o]] = u.languages.bash[h[o]];
409
414
  u.languages.sh = u.languages.bash, u.languages.shell = u.languages.bash;
410
415
  }(Prism), Prism.languages.json = { property: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, lookbehind: !0, greedy: !0 }, string: { pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, lookbehind: !0, greedy: !0 }, comment: { pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, greedy: !0 }, number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, punctuation: /[{}[\],]/, operator: /:/, boolean: /\b(?:false|true)\b/, null: { pattern: /\bnull\b/, alias: "keyword" } }, Prism.languages.webmanifest = Prism.languages.json;
411
- const Re = ["innerHTML"], Ne = ["value", "disabled"], ce = (u, n) => {
412
- const i = u.__vccOpts || u;
413
- for (const [l, h] of n) i[l] = h;
414
- return i;
415
- }, Le = ce(se({ __name: "CodeEditor", props: { modelValue: {}, language: {}, theme: { default: "dark" }, disabled: { type: Boolean, default: !1 } }, emits: ["update:modelValue", "change"], setup(u, { emit: n }) {
416
- function i(t) {
416
+ const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, n) => {
417
+ const l = u.__vccOpts || u;
418
+ for (const [i, h] of n) l[i] = h;
419
+ return l;
420
+ }, Oe = pe(le({ __name: "CodeEditor", props: { modelValue: {}, language: {}, theme: { default: "dark" }, disabled: { type: Boolean, default: !1 } }, emits: ["update:modelValue", "change"], setup(u, { emit: n }) {
421
+ function l(t) {
417
422
  if (typeof document > "u") return;
418
423
  const e = "hep-cr-prism-styles", a = document.getElementById(e), r = t === "dark" ? `
419
424
  /* 默认代码颜色 */
@@ -580,171 +585,175 @@ const Re = ["innerHTML"], Ne = ["value", "disabled"], ce = (u, n) => {
580
585
  }
581
586
  `;
582
587
  a && a.remove();
583
- const o = document.createElement("style");
584
- o.id = e, o.textContent = r, document.head.appendChild(o);
588
+ const s = document.createElement("style");
589
+ s.id = e, s.textContent = r, document.head.appendChild(s);
585
590
  }
586
- pe((t) => ({ e3543a54: x.value })), typeof window < "u" && (window.Prism = re);
587
- const l = u, h = n, f = I(null), s = I(null);
588
- let S = null;
589
- function k(t) {
590
- S && clearTimeout(S), S = setTimeout(() => {
591
+ ge((t) => ({ e3543a54: R.value })), typeof window < "u" && (window.Prism = oe);
592
+ const i = u, h = n, k = I(null), o = I(null);
593
+ let E = null;
594
+ function y(t) {
595
+ E && clearTimeout(E), E = setTimeout(() => {
591
596
  h("change", t);
592
597
  }, 500);
593
598
  }
594
- const b = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, A = M(() => b[l.language.toLowerCase()] || "javascript"), x = M(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), v = M(() => {
599
+ const v = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, F = M(() => v[i.language.toLowerCase()] || "javascript"), R = M(() => i.theme === "dark" ? "#1e1e1e" : "#fafafa"), _ = M(() => {
595
600
  try {
596
- const t = re.languages[A.value];
597
- if (t) return re.highlight(l.modelValue || "", t, A.value);
601
+ const t = oe.languages[F.value];
602
+ if (t) return oe.highlight(i.modelValue || "", t, F.value);
598
603
  } catch {
599
604
  }
600
605
  return function(t) {
601
606
  const e = document.createElement("div");
602
607
  return e.textContent = t, e.innerHTML;
603
- }(l.modelValue || "");
608
+ }(i.modelValue || "");
604
609
  });
605
- function _(t) {
610
+ function O(t) {
606
611
  const e = t.target;
607
- h("update:modelValue", e.value), k(e.value);
612
+ h("update:modelValue", e.value), y(e.value);
608
613
  }
609
- function N() {
610
- f.value && s.value && (s.value.scrollTop = f.value.scrollTop, s.value.scrollLeft = f.value.scrollLeft);
614
+ function m() {
615
+ k.value && o.value && (o.value.scrollTop = k.value.scrollTop, o.value.scrollLeft = k.value.scrollLeft);
611
616
  }
612
- function L(t) {
617
+ function S(t) {
613
618
  if (t.key === "Tab") {
614
619
  t.preventDefault();
615
- const e = t.target, a = e.selectionStart, r = e.selectionEnd, o = e.value;
616
- e.value = o.substring(0, a) + " " + o.substring(r), e.selectionStart = e.selectionEnd = a + 2, h("update:modelValue", e.value), k(e.value);
620
+ const e = t.target, a = e.selectionStart, r = e.selectionEnd, s = e.value;
621
+ e.value = s.substring(0, a) + " " + s.substring(r), e.selectionStart = e.selectionEnd = a + 2, h("update:modelValue", e.value), y(e.value);
617
622
  }
618
623
  }
619
- return ge(() => {
620
- i(l.theme);
621
- }), U(() => l.theme, (t) => {
622
- i(t);
623
- }), he(() => {
624
- S && clearTimeout(S);
625
- }), (t, e) => (w(), T("div", { class: B(["hep-cr-editor", `hep-cr-theme-${u.theme}`]) }, [E("pre", { ref_key: "highlightRef", ref: s, class: B(["hep-cr-highlight", [`language-${A.value}`, `hep-cr-prism-${u.theme}`]]), "aria-hidden": "true" }, [E("code", { innerHTML: v.value }, null, 8, Re)], 2), E("textarea", { ref_key: "codeRef", ref: f, class: "hep-cr-input", value: u.modelValue, disabled: u.disabled, onInput: _, onScroll: N, onKeydown: L, spellcheck: "false", placeholder: "请输入代码..." }, null, 40, Ne)], 2));
626
- } }), [["__scopeId", "data-v-f7f3a9f5"]]), Oe = { class: "hep-cr-header" }, Ce = { class: "hep-cr-controls" }, Pe = ["disabled"], De = { key: 0, value: "" }, $e = ["value"], Me = { class: "hep-cr-actions" }, Ue = ["disabled"], He = { key: 0, class: "hep-cr-spinner" }, Be = { key: 1, class: "hep-cr-run-icon" }, je = ["title"], Ge = { key: 0, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, ze = { key: 1, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, We = { key: 0, class: "hep-cr-error" }, Ve = { class: "hep-cr-main" }, Ye = { class: "hep-cr-panel-header" }, Xe = { class: "hep-cr-output-actions" }, Ze = { class: "hep-cr-language-badge" }, Ke = ["disabled", "title"], qe = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, Je = { key: 1, class: "hep-cr-copied-text" }, Qe = { class: "hep-cr-panel-header" }, et = { class: "hep-cr-output-tabs" }, tt = { class: "hep-cr-output-actions" }, nt = { key: 0, class: "hep-cr-execution-time" }, at = ["disabled", "title"], rt = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, ot = { key: 1, class: "hep-cr-copied-text" }, st = { class: "hep-cr-output-content" }, it = { key: 0 }, lt = { key: 1, class: "hep-cr-stderr" }, q = ce(se({ __name: "CodeRunner", props: { pistonUrl: { default: "/api/piston" }, token: { default: "" }, modelValue: { default: "" }, code: { default: "" }, language: { default: "javascript" }, theme: { default: "light" }, themeColor: { default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { default: "运行" } }, emits: ["execute-start", "execute-end", "language-change", "update:language", "update:modelValue", "update:code"], setup(u, { emit: n }) {
627
- const i = u, l = n, h = I(!1), f = I(i.modelValue || i.code);
628
- U(() => i.modelValue, (c) => {
629
- c !== void 0 && c !== f.value && (f.value = c);
630
- }), U(() => i.code, (c) => {
631
- c !== void 0 && c !== f.value && (f.value = c);
632
- }), U(f, (c) => {
633
- l("update:modelValue", c), l("update:code", c);
624
+ return he(() => {
625
+ l(i.theme);
626
+ }), U(() => i.theme, (t) => {
627
+ l(t);
628
+ }), me(() => {
629
+ E && clearTimeout(E);
630
+ }), (t, e) => (A(), x("div", { class: B(["hep-cr-editor", `hep-cr-theme-${u.theme}`]) }, [b("pre", { ref_key: "highlightRef", ref: o, class: B(["hep-cr-highlight", [`language-${F.value}`, `hep-cr-prism-${u.theme}`]]), "aria-hidden": "true" }, [b("code", { innerHTML: _.value }, null, 8, Ne)], 2), b("textarea", { ref_key: "codeRef", ref: k, class: "hep-cr-input", value: u.modelValue, disabled: u.disabled, onInput: O, onScroll: m, onKeydown: S, spellcheck: "false", placeholder: "请输入代码..." }, null, 40, Le)], 2));
631
+ } }), [["__scopeId", "data-v-f7f3a9f5"]]), Ce = { class: "hep-cr-header" }, Pe = { class: "hep-cr-controls" }, De = ["disabled"], $e = { key: 0, value: "" }, Me = ["value"], Ue = { class: "hep-cr-actions" }, He = ["disabled"], Be = { key: 0, class: "hep-cr-spinner" }, je = { key: 1, class: "hep-cr-run-icon" }, Ge = ["title"], ze = { key: 0, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, We = { key: 1, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, Ve = { key: 0, class: "hep-cr-error" }, Ye = { class: "hep-cr-main" }, Xe = { class: "hep-cr-panel-header" }, Ze = { class: "hep-cr-output-actions" }, Ke = { class: "hep-cr-language-badge" }, qe = ["disabled", "title"], Je = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, Qe = { key: 1, class: "hep-cr-copied-text" }, et = { class: "hep-cr-panel-header" }, tt = { class: "hep-cr-output-tabs" }, nt = { class: "hep-cr-output-actions" }, at = { key: 0, class: "hep-cr-execution-time" }, rt = ["disabled", "title"], ot = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, st = { key: 1, class: "hep-cr-copied-text" }, it = { class: "hep-cr-output-content" }, lt = { key: 0 }, ut = { key: 1, class: "hep-cr-stderr" }, J = pe(le({ __name: "CodeRunner", props: { pistonUrl: { default: "/api/piston" }, token: { default: "" }, modelValue: { default: "" }, code: { default: "" }, language: { default: "javascript" }, theme: { default: "light" }, themeColor: { default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { default: "运行" } }, emits: ["execute-start", "execute-end", "language-change", "update:language", "update:modelValue", "update:code"], setup(u, { emit: n }) {
632
+ const l = u, i = n, h = I(!1), k = I(!1), o = I(l.modelValue || l.code);
633
+ U(() => l.modelValue, (c) => {
634
+ c !== void 0 && c !== o.value && (o.value = c);
635
+ }), U(() => l.code, (c) => {
636
+ c !== void 0 && c !== o.value && (o.value = c);
637
+ }), U(o, (c) => {
638
+ i("update:modelValue", c), i("update:code", c);
634
639
  });
635
- const s = I(i.language || "javascript");
636
- U(() => i.language, (c) => {
637
- c && c !== s.value && (s.value = c);
638
- }), U(s, (c) => {
639
- h.value || (f.value = function(g) {
640
- const y = g.toLowerCase().split(":")[0];
641
- return Ie[y] || `// ${g}
642
- // Write your code here`;
643
- }(c)), h.value = !1, l("update:language", c);
640
+ const E = I(l.language || "javascript");
641
+ U(() => l.language, (c) => {
642
+ c && c !== E.value && (E.value = c);
643
+ }), U(E, (c) => {
644
+ h.value || k.value || (o.value = ie(c), k.value = !0), h.value = !1, i("update:language", c);
645
+ const g = c.includes(":") ? c.split(":")[0] : c;
646
+ i("language-change", g, o.value, ie(g));
644
647
  });
645
- const S = M(() => {
646
- if (!i.themeColor) return {};
647
- const c = i.theme === "dark", g = i.themeColor, y = function(C) {
648
- const D = parseInt(C.replace("#", ""), 16);
649
- return (0.299 * (D >> 16 & 255) + 0.587 * (D >> 8 & 255) + 0.114 * (255 & D)) / 255 > 0.5;
648
+ const y = M(() => {
649
+ if (!l.themeColor) return {};
650
+ const c = l.theme === "dark", g = l.themeColor, w = function(P) {
651
+ const W = parseInt(P.replace("#", ""), 16);
652
+ return (0.299 * (W >> 16 & 255) + 0.587 * (W >> 8 & 255) + 0.114 * (255 & W)) / 255 > 0.5;
650
653
  }(g) ? "#000" : "#fff";
651
- return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover": k(g, c ? 20 : -20), "--hep-cr-tab-active-color": y };
654
+ return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover": v(g, c ? 20 : -20), "--hep-cr-tab-active-color": w };
652
655
  });
653
- function k(c, g) {
654
- const y = parseInt(c.replace("#", ""), 16), C = Math.round(2.55 * g);
655
- return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (y >> 16) + C)) + 256 * Math.min(255, Math.max(0, (y >> 8 & 255) + C)) + Math.min(255, Math.max(0, (255 & y) + C))).toString(16).slice(1);
656
+ function v(c, g) {
657
+ const w = parseInt(c.replace("#", ""), 16), P = Math.round(2.55 * g);
658
+ return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (w >> 16) + P)) + 256 * Math.min(255, Math.max(0, (w >> 8 & 255) + P)) + Math.min(255, Math.max(0, (255 & w) + P))).toString(16).slice(1);
656
659
  }
657
- const b = M(() => new Fe({ pistonUrl: i.pistonUrl, token: i.token })), A = I([]), x = I(i.theme), v = I(""), _ = I(""), N = I(!1), L = I(null), t = I("stdout"), e = I(null), a = I(!1), r = I(60), o = I(!1), d = I(!1), p = M(() => A.value.map((c) => ({ value: `${c.language}:${c.version}`, label: `${c.language.charAt(0).toUpperCase() + c.language.slice(1)} ${c.version}` }))), m = M(() => {
658
- const c = s.value;
660
+ const F = M(() => new Ie({ pistonUrl: l.pistonUrl, token: l.token })), R = I([]), _ = I(l.theme), O = I(""), m = I(""), S = I(!1), t = I(null), e = I("stdout"), a = I(null), r = I(!1), s = I(60), p = I(!1), d = I(!1), f = M(() => R.value.map((c) => ({ value: `${c.language}:${c.version}`, label: `${c.language.charAt(0).toUpperCase() + c.language.slice(1)} ${c.version}` }))), T = M(() => {
661
+ const c = E.value;
659
662
  return c.includes(":") ? c.split(":")[0] : c;
660
663
  });
661
- function F() {
662
- x.value = x.value === "light" ? "dark" : "light";
664
+ function N() {
665
+ _.value = _.value === "light" ? "dark" : "light";
663
666
  }
664
- async function R() {
665
- if (!N.value) {
666
- N.value = !0, v.value = "", _.value = "", L.value = null, e.value = null, t.value = "stdout", l("execute-start");
667
+ async function j() {
668
+ if (!S.value) {
669
+ S.value = !0, O.value = "", m.value = "", t.value = null, a.value = null, e.value = "stdout", i("execute-start");
667
670
  try {
668
- const c = await b.value.execute(m.value, f.value);
669
- v.value = c.output, _.value = c.stderr, L.value = c.executionTime || null, t.value = c.stderr ? "stderr" : "stdout", l("execute-end", c);
671
+ const c = await F.value.execute(T.value, o.value);
672
+ O.value = c.output, m.value = c.stderr, t.value = c.executionTime || null, e.value = c.stderr ? "stderr" : "stdout", i("execute-end", c);
670
673
  } catch (c) {
671
- e.value = c instanceof Error ? c.message : "Execution failed", l("execute-end", { success: !1, output: "", stderr: e.value, code: -1 });
674
+ a.value = c instanceof Error ? c.message : "Execution failed", i("execute-end", { success: !1, output: "", stderr: a.value, code: -1 });
672
675
  } finally {
673
- N.value = !1;
676
+ S.value = !1;
674
677
  }
675
678
  }
676
679
  }
677
- async function j() {
678
- await navigator.clipboard.writeText(f.value), o.value = !0, setTimeout(() => {
679
- o.value = !1;
680
+ async function Y() {
681
+ await navigator.clipboard.writeText(o.value), p.value = !0, setTimeout(() => {
682
+ p.value = !1;
680
683
  }, 2e3);
681
684
  }
682
- async function V() {
683
- const c = t.value === "stdout" ? v.value : _.value;
685
+ async function X() {
686
+ const c = e.value === "stdout" ? O.value : m.value;
684
687
  await navigator.clipboard.writeText(c), d.value = !0, setTimeout(() => {
685
688
  d.value = !1;
686
689
  }, 2e3);
687
690
  }
688
691
  (async function() {
689
- a.value = !0, e.value = null;
692
+ r.value = !0, a.value = null;
690
693
  try {
691
- A.value = await b.value.getRuntimes();
692
- const c = m.value, g = A.value.find((y) => y.language === c);
693
- g && !s.value.includes(":") && (s.value = `${c}:${g.version}`);
694
+ R.value = await F.value.getRuntimes();
695
+ const c = T.value, g = R.value.find((w) => w.language === c);
696
+ g && !E.value.includes(":") && (E.value = `${c}:${g.version}`);
694
697
  } catch (c) {
695
- e.value = c instanceof Error ? c.message : "Failed to load runtimes";
698
+ a.value = c instanceof Error ? c.message : "Failed to load runtimes";
696
699
  } finally {
697
- a.value = !1;
700
+ r.value = !1;
698
701
  }
699
702
  })();
700
703
  let G = !1;
701
- function J(c) {
702
- G = !0, document.addEventListener("mousemove", Y), document.addEventListener("mouseup", z), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
704
+ function Q(c) {
705
+ G = !0, document.addEventListener("mousemove", z), document.addEventListener("mouseup", L), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
703
706
  }
704
- function Y(c) {
707
+ function z(c) {
705
708
  if (!G) return;
706
709
  const g = document.querySelector(".hep-cr-main");
707
710
  if (!g) return;
708
- const y = g.getBoundingClientRect(), C = (c.clientX - y.left) / y.width * 100;
709
- r.value = Math.max(20, Math.min(80, C));
711
+ const w = g.getBoundingClientRect(), P = (c.clientX - w.left) / w.width * 100;
712
+ s.value = Math.max(20, Math.min(80, P));
713
+ }
714
+ function L() {
715
+ G = !1, document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", L), document.body.style.cursor = "", document.body.style.userSelect = "";
716
+ }
717
+ const C = M(() => `hep-cr-runner-${_.value}`);
718
+ return (c, g) => (A(), x("div", { class: B(["hep-cr-runner", C.value]), style: q(y.value) }, [b("div", Ce, [b("div", Pe, [u.showLanguageSelector ? fe((A(), x("select", { key: 0, "onUpdate:modelValue": g[0] || (g[0] = (w) => E.value = w), class: "hep-cr-language-select", disabled: S.value }, [r.value ? (A(), x("option", $e, "加载中...")) : D("", !0), (A(!0), x(be, null, ve(f.value, (w) => (A(), x("option", { key: w.value, value: w.value }, $(w.label), 9, Me))), 128))], 8, De)), [[Ee, E.value]]) : D("", !0)]), b("div", Ue, [b("button", { class: "hep-cr-btn hep-cr-btn-run", disabled: S.value || r.value, onClick: j }, [S.value ? (A(), x("span", Be)) : (A(), x("span", je, "▶")), ye(" " + $(S.value ? "运行中..." : u.executorLabel), 1)], 8, He), b("button", { class: "hep-cr-btn hep-cr-btn-theme", onClick: N, title: _.value === "light" ? "Switch to dark mode" : "Switch to light mode" }, [_.value === "light" ? (A(), x("svg", ze, [...g[5] || (g[5] = [b("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (A(), x("svg", We, [...g[6] || (g[6] = [ke('<circle cx="12" cy="12" r="5" data-v-5d93473f></circle><line x1="12" y1="1" x2="12" y2="3" data-v-5d93473f></line><line x1="12" y1="21" x2="12" y2="23" data-v-5d93473f></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-5d93473f></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-5d93473f></line><line x1="1" y1="12" x2="3" y2="12" data-v-5d93473f></line><line x1="21" y1="12" x2="23" y2="12" data-v-5d93473f></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-5d93473f></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-5d93473f></line>', 9)])]))], 8, Ge)])]), a.value ? (A(), x("div", Ve, $(a.value), 1)) : D("", !0), b("div", Ye, [u.showEditor ? (A(), x("div", { key: 0, class: "hep-cr-editor-panel", style: q({ width: s.value + "%" }) }, [b("div", Xe, [g[8] || (g[8] = b("span", { class: "hep-cr-panel-title" }, "编辑器", -1)), b("div", Ze, [b("span", Ke, $(T.value), 1), b("button", { class: B(["hep-cr-btn-icon", { "hep-cr-btn-copied": p.value }]), disabled: p.value, onClick: Y, title: p.value ? "已复制" : "复制" }, [p.value ? (A(), x("span", Qe, "已复制")) : (A(), x("svg", Je, [...g[7] || (g[7] = [b("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), b("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, qe)])]), se(Oe, { modelValue: o.value, "onUpdate:modelValue": g[1] || (g[1] = (w) => o.value = w), language: T.value, theme: _.value, disabled: !u.editable || S.value, onChange: g[2] || (g[2] = (w) => {
719
+ h.value = !0, i("update:modelValue", w);
720
+ }) }, null, 8, ["modelValue", "language", "theme", "disabled"])], 4)) : D("", !0), u.showEditor ? (A(), x("div", { key: 1, class: "hep-cr-resize-handle", onMousedown: Q }, [...g[9] || (g[9] = [b("div", { class: "hep-cr-resize-line" }, null, -1)])], 32)) : D("", !0), b("div", { class: "hep-cr-output-panel", style: q({ width: u.showEditor ? 100 - s.value + "%" : "100%" }) }, [b("div", et, [b("div", tt, [b("button", { class: B(["hep-cr-tab", { active: e.value === "stdout" }]), onClick: g[3] || (g[3] = (w) => e.value = "stdout") }, " 输出 ", 2), m.value ? (A(), x("button", { key: 0, class: B(["hep-cr-tab", "hep-cr-tab-error", { active: e.value === "stderr" }]), onClick: g[4] || (g[4] = (w) => e.value = "stderr") }, " 错误 ", 2)) : D("", !0)]), b("div", nt, [t.value !== null ? (A(), x("span", at, $(t.value) + "ms ", 1)) : D("", !0), b("button", { class: B(["hep-cr-btn-icon", { "hep-cr-btn-copied": d.value }]), disabled: d.value, onClick: X, title: d.value ? "已复制" : "复制" }, [d.value ? (A(), x("span", st, "已复制")) : (A(), x("svg", ot, [...g[10] || (g[10] = [b("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), b("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, rt)])]), b("div", it, [e.value === "stdout" ? (A(), x("pre", lt, $(S.value ? "代码执行中..." : O.value || '点击"运行"执行代码'), 1)) : (A(), x("pre", ut, $(m.value), 1))])], 4)])], 6));
721
+ } }), [["__scopeId", "data-v-5d93473f"]]), ct = { class: "hep-cr-dialog-header" }, dt = { class: "hep-cr-dialog-title" }, pt = { class: "hep-cr-dialog-body" }, gt = { key: 0, class: "hep-cr-dialog-footer" }, mt = le({ __name: "CodeRunnerDialog", props: { title: { default: "代码执行器" }, width: { default: 800 }, pistonUrl: { default: "/api/piston" }, token: { default: "" }, language: { default: "javascript" }, code: { default: "" }, theme: { default: "light" }, themeColor: { default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { default: "运行" } }, emits: ["update:modelValue", "update:language", "update:code", "close", "language-change", "change"], setup(u, { expose: n, emit: l }) {
722
+ const i = u, h = l, k = I(!1), o = I(i.language || "javascript"), E = I(i.code !== void 0 ? i.code : ie(i.language || "javascript"));
723
+ function y() {
724
+ k.value = !1, h("update:modelValue", !1), h("close");
710
725
  }
711
- function z() {
712
- G = !1, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", z), document.body.style.cursor = "", document.body.style.userSelect = "";
726
+ function v(m) {
727
+ m.target === m.currentTarget && y();
713
728
  }
714
- const O = M(() => `hep-cr-runner-${x.value}`);
715
- return (c, g) => (w(), T("div", { class: B(["hep-cr-runner", O.value]), style: K(S.value) }, [E("div", Oe, [E("div", Ce, [u.showLanguageSelector ? me((w(), T("select", { key: 0, "onUpdate:modelValue": g[0] || (g[0] = (y) => s.value = y), class: "hep-cr-language-select", disabled: N.value }, [a.value ? (w(), T("option", De, "加载中...")) : P("", !0), (w(!0), T(fe, null, be(p.value, (y) => (w(), T("option", { key: y.value, value: y.value }, $(y.label), 9, $e))), 128))], 8, Pe)), [[Ee, s.value]]) : P("", !0)]), E("div", Me, [E("button", { class: "hep-cr-btn hep-cr-btn-run", disabled: N.value || a.value, onClick: R }, [N.value ? (w(), T("span", He)) : (w(), T("span", Be, "▶")), ve(" " + $(N.value ? "运行中..." : u.executorLabel), 1)], 8, Ue), E("button", { class: "hep-cr-btn hep-cr-btn-theme", onClick: F, title: x.value === "light" ? "Switch to dark mode" : "Switch to light mode" }, [x.value === "light" ? (w(), T("svg", Ge, [...g[5] || (g[5] = [E("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (w(), T("svg", ze, [...g[6] || (g[6] = [ye('<circle cx="12" cy="12" r="5" data-v-2f88abe1></circle><line x1="12" y1="1" x2="12" y2="3" data-v-2f88abe1></line><line x1="12" y1="21" x2="12" y2="23" data-v-2f88abe1></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-2f88abe1></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-2f88abe1></line><line x1="1" y1="12" x2="3" y2="12" data-v-2f88abe1></line><line x1="21" y1="12" x2="23" y2="12" data-v-2f88abe1></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-2f88abe1></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-2f88abe1></line>', 9)])]))], 8, je)])]), e.value ? (w(), T("div", We, $(e.value), 1)) : P("", !0), E("div", Ve, [u.showEditor ? (w(), T("div", { key: 0, class: "hep-cr-editor-panel", style: K({ width: r.value + "%" }) }, [E("div", Ye, [g[8] || (g[8] = E("span", { class: "hep-cr-panel-title" }, "编辑器", -1)), E("div", Xe, [E("span", Ze, $(m.value), 1), E("button", { class: B(["hep-cr-btn-icon", { "hep-cr-btn-copied": o.value }]), disabled: o.value, onClick: j, title: o.value ? "已复制" : "复制" }, [o.value ? (w(), T("span", Je, "已复制")) : (w(), T("svg", qe, [...g[7] || (g[7] = [E("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, Ke)])]), oe(Le, { modelValue: f.value, "onUpdate:modelValue": g[1] || (g[1] = (y) => f.value = y), language: m.value, theme: x.value, disabled: !u.editable || N.value, onChange: g[2] || (g[2] = (y) => {
716
- h.value = !0, l("update:modelValue", y);
717
- }) }, null, 8, ["modelValue", "language", "theme", "disabled"])], 4)) : P("", !0), u.showEditor ? (w(), T("div", { key: 1, class: "hep-cr-resize-handle", onMousedown: J }, [...g[9] || (g[9] = [E("div", { class: "hep-cr-resize-line" }, null, -1)])], 32)) : P("", !0), E("div", { class: "hep-cr-output-panel", style: K({ width: u.showEditor ? 100 - r.value + "%" : "100%" }) }, [E("div", Qe, [E("div", et, [E("button", { class: B(["hep-cr-tab", { active: t.value === "stdout" }]), onClick: g[3] || (g[3] = (y) => t.value = "stdout") }, " 输出 ", 2), _.value ? (w(), T("button", { key: 0, class: B(["hep-cr-tab", "hep-cr-tab-error", { active: t.value === "stderr" }]), onClick: g[4] || (g[4] = (y) => t.value = "stderr") }, " 错误 ", 2)) : P("", !0)]), E("div", tt, [L.value !== null ? (w(), T("span", nt, $(L.value) + "ms ", 1)) : P("", !0), E("button", { class: B(["hep-cr-btn-icon", { "hep-cr-btn-copied": d.value }]), disabled: d.value, onClick: V, title: d.value ? "已复制" : "复制" }, [d.value ? (w(), T("span", ot, "已复制")) : (w(), T("svg", rt, [...g[10] || (g[10] = [E("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, at)])]), E("div", st, [t.value === "stdout" ? (w(), T("pre", it, $(N.value ? "代码执行中..." : v.value || '点击"运行"执行代码'), 1)) : (w(), T("pre", lt, $(_.value), 1))])], 4)])], 6));
718
- } }), [["__scopeId", "data-v-2f88abe1"]]), ut = { class: "hep-cr-dialog-header" }, ct = { class: "hep-cr-dialog-title" }, dt = { class: "hep-cr-dialog-body" }, pt = { key: 0, class: "hep-cr-dialog-footer" }, ht = se({ __name: "CodeRunnerDialog", props: { title: { default: "代码执行器" }, width: { default: 800 }, pistonUrl: { default: "/api/piston" }, token: { default: "" }, language: { default: "javascript" }, code: { default: "" }, theme: { default: "light" }, themeColor: { default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { default: "运行" } }, emits: ["update:modelValue", "update:language", "update:code", "close"], setup(u, { expose: n, emit: i }) {
719
- const l = u, h = i, f = I(!1), s = I(l.language || "javascript"), S = I(l.code || "");
720
- function k() {
721
- f.value = !1, h("update:modelValue", !1), h("close");
729
+ function F(m) {
730
+ o.value = m, h("update:language", m);
722
731
  }
723
- function b(v) {
724
- v.target === v.currentTarget && k();
732
+ function R(m) {
733
+ E.value = m, h("update:code", m);
725
734
  }
726
- function A(v) {
727
- s.value = v, h("update:language", v);
735
+ function _(m, S, t) {
736
+ h("language-change", m, S, t);
728
737
  }
729
- function x(v) {
730
- S.value = v, h("update:code", v);
738
+ function O(m) {
739
+ h("change", m);
731
740
  }
732
- return U(() => l.language, (v) => {
733
- v && (s.value = v);
734
- }), U(() => l.code, (v) => {
735
- v !== void 0 && (S.value = v);
741
+ return U(() => i.language, (m) => {
742
+ m && (o.value = m);
743
+ }), U(() => i.code, (m) => {
744
+ m !== void 0 && (E.value = m);
736
745
  }), n({ open: function() {
737
- f.value = !0, h("update:modelValue", !0);
738
- }, close: k }), (v, _) => (w(), ke(Se, { to: "body" }, [oe(we, { name: "hep-cr-dialog-fade" }, { default: Ae(() => [f.value ? (w(), T("div", { key: 0, class: "hep-cr-dialog-overlay", onClick: b }, [E("div", { class: "hep-cr-dialog-container", style: K({ width: typeof u.width == "number" ? u.width + "px" : u.width }) }, [E("div", ut, [E("h3", ct, $(u.title), 1), E("button", { class: "hep-cr-dialog-close", onClick: k }, [..._[0] || (_[0] = [E("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, [E("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), E("line", { x1: "6", y1: "6", x2: "18", y2: "18" })], -1)])])]), E("div", dt, [oe(q, { language: s.value, code: S.value, pistonUrl: u.pistonUrl, token: u.token, theme: u.theme, themeColor: u.themeColor, showLanguageSelector: u.showLanguageSelector, showEditor: u.showEditor, editable: u.editable, executorLabel: u.executorLabel, "onUpdate:language": A, "onUpdate:code": x }, null, 8, ["language", "code", "pistonUrl", "token", "theme", "themeColor", "showLanguageSelector", "showEditor", "editable", "executorLabel"])]), v.$slots.footer ? (w(), T("div", pt, [Te(v.$slots, "footer", { close: k })])) : P("", !0)], 4)])) : P("", !0)]), _: 3 })]));
746
+ k.value = !0, h("update:modelValue", !0);
747
+ }, close: y }), (m, S) => (A(), Se(we, { to: "body" }, [se(Ae, { name: "hep-cr-dialog-fade" }, { default: Te(() => [k.value ? (A(), x("div", { key: 0, class: "hep-cr-dialog-overlay", onClick: v }, [b("div", { class: "hep-cr-dialog-container", style: q({ width: typeof u.width == "number" ? u.width + "px" : u.width }) }, [b("div", ct, [b("h3", dt, $(u.title), 1), b("button", { class: "hep-cr-dialog-close", onClick: y }, [...S[0] || (S[0] = [b("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, [b("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), b("line", { x1: "6", y1: "6", x2: "18", y2: "18" })], -1)])])]), b("div", pt, [se(J, { language: o.value, code: E.value, pistonUrl: u.pistonUrl, token: u.token, theme: u.theme, themeColor: u.themeColor, showLanguageSelector: u.showLanguageSelector, showEditor: u.showEditor, editable: u.editable, executorLabel: u.executorLabel, "onUpdate:language": F, "onUpdate:code": R, onLanguageChange: _, onChange: O }, null, 8, ["language", "code", "pistonUrl", "token", "theme", "themeColor", "showLanguageSelector", "showEditor", "editable", "executorLabel"])]), m.$slots.footer ? (A(), x("div", gt, [xe(m.$slots, "footer", { close: y })])) : D("", !0)], 4)])) : D("", !0)]), _: 3 })]));
739
748
  } });
740
- q.install = (u) => {
741
- u.component("CodeRunner", q);
749
+ J.install = (u) => {
750
+ u.component("CodeRunner", J);
742
751
  };
743
- const mt = { install(u) {
744
- u.component("CodeRunner", q);
752
+ const ft = { install(u) {
753
+ u.component("CodeRunner", J);
745
754
  } };
746
755
  export {
747
- q as CodeRunner,
748
- ht as CodeRunnerDialog,
749
- mt as default
756
+ J as CodeRunner,
757
+ mt as CodeRunnerDialog,
758
+ ft as default
750
759
  };