@hep-code-runner/vue3 2.3.15 → 2.3.17

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,16 +1,16 @@
1
- import { defineComponent as le, useCssVars as ge, ref as I, computed as H, onMounted as he, watch as B, onUnmounted as me, openBlock as w, createElementBlock as T, normalizeClass as j, createElementVNode as b, normalizeStyle as q, withDirectives as fe, createCommentVNode as $, Fragment as be, renderList as ve, toDisplayString as U, 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, S) => h in i ? Fe(i, h, { enumerable: !0, configurable: !0, writable: !0, value: S }) : i[h] = S)(u, typeof n != "symbol" ? n + "" : n, l);
1
+ import { defineComponent as le, useCssVars as ge, ref as x, computed as B, onMounted as he, watch as H, onUnmounted as me, openBlock as S, createElementBlock as w, normalizeClass as j, createElementVNode as b, normalizeStyle as q, withDirectives as fe, createCommentVNode as $, Fragment as be, renderList as ve, toDisplayString as U, 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, a, l) => ((i, m, v) => m in i ? Fe(i, m, { enumerable: !0, configurable: !0, writable: !0, value: v }) : i[m] = v)(u, typeof a != "symbol" ? a + "" : a, l);
3
3
  let re = null;
4
4
  class Ie {
5
- constructor(n = {}) {
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;
5
+ constructor(a = {}) {
6
+ ae(this, "baseUrl"), ae(this, "timeout"), ae(this, "token"), this.baseUrl = a.pistonUrl || "/api/piston", this.timeout = a.timeout || 3e3, this.token = a.token;
7
7
  }
8
8
  authHeaders() {
9
- const n = { "Content-Type": "application/json" };
10
- return this.token && (n.authorization = `Bearer ${this.token}`, n["id-token"] = this.token), n;
9
+ const a = { "Content-Type": "application/json" };
10
+ return this.token && (a.authorization = `Bearer ${this.token}`, a["id-token"] = this.token), a;
11
11
  }
12
- async getRuntimes(n = !1) {
13
- if (re && !n) return re;
12
+ async getRuntimes(a = !1) {
13
+ if (re && !a) return re;
14
14
  try {
15
15
  const l = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: this.authHeaders() });
16
16
  if (!l.ok) throw new Error(`Failed to fetch runtimes: ${l.statusText}`);
@@ -20,24 +20,24 @@ class Ie {
20
20
  throw l;
21
21
  }
22
22
  }
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()));
23
+ async execute(a, l, i = {}) {
24
+ const m = (await this.getRuntimes()).find((k) => {
25
+ var f;
26
+ return k.language.toLowerCase() === a.toLowerCase() || ((f = k.aliases) == null ? void 0 : f.some((T) => T.toLowerCase() === a.toLowerCase()));
27
27
  });
28
- if (!h) throw new Error(`Language '${n}' is not supported`);
29
- const S = this.getFileName(n), o = { language: h.language, version: i.version || h.version, files: [{ name: S, content: l }], stdin: i.stdin || "", args: i.args || [], run_timeout: i.runTimeout || this.timeout, compile_timeout: this.timeout }, E = Date.now();
28
+ if (!m) throw new Error(`Language '${a}' is not supported`);
29
+ const v = this.getFileName(a), o = { language: m.language, version: i.version || m.version, files: [{ name: v, 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 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, N = v.run.stdout || "", O = v.run.stderr || "";
34
- return { success: v.run.code === 0, output: N, stderr: O, 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 };
31
+ const k = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: this.authHeaders(), body: JSON.stringify(o) });
32
+ if (!k.ok) throw new Error(`Execute failed: ${k.statusText}`);
33
+ const f = await k.json(), T = Date.now() - E, _ = f.run.stdout || "", L = f.run.stderr || "";
34
+ return { success: f.run.code === 0, output: _, stderr: L, code: f.run.code, executionTime: T, compile: f.compile ? { stdout: f.compile.stdout || "", stderr: f.compile.stderr || "", code: f.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() - E };
37
37
  }
38
38
  }
39
- getFileName(n) {
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}`;
39
+ getFileName(a) {
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" }[a.toLowerCase()] || `main.${a}`;
41
41
  }
42
42
  }
43
43
  const Re = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
@@ -107,8 +107,8 @@ h1 {
107
107
 
108
108
  This is a sample markdown document.` };
109
109
  function ie(u) {
110
- const n = u.toLowerCase().split(":")[0];
111
- return Re[n] || `// ${u}
110
+ const a = u.toLowerCase().split(":")[0];
111
+ return Re[a] || `// ${u}
112
112
  // Write your code here`;
113
113
  }
114
114
  var ce = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -117,310 +117,310 @@ function _e(u) {
117
117
  }
118
118
  var de = { exports: {} };
119
119
  (function(u) {
120
- var n = function(l) {
121
- var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, h = 0, S = {}, 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, " ");
123
- }, type: function(t) {
124
- return Object.prototype.toString.call(t).slice(8, -1);
125
- }, objId: function(t) {
126
- return t.__id || Object.defineProperty(t, "__id", { value: ++h }), t.__id;
127
- }, clone: function t(e, a) {
120
+ var a = function(l) {
121
+ var i = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, m = 0, v = {}, o = { manual: l.Prism && l.Prism.manual, disableWorkerMessageHandler: l.Prism && l.Prism.disableWorkerMessageHandler, util: { encode: function n(e) {
122
+ return e instanceof E ? new E(e.type, n(e.content), e.alias) : Array.isArray(e) ? e.map(n) : e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\u00a0/g, " ");
123
+ }, type: function(n) {
124
+ return Object.prototype.toString.call(n).slice(8, -1);
125
+ }, objId: function(n) {
126
+ return n.__id || Object.defineProperty(n, "__id", { value: ++m }), n.__id;
127
+ }, clone: function n(e, t) {
128
128
  var r, s;
129
- switch (a = a || {}, o.util.type(e)) {
129
+ switch (t = t || {}, o.util.type(e)) {
130
130
  case "Object":
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));
131
+ if (s = o.util.objId(e), t[s]) return t[s];
132
+ for (var p in r = {}, t[s] = r, e) e.hasOwnProperty(p) && (r[p] = n(e[p], t));
133
133
  return r;
134
134
  case "Array":
135
- return s = o.util.objId(e), a[s] ? a[s] : (r = [], a[s] = r, e.forEach(function(d, m) {
136
- r[m] = t(d, a);
135
+ return s = o.util.objId(e), t[s] ? t[s] : (r = [], t[s] = r, e.forEach(function(d, h) {
136
+ r[h] = n(d, t);
137
137
  }), r);
138
138
  default:
139
139
  return e;
140
140
  }
141
- }, getLanguage: function(t) {
142
- for (; t; ) {
143
- var e = i.exec(t.className);
141
+ }, getLanguage: function(n) {
142
+ for (; n; ) {
143
+ var e = i.exec(n.className);
144
144
  if (e) return e[1].toLowerCase();
145
- t = t.parentElement;
145
+ n = n.parentElement;
146
146
  }
147
147
  return "none";
148
- }, setLanguage: function(t, e) {
149
- t.className = t.className.replace(RegExp(i, "gi"), ""), t.classList.add("language-" + e);
148
+ }, setLanguage: function(n, e) {
149
+ n.className = n.className.replace(RegExp(i, "gi"), ""), n.classList.add("language-" + e);
150
150
  }, currentScript: function() {
151
151
  if (typeof document > "u") return null;
152
152
  if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
153
153
  try {
154
154
  throw new Error();
155
155
  } catch (r) {
156
- var t = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
157
- if (t) {
156
+ var n = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack) || [])[1];
157
+ if (n) {
158
158
  var e = document.getElementsByTagName("script");
159
- for (var a in e) if (e[a].src == t) return e[a];
159
+ for (var t in e) if (e[t].src == n) return e[t];
160
160
  }
161
161
  return null;
162
162
  }
163
- }, isActive: function(t, e, a) {
164
- for (var r = "no-" + e; t; ) {
165
- var s = t.classList;
163
+ }, isActive: function(n, e, t) {
164
+ for (var r = "no-" + e; n; ) {
165
+ var s = n.classList;
166
166
  if (s.contains(e)) return !0;
167
167
  if (s.contains(r)) return !1;
168
- t = t.parentElement;
168
+ n = n.parentElement;
169
169
  }
170
- return !!a;
171
- } }, languages: { plain: S, plaintext: S, text: S, txt: S, extend: function(t, e) {
172
- var a = o.util.clone(o.languages[t]);
173
- for (var r in e) a[r] = e[r];
174
- return a;
175
- }, insertBefore: function(t, e, a, r) {
176
- var s = (r = r || o.languages)[t], p = {};
170
+ return !!t;
171
+ } }, languages: { plain: v, plaintext: v, text: v, txt: v, extend: function(n, e) {
172
+ var t = o.util.clone(o.languages[n]);
173
+ for (var r in e) t[r] = e[r];
174
+ return t;
175
+ }, insertBefore: function(n, e, t, r) {
176
+ var s = (r = r || o.languages)[n], p = {};
177
177
  for (var d in s) if (s.hasOwnProperty(d)) {
178
- if (d == e) for (var m in a) a.hasOwnProperty(m) && (p[m] = a[m]);
179
- a.hasOwnProperty(d) || (p[d] = s[d]);
178
+ if (d == e) for (var h in t) t.hasOwnProperty(h) && (p[h] = t[h]);
179
+ t.hasOwnProperty(d) || (p[d] = s[d]);
180
180
  }
181
- var R = r[t];
182
- return r[t] = p, o.languages.DFS(o.languages, function(x, G) {
183
- G === R && x != t && (this[x] = p);
181
+ var I = r[n];
182
+ return r[n] = p, o.languages.DFS(o.languages, function(A, G) {
183
+ G === I && A != n && (this[A] = p);
184
184
  }), p;
185
- }, DFS: function t(e, a, r, s) {
185
+ }, DFS: function n(e, t, r, s) {
186
186
  s = s || {};
187
187
  var p = o.util.objId;
188
188
  for (var d in e) if (e.hasOwnProperty(d)) {
189
- a.call(e, d, e[d], r || d);
190
- var m = e[d], R = o.util.type(m);
191
- R !== "Object" || s[p(m)] ? R !== "Array" || s[p(m)] || (s[p(m)] = !0, t(m, a, d, s)) : (s[p(m)] = !0, t(m, a, null, s));
189
+ t.call(e, d, e[d], r || d);
190
+ var h = e[d], I = o.util.type(h);
191
+ I !== "Object" || s[p(h)] ? I !== "Array" || s[p(h)] || (s[p(h)] = !0, n(h, t, d, s)) : (s[p(h)] = !0, n(h, t, null, s));
192
192
  }
193
- } }, plugins: {}, highlightAll: function(t, e) {
194
- o.highlightAllUnder(document, t, e);
195
- }, highlightAllUnder: function(t, e, a) {
196
- var r = { callback: a, container: t, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
193
+ } }, plugins: {}, highlightAll: function(n, e) {
194
+ o.highlightAllUnder(document, n, e);
195
+ }, highlightAllUnder: function(n, e, t) {
196
+ var r = { callback: t, container: n, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
197
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
198
  for (var s, p = 0; s = r.elements[p++]; ) o.highlightElement(s, e === !0, r.callback);
199
- }, highlightElement: function(t, e, a) {
200
- var r = o.util.getLanguage(t), s = o.languages[r];
201
- o.util.setLanguage(t, r);
202
- var p = t.parentElement;
199
+ }, highlightElement: function(n, e, t) {
200
+ var r = o.util.getLanguage(n), s = o.languages[r];
201
+ o.util.setLanguage(n, r);
202
+ var p = n.parentElement;
203
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 m(x) {
206
- d.highlightedCode = x, 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);
204
+ var d = { element: n, language: r, grammar: s, code: n.textContent };
205
+ function h(A) {
206
+ d.highlightedCode = A, o.hooks.run("before-insert", d), d.element.innerHTML = d.highlightedCode, o.hooks.run("after-highlight", d), o.hooks.run("complete", d), t && t.call(d.element);
207
207
  }
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));
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 (t && t.call(d.element));
209
209
  if (o.hooks.run("before-highlight", d), d.grammar) if (e && l.Worker) {
210
- var R = new Worker(o.filename);
211
- R.onmessage = function(x) {
212
- m(x.data);
213
- }, R.postMessage(JSON.stringify({ language: d.language, code: d.code, immediateClose: !0 }));
214
- } else m(o.highlight(d.code, d.grammar, d.language));
215
- else m(o.util.encode(d.code));
216
- }, highlight: function(t, e, a) {
217
- var r = { code: t, grammar: e, language: a };
210
+ var I = new Worker(o.filename);
211
+ I.onmessage = function(A) {
212
+ h(A.data);
213
+ }, I.postMessage(JSON.stringify({ language: d.language, code: d.code, immediateClose: !0 }));
214
+ } else h(o.highlight(d.code, d.grammar, d.language));
215
+ else h(o.util.encode(d.code));
216
+ }, highlight: function(n, e, t) {
217
+ var r = { code: n, grammar: e, language: t };
218
218
  if (o.hooks.run("before-tokenize", r), !r.grammar) throw new Error('The language "' + r.language + '" has no grammar.');
219
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);
220
- }, tokenize: function(t, e) {
221
- var a = e.rest;
222
- if (a) {
223
- for (var r in a) e[r] = a[r];
220
+ }, tokenize: function(n, e) {
221
+ var t = e.rest;
222
+ if (t) {
223
+ for (var r in t) e[r] = t[r];
224
224
  delete e.rest;
225
225
  }
226
- var s = new F();
227
- return N(s, s.head, t), v(t, s, e, s.head, 0), function(p) {
228
- for (var d = [], m = p.head.next; m !== p.tail; ) d.push(m.value), m = m.next;
226
+ var s = new T();
227
+ return _(s, s.head, n), f(n, s, e, s.head, 0), function(p) {
228
+ for (var d = [], h = p.head.next; h !== p.tail; ) d.push(h.value), h = h.next;
229
229
  return d;
230
230
  }(s);
231
- }, hooks: { all: {}, add: function(t, e) {
232
- var a = o.hooks.all;
233
- a[t] = a[t] || [], a[t].push(e);
234
- }, run: function(t, e) {
235
- var a = o.hooks.all[t];
236
- if (a && a.length) for (var r, s = 0; r = a[s++]; ) r(e);
231
+ }, hooks: { all: {}, add: function(n, e) {
232
+ var t = o.hooks.all;
233
+ t[n] = t[n] || [], t[n].push(e);
234
+ }, run: function(n, e) {
235
+ var t = o.hooks.all[n];
236
+ if (t && t.length) for (var r, s = 0; r = t[s++]; ) r(e);
237
237
  } }, Token: E };
238
- function E(t, e, a, r) {
239
- this.type = t, this.content = e, this.alias = a, this.length = 0 | (r || "").length;
238
+ function E(n, e, t, r) {
239
+ this.type = n, this.content = e, this.alias = t, this.length = 0 | (r || "").length;
240
240
  }
241
- function y(t, e, a, r) {
242
- t.lastIndex = e;
243
- var s = t.exec(a);
241
+ function k(n, e, t, r) {
242
+ n.lastIndex = e;
243
+ var s = n.exec(t);
244
244
  if (s && r && s[1]) {
245
245
  var p = s[1].length;
246
246
  s.index += p, s[0] = s[0].slice(p);
247
247
  }
248
248
  return s;
249
249
  }
250
- function v(t, e, a, r, s, p) {
251
- for (var d in a) if (a.hasOwnProperty(d) && a[d]) {
252
- var m = a[d];
253
- m = Array.isArray(m) ? m : [m];
254
- for (var R = 0; R < m.length; ++R) {
255
- if (p && p.cause == d + "," + R) return;
256
- var x = m[R], G = x.inside, V = !!x.lookbehind, Y = !!x.greedy, Q = x.alias;
257
- if (Y && !x.pattern.global) {
258
- var z = x.pattern.toString().match(/[imsuy]*$/)[0];
259
- x.pattern = RegExp(x.pattern.source, z + "g");
250
+ function f(n, e, t, r, s, p) {
251
+ for (var d in t) if (t.hasOwnProperty(d) && t[d]) {
252
+ var h = t[d];
253
+ h = Array.isArray(h) ? h : [h];
254
+ for (var I = 0; I < h.length; ++I) {
255
+ if (p && p.cause == d + "," + I) return;
256
+ var A = h[I], G = A.inside, V = !!A.lookbehind, Y = !!A.greedy, Q = A.alias;
257
+ if (Y && !A.pattern.global) {
258
+ var z = A.pattern.toString().match(/[imsuy]*$/)[0];
259
+ A.pattern = RegExp(A.pattern.source, z + "g");
260
260
  }
261
- for (var X = x.pattern || x, L = r.next, C = s; L !== e.tail && !(p && C >= p.reach); C += L.value.length, L = L.next) {
262
- var M = L.value;
263
- if (e.length > t.length) return;
261
+ for (var X = A.pattern || A, N = r.next, C = s; N !== e.tail && !(p && C >= p.reach); C += N.value.length, N = N.next) {
262
+ var M = N.value;
263
+ if (e.length > n.length) return;
264
264
  if (!(M instanceof E)) {
265
265
  var c, g = 1;
266
266
  if (Y) {
267
- if (!(c = y(X, C, t, V)) || c.index >= t.length) break;
268
- var k = c.index, D = c.index + c[0].length, P = C;
269
- for (P += L.value.length; k >= P; ) P += (L = L.next).value.length;
270
- if (C = P -= L.value.length, L.value instanceof E) continue;
271
- for (var W = L; W !== e.tail && (P < D || typeof W.value == "string"); W = W.next) g++, P += W.value.length;
272
- g--, M = t.slice(C, P), c.index -= C;
273
- } else if (!(c = y(X, 0, M, V))) continue;
274
- k = c.index;
275
- var Z = c[0], ee = M.slice(0, k), ue = M.slice(k + Z.length), te = C + M.length;
267
+ if (!(c = k(X, C, n, V)) || c.index >= n.length) break;
268
+ var y = c.index, D = c.index + c[0].length, P = C;
269
+ for (P += N.value.length; y >= P; ) P += (N = N.next).value.length;
270
+ if (C = P -= N.value.length, N.value instanceof E) continue;
271
+ for (var W = N; W !== e.tail && (P < D || typeof W.value == "string"); W = W.next) g++, P += W.value.length;
272
+ g--, M = n.slice(C, P), c.index -= C;
273
+ } else if (!(c = k(X, 0, M, V))) continue;
274
+ y = c.index;
275
+ var Z = c[0], ee = M.slice(0, y), ue = M.slice(y + Z.length), te = C + M.length;
276
276
  p && te > p.reach && (p.reach = te);
277
- var K = L.prev;
278
- if (ee && (K = N(e, K, ee), C += ee.length), O(e, K, g), L = N(e, K, new E(d, G ? o.tokenize(Z, G) : Z, Q, Z)), ue && N(e, L, ue), g > 1) {
279
- var ne = { cause: d + "," + R, reach: te };
280
- v(t, e, a, L.prev, C, ne), p && ne.reach > p.reach && (p.reach = ne.reach);
277
+ var K = N.prev;
278
+ if (ee && (K = _(e, K, ee), C += ee.length), L(e, K, g), N = _(e, K, new E(d, G ? o.tokenize(Z, G) : Z, Q, Z)), ue && _(e, N, ue), g > 1) {
279
+ var ne = { cause: d + "," + I, reach: te };
280
+ f(n, e, t, N.prev, C, ne), p && ne.reach > p.reach && (p.reach = ne.reach);
281
281
  }
282
282
  }
283
283
  }
284
284
  }
285
285
  }
286
286
  }
287
- function F() {
288
- var t = { value: null, prev: null, next: null }, e = { value: null, prev: t, next: null };
289
- t.next = e, this.head = t, this.tail = e, this.length = 0;
287
+ function T() {
288
+ var n = { value: null, prev: null, next: null }, e = { value: null, prev: n, next: null };
289
+ n.next = e, this.head = n, this.tail = e, this.length = 0;
290
290
  }
291
- function N(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;
291
+ function _(n, e, t) {
292
+ var r = e.next, s = { value: t, prev: e, next: r };
293
+ return e.next = s, r.prev = s, n.length++, s;
294
294
  }
295
- function O(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;
295
+ function L(n, e, t) {
296
+ for (var r = e.next, s = 0; s < t && r !== n.tail; s++) r = r.next;
297
+ e.next = r, r.prev = e, n.length -= s;
298
298
  }
299
- if (l.Prism = o, E.stringify = function t(e, a) {
299
+ if (l.Prism = o, E.stringify = function n(e, t) {
300
300
  if (typeof e == "string") return e;
301
301
  if (Array.isArray(e)) {
302
302
  var r = "";
303
- return e.forEach(function(R) {
304
- r += t(R, a);
303
+ return e.forEach(function(I) {
304
+ r += n(I, t);
305
305
  }), r;
306
306
  }
307
- var s = { type: e.type, content: t(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a }, p = e.alias;
307
+ var s = { type: e.type, content: n(e.content, t), tag: "span", classes: ["token", e.type], attributes: {}, language: t }, p = e.alias;
308
308
  p && (Array.isArray(p) ? Array.prototype.push.apply(s.classes, p) : s.classes.push(p)), o.hooks.run("wrap", s);
309
309
  var d = "";
310
- for (var m in s.attributes) d += " " + m + '="' + (s.attributes[m] || "").replace(/"/g, "&quot;") + '"';
310
+ for (var h in s.attributes) d += " " + h + '="' + (s.attributes[h] || "").replace(/"/g, "&quot;") + '"';
311
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();
312
+ }, !l.document) return l.addEventListener && (o.disableWorkerMessageHandler || l.addEventListener("message", function(n) {
313
+ var e = JSON.parse(n.data), t = e.language, r = e.code, s = e.immediateClose;
314
+ l.postMessage(o.highlight(r, o.languages[t], t)), s && l.close();
315
315
  }, !1)), o;
316
- var _ = o.util.currentScript();
317
- function f() {
316
+ var R = o.util.currentScript();
317
+ function O() {
318
318
  o.manual || o.highlightAll();
319
319
  }
320
- if (_ && (o.filename = _.src, _.hasAttribute("data-manual") && (o.manual = !0)), !o.manual) {
321
- var A = document.readyState;
322
- A === "loading" || A === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", f) : window.requestAnimationFrame ? window.requestAnimationFrame(f) : window.setTimeout(f, 16);
320
+ if (R && (o.filename = R.src, R.hasAttribute("data-manual") && (o.manual = !0)), !o.manual) {
321
+ var F = document.readyState;
322
+ F === "loading" || F === "interactive" && R && R.defer ? document.addEventListener("DOMContentLoaded", O) : window.requestAnimationFrame ? window.requestAnimationFrame(O) : window.setTimeout(O, 16);
323
323
  }
324
324
  return o;
325
325
  }(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
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) {
326
+ u.exports && (u.exports = a), ce !== void 0 && (ce.Prism = a), a.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] }, a.languages.markup.tag.inside["attr-value"].inside.entity = a.languages.markup.entity, a.languages.markup.doctype.inside["internal-subset"].inside = a.languages.markup, a.hooks.add("wrap", function(l) {
327
327
  l.type === "entity" && (l.attributes.title = l.content.replace(/&amp;/, "&"));
328
- }), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(l, i) {
329
- var h = {};
330
- h["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: n.languages[i] }, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
331
- var S = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: h } };
332
- S["language-" + i] = { pattern: /[\s\S]+/, inside: n.languages[i] };
328
+ }), Object.defineProperty(a.languages.markup.tag, "addInlined", { value: function(l, i) {
329
+ var m = {};
330
+ m["language-" + i] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: a.languages[i] }, m.cdata = /^<!\[CDATA\[|\]\]>$/i;
331
+ var v = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: m } };
332
+ v["language-" + i] = { pattern: /[\s\S]+/, inside: a.languages[i] };
333
333
  var o = {};
334
334
  o[l] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
335
335
  return l;
336
- }), "i"), lookbehind: !0, greedy: !0, inside: S }, 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) {
336
+ }), "i"), lookbehind: !0, greedy: !0, inside: v }, a.languages.insertBefore("markup", "cdata", o);
337
+ } }), Object.defineProperty(a.languages.markup.tag, "addAttribute", { value: function(l, i) {
338
+ a.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: a.languages[i] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
339
+ } }), a.languages.html = a.languages.markup, a.languages.mathml = a.languages.markup, a.languages.svg = a.languages.markup, a.languages.xml = a.languages.extend("markup", {}), a.languages.ssml = a.languages.xml, a.languages.atom = a.languages.xml, a.languages.rss = a.languages.xml, function(l) {
340
340
  var i = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
341
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;
343
- h && (h.tag.addInlined("style", "css"), h.tag.addAttribute("style", "css"));
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() {
345
- if (n !== void 0 && typeof document < "u") {
342
+ var m = l.languages.markup;
343
+ m && (m.tag.addInlined("style", "css"), m.tag.addAttribute("style", "css"));
344
+ }(a), a.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: /[{}[\];(),.:]/ }, a.languages.javascript = a.languages.extend("clike", { "class-name": [a.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}|\?\?=?|\?\.?|[~:]/ }), a.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, a.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: a.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: a.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: a.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: a.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: a.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), a.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: a.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" } }), a.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), a.languages.markup && (a.languages.markup.tag.addInlined("script", "javascript"), a.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")), a.languages.js = a.languages.javascript, function() {
345
+ if (a !== void 0 && typeof document < "u") {
346
346
  Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
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", S = "loaded", o = "pre[data-src]:not([" + i + '="' + S + '"]):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 N = v.getAttribute("data-src"), O = y.language;
357
- if (O === "none") {
358
- var _ = (/\.(\w+)$/.exec(N) || [, "none"])[1];
359
- O = l[_] || _;
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", m = "loading", v = "loaded", o = "pre[data-src]:not([" + i + '="' + v + '"]):not([' + i + '="' + m + '"])';
348
+ a.hooks.add("before-highlightall", function(k) {
349
+ k.selector += ", " + o;
350
+ }), a.hooks.add("before-sanity-check", function(k) {
351
+ var f = k.element;
352
+ if (f.matches(o)) {
353
+ k.code = "", f.setAttribute(i, m);
354
+ var T = f.appendChild(document.createElement("CODE"));
355
+ T.textContent = "Loading…";
356
+ var _ = f.getAttribute("data-src"), L = k.language;
357
+ if (L === "none") {
358
+ var R = (/\.(\w+)$/.exec(_) || [, "none"])[1];
359
+ L = l[R] || R;
360
360
  }
361
- n.util.setLanguage(F, O), n.util.setLanguage(v, O);
362
- var f = n.plugins.autoloader;
363
- f && f.loadLanguages(O), function(A, t, e) {
364
- var a = new XMLHttpRequest();
365
- a.open("GET", A, !0), a.onreadystatechange = function() {
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"));
367
- }, a.send(null);
368
- }(N, function(A) {
369
- v.setAttribute(i, S);
370
- var t = function(s) {
361
+ a.util.setLanguage(T, L), a.util.setLanguage(f, L);
362
+ var O = a.plugins.autoloader;
363
+ O && O.loadLanguages(L), function(F, n, e) {
364
+ var t = new XMLHttpRequest();
365
+ t.open("GET", F, !0), t.onreadystatechange = function() {
366
+ t.readyState == 4 && (t.status < 400 && t.responseText ? n(t.responseText) : t.status >= 400 ? e("✖ Error " + t.status + " while fetching file: " + t.statusText) : e("✖ Error: File does not exist or is empty"));
367
+ }, t.send(null);
368
+ }(_, function(F) {
369
+ f.setAttribute(i, v);
370
+ var n = function(s) {
371
371
  var p = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(s || "");
372
372
  if (p) {
373
- var d = Number(p[1]), m = p[2], R = p[3];
374
- return m ? R ? [d, Number(R)] : [d, void 0] : [d, d];
373
+ var d = Number(p[1]), h = p[2], I = p[3];
374
+ return h ? I ? [d, Number(I)] : [d, void 0] : [d, d];
375
375
  }
376
- }(v.getAttribute("data-range"));
377
- if (t) {
378
- var e = A.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)), A = e.slice(a, r).join(`
380
- `), v.hasAttribute("data-start") || v.setAttribute("data-start", String(a + 1));
376
+ }(f.getAttribute("data-range"));
377
+ if (n) {
378
+ var e = F.split(/\r\n?|\n/g), t = n[0], r = n[1] == null ? e.length : n[1];
379
+ t < 0 && (t += e.length), t = Math.max(0, Math.min(t - 1, e.length)), r < 0 && (r += e.length), r = Math.max(0, Math.min(r, e.length)), F = e.slice(t, r).join(`
380
+ `), f.hasAttribute("data-start") || f.setAttribute("data-start", String(t + 1));
381
381
  }
382
- F.textContent = A, n.highlightElement(F);
383
- }, function(A) {
384
- v.setAttribute(i, "failed"), F.textContent = A;
382
+ T.textContent = F, a.highlightElement(T);
383
+ }, function(F) {
384
+ f.setAttribute(i, "failed"), T.textContent = F;
385
385
  });
386
386
  }
387
- }), n.plugins.fileHighlight = { highlight: function(y) {
388
- for (var v, F = (y || document).querySelectorAll(o), N = 0; v = F[N++]; ) n.highlightElement(v);
387
+ }), a.plugins.fileHighlight = { highlight: function(k) {
388
+ for (var f, T = (k || document).querySelectorAll(o), _ = 0; f = T[_++]; ) a.highlightElement(f);
389
389
  } };
390
390
  var E = !1;
391
- n.fileHighlight = function() {
392
- E || (E = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
391
+ a.fileHighlight = function() {
392
+ E || (E = !0), a.plugins.fileHighlight.highlight.apply(this, arguments);
393
393
  };
394
394
  }
395
395
  }();
396
396
  })(de);
397
397
  const oe = _e(de.exports);
398
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) {
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() {
401
- return n.source;
399
+ var a = /\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: a, 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: a, 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() {
401
+ return a.source;
402
402
  })), lookbehind: !0, inside: { punctuation: /\./ } } });
403
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) {
404
- for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, l = 0; l < 2; l++) n = n.replace(/<self>/g, function() {
405
- return n;
404
+ for (var a = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, l = 0; l < 2; l++) a = a.replace(/<self>/g, function() {
405
+ return a;
406
406
  });
407
- n = n.replace(/<self>/g, function() {
407
+ a = a.replace(/<self>/g, function() {
408
408
  return /[^\s\S]/.source;
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;
409
+ }), u.languages.rust = { comment: [{ pattern: RegExp(/(^|[^\\])/.source + a), 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;
410
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) {
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"], S = i.variable[1].inside, o = 0; o < h.length; o++) S[h[o]] = u.languages.bash[h[o]];
411
+ var a = "\\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("\\$" + a), 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("(\\{)" + a), 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;|&]|[<>]\\()" + a), 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("\\$?" + a), 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 m = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], v = i.variable[1].inside, o = 0; o < m.length; o++) v[m[o]] = u.languages.bash[m[o]];
414
414
  u.languages.sh = u.languages.bash, u.languages.shell = u.languages.bash;
415
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;
416
- const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, n) => {
416
+ const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, a) => {
417
417
  const l = u.__vccOpts || u;
418
- for (const [i, h] of n) l[i] = h;
418
+ for (const [i, m] of a) l[i] = m;
419
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) {
420
+ }, Oe = pe(le({ __name: "CodeEditor", props: { modelValue: {}, language: {}, theme: { default: "dark" }, disabled: { type: Boolean, default: !1 } }, emits: ["update:modelValue", "change"], setup(u, { emit: a }) {
421
+ function l(n) {
422
422
  if (typeof document > "u") return;
423
- const e = "hep-cr-prism-styles", a = document.getElementById(e), r = t === "dark" ? `
423
+ const e = "hep-cr-prism-styles", t = document.getElementById(e), r = n === "dark" ? `
424
424
  /* 默认代码颜色 */
425
425
  .hep-cr-editor .hep-cr-highlight code,
426
426
  .hep-cr-editor .hep-cr-highlight pre {
@@ -584,98 +584,98 @@ const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, n) => {
584
584
  color: #333 !important;
585
585
  }
586
586
  `;
587
- a && a.remove();
587
+ t && t.remove();
588
588
  const s = document.createElement("style");
589
589
  s.id = e, s.textContent = r, document.head.appendChild(s);
590
590
  }
591
- ge((t) => ({ e3543a54: N.value })), typeof window < "u" && (window.Prism = oe);
592
- const i = u, h = n, S = I(null), o = I(null);
591
+ ge((n) => ({ e3543a54: _.value })), typeof window < "u" && (window.Prism = oe);
592
+ const i = u, m = a, v = x(null), o = x(null);
593
593
  let E = null;
594
- function y(t) {
594
+ function k(n) {
595
595
  E && clearTimeout(E), E = setTimeout(() => {
596
- h("change", t);
596
+ m("change", n);
597
597
  }, 500);
598
598
  }
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 = H(() => v[i.language.toLowerCase()] || "javascript"), N = H(() => i.theme === "dark" ? "#1e1e1e" : "#fafafa"), O = H(() => {
599
+ const f = { 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" }, T = B(() => f[i.language.toLowerCase()] || "javascript"), _ = B(() => i.theme === "dark" ? "#1e1e1e" : "#fafafa"), L = B(() => {
600
600
  try {
601
- const t = oe.languages[F.value];
602
- if (t) return oe.highlight(i.modelValue || "", t, F.value);
601
+ const n = oe.languages[T.value];
602
+ if (n) return oe.highlight(i.modelValue || "", n, T.value);
603
603
  } catch {
604
604
  }
605
- return function(t) {
605
+ return function(n) {
606
606
  const e = document.createElement("div");
607
- return e.textContent = t, e.innerHTML;
607
+ return e.textContent = n, e.innerHTML;
608
608
  }(i.modelValue || "");
609
609
  });
610
- function _(t) {
611
- const e = t.target;
612
- h("update:modelValue", e.value), y(e.value);
610
+ function R(n) {
611
+ const e = n.target;
612
+ m("update:modelValue", e.value), k(e.value);
613
613
  }
614
- function f() {
615
- S.value && o.value && (o.value.scrollTop = S.value.scrollTop, o.value.scrollLeft = S.value.scrollLeft);
614
+ function O() {
615
+ v.value && o.value && (o.value.scrollTop = v.value.scrollTop, o.value.scrollLeft = v.value.scrollLeft);
616
616
  }
617
- function A(t) {
618
- if (t.key === "Tab") {
619
- t.preventDefault();
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
+ function F(n) {
618
+ if (n.key === "Tab") {
619
+ n.preventDefault();
620
+ const e = n.target, t = e.selectionStart, r = e.selectionEnd, s = e.value;
621
+ e.value = s.substring(0, t) + " " + s.substring(r), e.selectionStart = e.selectionEnd = t + 2, m("update:modelValue", e.value), k(e.value);
622
622
  }
623
623
  }
624
624
  return he(() => {
625
625
  l(i.theme);
626
- }), B(() => i.theme, (t) => {
627
- l(t);
626
+ }), H(() => i.theme, (n) => {
627
+ l(n);
628
628
  }), me(() => {
629
629
  E && clearTimeout(E);
630
- }), (t, e) => (w(), T("div", { class: j(["hep-cr-editor", `hep-cr-theme-${u.theme}`]) }, [b("pre", { ref_key: "highlightRef", ref: o, class: j(["hep-cr-highlight", [`language-${F.value}`, `hep-cr-prism-${u.theme}`]]), "aria-hidden": "true" }, [b("code", { innerHTML: O.value }, null, 8, Ne)], 2), b("textarea", { ref_key: "codeRef", ref: S, class: "hep-cr-input", value: u.modelValue, disabled: u.disabled, onInput: _, onScroll: f, onKeydown: A, 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), S = I(!1), o = I(l.modelValue || l.code);
633
- B(() => l.modelValue, (c) => {
630
+ }), (n, e) => (S(), w("div", { class: j(["hep-cr-editor", `hep-cr-theme-${u.theme}`]) }, [b("pre", { ref_key: "highlightRef", ref: o, class: j(["hep-cr-highlight", [`language-${T.value}`, `hep-cr-prism-${u.theme}`]]), "aria-hidden": "true" }, [b("code", { innerHTML: L.value }, null, 8, Ne)], 2), b("textarea", { ref_key: "codeRef", ref: v, class: "hep-cr-input", value: u.modelValue, disabled: u.disabled, onInput: R, onScroll: O, onKeydown: F, 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" }, Be = ["disabled"], He = { 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: a }) {
632
+ const l = u, i = a, m = x(!1), v = x(!1), o = x(l.modelValue || l.code);
633
+ H(() => l.modelValue, (c) => {
634
634
  c !== void 0 && c !== o.value && (o.value = c);
635
- }), B(() => l.code, (c) => {
635
+ }), H(() => l.code, (c) => {
636
636
  c !== void 0 && c !== o.value && (o.value = c);
637
- }), B(o, (c) => {
637
+ }), H(o, (c) => {
638
638
  i("update:modelValue", c), i("update:code", c);
639
639
  });
640
- const E = I(l.language || "javascript");
641
- function y(c) {
642
- const g = c.target, k = g.value.includes(":") ? g.value.split(":")[0] : g.value;
643
- i("language-change", k, o.value, ie(k));
640
+ const E = x(l.language || "javascript");
641
+ function k(c) {
642
+ const g = c.target, y = g.value.includes(":") ? g.value.split(":")[0] : g.value;
643
+ i("language-change", y, o.value, ie(y));
644
644
  }
645
- B(() => l.language, (c) => {
645
+ H(() => l.language, (c) => {
646
646
  c && c !== E.value && (E.value = c);
647
- }), B(E, (c) => {
648
- h.value || S.value || (o.value = ie(c), S.value = !0), h.value = !1, i("update:language", c);
647
+ }), H(E, (c) => {
648
+ m.value || v.value || (o.value = ie(c), v.value = !0), m.value = !1, i("update:language", c);
649
649
  });
650
- const v = H(() => {
650
+ const f = B(() => {
651
651
  if (!l.themeColor) return {};
652
- const c = l.theme === "dark", g = l.themeColor, k = function(D) {
652
+ const c = l.theme === "dark", g = l.themeColor, y = function(D) {
653
653
  const P = parseInt(D.replace("#", ""), 16);
654
654
  return (0.299 * (P >> 16 & 255) + 0.587 * (P >> 8 & 255) + 0.114 * (255 & P)) / 255 > 0.5;
655
655
  }(g) ? "#000" : "#fff";
656
- return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover": F(g, c ? 20 : -20), "--hep-cr-tab-active-color": k };
656
+ return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover": T(g, c ? 20 : -20), "--hep-cr-tab-active-color": y };
657
657
  });
658
- function F(c, g) {
659
- const k = parseInt(c.replace("#", ""), 16), D = Math.round(2.55 * g);
660
- return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (k >> 16) + D)) + 256 * Math.min(255, Math.max(0, (k >> 8 & 255) + D)) + Math.min(255, Math.max(0, (255 & k) + D))).toString(16).slice(1);
658
+ function T(c, g) {
659
+ const y = parseInt(c.replace("#", ""), 16), D = Math.round(2.55 * g);
660
+ return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (y >> 16) + D)) + 256 * Math.min(255, Math.max(0, (y >> 8 & 255) + D)) + Math.min(255, Math.max(0, (255 & y) + D))).toString(16).slice(1);
661
661
  }
662
- const N = H(() => new Ie({ pistonUrl: l.pistonUrl, token: l.token })), O = I([]), _ = I(l.theme), f = I(""), A = I(""), t = I(!1), e = I(null), a = I("stdout"), r = I(null), s = I(!1), p = I(60), d = I(!1), m = I(!1), R = H(() => O.value.map((c) => ({ value: `${c.language}:${c.version}`, label: `${c.language.charAt(0).toUpperCase() + c.language.slice(1)} ${c.version}` }))), x = H(() => {
662
+ const _ = B(() => new Ie({ pistonUrl: l.pistonUrl, token: l.token })), L = x([]), R = x(l.theme), O = x(""), F = x(""), n = x(!1), e = x(null), t = x("stdout"), r = x(null), s = x(!1), p = x(60), d = x(!1), h = x(!1), I = B(() => L.value.map((c) => ({ value: `${c.language}:${c.version}`, label: `${c.language.charAt(0).toUpperCase() + c.language.slice(1)} ${c.version}` }))), A = B(() => {
663
663
  const c = E.value;
664
664
  return c.includes(":") ? c.split(":")[0] : c;
665
665
  });
666
666
  function G() {
667
- _.value = _.value === "light" ? "dark" : "light";
667
+ R.value = R.value === "light" ? "dark" : "light";
668
668
  }
669
669
  async function V() {
670
- if (!t.value) {
671
- t.value = !0, f.value = "", A.value = "", e.value = null, r.value = null, a.value = "stdout", i("execute-start");
670
+ if (!n.value) {
671
+ n.value = !0, O.value = "", F.value = "", e.value = null, r.value = null, t.value = "stdout", i("execute-start");
672
672
  try {
673
- const c = await N.value.execute(x.value, o.value);
674
- f.value = c.output, A.value = c.stderr, e.value = c.executionTime || null, a.value = c.stderr ? "stderr" : "stdout", i("execute-end", c);
673
+ const c = await _.value.execute(A.value, o.value);
674
+ O.value = c.output, F.value = c.stderr, e.value = c.executionTime || null, t.value = c.stderr ? "stderr" : "stdout", i("execute-end", c);
675
675
  } catch (c) {
676
676
  r.value = c instanceof Error ? c.message : "Execution failed", i("execute-end", { success: !1, output: "", stderr: r.value, code: -1 });
677
677
  } finally {
678
- t.value = !1;
678
+ n.value = !1;
679
679
  }
680
680
  }
681
681
  }
@@ -685,16 +685,16 @@ const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, n) => {
685
685
  }, 2e3);
686
686
  }
687
687
  async function Q() {
688
- const c = a.value === "stdout" ? f.value : A.value;
689
- await navigator.clipboard.writeText(c), m.value = !0, setTimeout(() => {
690
- m.value = !1;
688
+ const c = t.value === "stdout" ? O.value : F.value;
689
+ await navigator.clipboard.writeText(c), h.value = !0, setTimeout(() => {
690
+ h.value = !1;
691
691
  }, 2e3);
692
692
  }
693
693
  (async function() {
694
694
  s.value = !0, r.value = null;
695
695
  try {
696
- O.value = await N.value.getRuntimes();
697
- const c = x.value, g = O.value.find((k) => k.language === c);
696
+ L.value = await _.value.getRuntimes();
697
+ const c = A.value, g = L.value.find((y) => y.language === c);
698
698
  g && !E.value.includes(":") && (E.value = `${c}:${g.version}`);
699
699
  } catch (c) {
700
700
  r.value = c instanceof Error ? c.message : "Failed to load runtimes";
@@ -704,49 +704,60 @@ const Ne = ["innerHTML"], Le = ["value", "disabled"], pe = (u, n) => {
704
704
  })();
705
705
  let z = !1;
706
706
  function X(c) {
707
- z = !0, document.addEventListener("mousemove", L), document.addEventListener("mouseup", C), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
707
+ z = !0, document.addEventListener("mousemove", N), document.addEventListener("mouseup", C), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
708
708
  }
709
- function L(c) {
709
+ function N(c) {
710
710
  if (!z) return;
711
711
  const g = document.querySelector(".hep-cr-main");
712
712
  if (!g) return;
713
- const k = g.getBoundingClientRect(), D = (c.clientX - k.left) / k.width * 100;
713
+ const y = g.getBoundingClientRect(), D = (c.clientX - y.left) / y.width * 100;
714
714
  p.value = Math.max(20, Math.min(80, D));
715
715
  }
716
716
  function C() {
717
- z = !1, document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", C), document.body.style.cursor = "", document.body.style.userSelect = "";
717
+ z = !1, document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", C), document.body.style.cursor = "", document.body.style.userSelect = "";
718
+ }
719
+ const M = B(() => `hep-cr-runner-${R.value}`);
720
+ return (c, g) => (S(), w("div", { class: j(["hep-cr-runner", M.value]), style: q(f.value) }, [b("div", Ce, [b("div", Pe, [u.showLanguageSelector ? fe((S(), w("select", { key: 0, "onUpdate:modelValue": g[0] || (g[0] = (y) => E.value = y), class: "hep-cr-language-select", disabled: n.value, onChange: k }, [s.value ? (S(), w("option", $e, "加载中...")) : $("", !0), (S(!0), w(be, null, ve(I.value, (y) => (S(), w("option", { key: y.value, value: y.value }, U(y.label), 9, Me))), 128))], 40, De)), [[Ee, E.value]]) : $("", !0)]), b("div", Ue, [b("button", { class: "hep-cr-btn hep-cr-btn-run", disabled: n.value || s.value, onClick: V }, [n.value ? (S(), w("span", He)) : (S(), w("span", je, "▶")), ye(" " + U(n.value ? "运行中..." : u.executorLabel), 1)], 8, Be), b("button", { class: "hep-cr-btn hep-cr-btn-theme", onClick: G, title: R.value === "light" ? "Switch to dark mode" : "Switch to light mode" }, [R.value === "light" ? (S(), w("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)])])) : (S(), w("svg", We, [...g[6] || (g[6] = [ke('<circle cx="12" cy="12" r="5" data-v-09f42ff0></circle><line x1="12" y1="1" x2="12" y2="3" data-v-09f42ff0></line><line x1="12" y1="21" x2="12" y2="23" data-v-09f42ff0></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-09f42ff0></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-09f42ff0></line><line x1="1" y1="12" x2="3" y2="12" data-v-09f42ff0></line><line x1="21" y1="12" x2="23" y2="12" data-v-09f42ff0></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-09f42ff0></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-09f42ff0></line>', 9)])]))], 8, Ge)])]), r.value ? (S(), w("div", Ve, U(r.value), 1)) : $("", !0), b("div", Ye, [u.showEditor ? (S(), w("div", { key: 0, class: "hep-cr-editor-panel", style: q({ width: p.value + "%" }) }, [b("div", Xe, [g[8] || (g[8] = b("span", { class: "hep-cr-panel-title" }, "编辑器", -1)), b("div", Ze, [b("span", Ke, U(A.value), 1), b("button", { class: j(["hep-cr-btn-icon", { "hep-cr-btn-copied": d.value }]), disabled: d.value, onClick: Y, title: d.value ? "已复制" : "复制" }, [d.value ? (S(), w("span", Qe, "已复制")) : (S(), w("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] = (y) => o.value = y), language: A.value, theme: R.value, disabled: !u.editable || n.value, onChange: g[2] || (g[2] = (y) => {
721
+ m.value = !0, i("update:modelValue", y);
722
+ }) }, null, 8, ["modelValue", "language", "theme", "disabled"])], 4)) : $("", !0), u.showEditor ? (S(), w("div", { key: 1, class: "hep-cr-resize-handle", onMousedown: X }, [...g[9] || (g[9] = [b("div", { class: "hep-cr-resize-line" }, null, -1)])], 32)) : $("", !0), b("div", { class: "hep-cr-output-panel", style: q({ width: u.showEditor ? 100 - p.value + "%" : "100%" }) }, [b("div", et, [b("div", tt, [b("button", { class: j(["hep-cr-tab", { active: t.value === "stdout" }]), onClick: g[3] || (g[3] = (y) => t.value = "stdout") }, " 输出 ", 2), F.value ? (S(), w("button", { key: 0, class: j(["hep-cr-tab", "hep-cr-tab-error", { active: t.value === "stderr" }]), onClick: g[4] || (g[4] = (y) => t.value = "stderr") }, " 错误 ", 2)) : $("", !0)]), b("div", nt, [e.value !== null ? (S(), w("span", at, U(e.value) + "ms ", 1)) : $("", !0), b("button", { class: j(["hep-cr-btn-icon", { "hep-cr-btn-copied": h.value }]), disabled: h.value, onClick: Q, title: h.value ? "已复制" : "复制" }, [h.value ? (S(), w("span", st, "已复制")) : (S(), w("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, [t.value === "stdout" ? (S(), w("pre", lt, U(n.value ? "代码执行中..." : O.value || '点击"运行"执行代码'), 1)) : (S(), w("pre", ut, U(F.value), 1))])], 4)])], 6));
723
+ } }), [["__scopeId", "data-v-09f42ff0"]]), 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: "运行" }, closeOnOverlayClick: { type: Boolean, default: !0 } }, emits: ["update:modelValue", "update:language", "update:code", "close", "language-change", "change"], setup(u, { expose: a, emit: l }) {
724
+ const i = u;
725
+ let m = !1;
726
+ const v = l, o = x(!1), E = x(i.language || "javascript"), k = x(i.code !== void 0 ? i.code : ie(i.language || "javascript"));
727
+ function f() {
728
+ o.value = !1, v("update:modelValue", !1), v("close");
729
+ }
730
+ function T(t) {
731
+ t.target === t.currentTarget && (m = !1);
732
+ }
733
+ function _() {
734
+ m = !0;
718
735
  }
719
- const M = H(() => `hep-cr-runner-${_.value}`);
720
- return (c, g) => (w(), T("div", { class: j(["hep-cr-runner", M.value]), style: q(v.value) }, [b("div", Ce, [b("div", Pe, [u.showLanguageSelector ? fe((w(), T("select", { key: 0, "onUpdate:modelValue": g[0] || (g[0] = (k) => E.value = k), class: "hep-cr-language-select", disabled: t.value, onChange: y }, [s.value ? (w(), T("option", $e, "加载中...")) : $("", !0), (w(!0), T(be, null, ve(R.value, (k) => (w(), T("option", { key: k.value, value: k.value }, U(k.label), 9, Me))), 128))], 40, De)), [[Ee, E.value]]) : $("", !0)]), b("div", Ue, [b("button", { class: "hep-cr-btn hep-cr-btn-run", disabled: t.value || s.value, onClick: V }, [t.value ? (w(), T("span", Be)) : (w(), T("span", je, "▶")), ye(" " + U(t.value ? "运行中..." : u.executorLabel), 1)], 8, He), b("button", { class: "hep-cr-btn hep-cr-btn-theme", onClick: G, title: _.value === "light" ? "Switch to dark mode" : "Switch to light mode" }, [_.value === "light" ? (w(), T("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)])])) : (w(), T("svg", We, [...g[6] || (g[6] = [ke('<circle cx="12" cy="12" r="5" data-v-09f42ff0></circle><line x1="12" y1="1" x2="12" y2="3" data-v-09f42ff0></line><line x1="12" y1="21" x2="12" y2="23" data-v-09f42ff0></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-09f42ff0></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-09f42ff0></line><line x1="1" y1="12" x2="3" y2="12" data-v-09f42ff0></line><line x1="21" y1="12" x2="23" y2="12" data-v-09f42ff0></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-09f42ff0></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-09f42ff0></line>', 9)])]))], 8, Ge)])]), r.value ? (w(), T("div", Ve, U(r.value), 1)) : $("", !0), b("div", Ye, [u.showEditor ? (w(), T("div", { key: 0, class: "hep-cr-editor-panel", style: q({ width: p.value + "%" }) }, [b("div", Xe, [g[8] || (g[8] = b("span", { class: "hep-cr-panel-title" }, "编辑器", -1)), b("div", Ze, [b("span", Ke, U(x.value), 1), b("button", { class: j(["hep-cr-btn-icon", { "hep-cr-btn-copied": d.value }]), disabled: d.value, onClick: Y, title: d.value ? "已复制" : "复制" }, [d.value ? (w(), T("span", Qe, "已复制")) : (w(), T("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] = (k) => o.value = k), language: x.value, theme: _.value, disabled: !u.editable || t.value, onChange: g[2] || (g[2] = (k) => {
721
- h.value = !0, i("update:modelValue", k);
722
- }) }, null, 8, ["modelValue", "language", "theme", "disabled"])], 4)) : $("", !0), u.showEditor ? (w(), T("div", { key: 1, class: "hep-cr-resize-handle", onMousedown: X }, [...g[9] || (g[9] = [b("div", { class: "hep-cr-resize-line" }, null, -1)])], 32)) : $("", !0), b("div", { class: "hep-cr-output-panel", style: q({ width: u.showEditor ? 100 - p.value + "%" : "100%" }) }, [b("div", et, [b("div", tt, [b("button", { class: j(["hep-cr-tab", { active: a.value === "stdout" }]), onClick: g[3] || (g[3] = (k) => a.value = "stdout") }, " 输出 ", 2), A.value ? (w(), T("button", { key: 0, class: j(["hep-cr-tab", "hep-cr-tab-error", { active: a.value === "stderr" }]), onClick: g[4] || (g[4] = (k) => a.value = "stderr") }, " 错误 ", 2)) : $("", !0)]), b("div", nt, [e.value !== null ? (w(), T("span", at, U(e.value) + "ms ", 1)) : $("", !0), b("button", { class: j(["hep-cr-btn-icon", { "hep-cr-btn-copied": m.value }]), disabled: m.value, onClick: Q, title: m.value ? "已复制" : "复制" }, [m.value ? (w(), T("span", st, "已复制")) : (w(), T("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, [a.value === "stdout" ? (w(), T("pre", lt, U(t.value ? "代码执行中..." : f.value || '点击"运行"执行代码'), 1)) : (w(), T("pre", ut, U(A.value), 1))])], 4)])], 6));
723
- } }), [["__scopeId", "data-v-09f42ff0"]]), 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 }) {
724
- const i = u, h = l, S = I(!1), o = I(i.language || "javascript"), E = I(i.code !== void 0 ? i.code : ie(i.language || "javascript"));
725
- function y() {
726
- S.value = !1, h("update:modelValue", !1), h("close");
736
+ function L() {
737
+ m = !1;
727
738
  }
728
- function v(f) {
729
- f.target === f.currentTarget && y();
739
+ function R(t) {
740
+ i.closeOnOverlayClick && t.target === t.currentTarget && !m && f();
730
741
  }
731
- function F(f) {
732
- o.value = f, h("update:language", f);
742
+ function O(t) {
743
+ E.value = t, v("update:language", t);
733
744
  }
734
- function N(f) {
735
- E.value = f, h("update:code", f);
745
+ function F(t) {
746
+ k.value = t, v("update:code", t);
736
747
  }
737
- function O(f, A, t) {
738
- h("language-change", f, A, t);
748
+ function n(t, r, s) {
749
+ v("language-change", t, r, s);
739
750
  }
740
- function _(f) {
741
- h("change", f);
751
+ function e(t) {
752
+ v("change", t);
742
753
  }
743
- return B(() => i.language, (f) => {
744
- f && (o.value = f);
745
- }), B(() => i.code, (f) => {
746
- f !== void 0 && (E.value = f);
747
- }), n({ open: function() {
748
- S.value = !0, h("update:modelValue", !0);
749
- }, close: y }), (f, A) => (w(), Se(we, { to: "body" }, [se(Ae, { name: "hep-cr-dialog-fade" }, { default: Te(() => [S.value ? (w(), T("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(u.title), 1), b("button", { class: "hep-cr-dialog-close", onClick: y }, [...A[0] || (A[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": N, onLanguageChange: O, onChange: _ }, null, 8, ["language", "code", "pistonUrl", "token", "theme", "themeColor", "showLanguageSelector", "showEditor", "editable", "executorLabel"])]), f.$slots.footer ? (w(), T("div", gt, [xe(f.$slots, "footer", { close: y })])) : $("", !0)], 4)])) : $("", !0)]), _: 3 })]));
754
+ return H(() => i.language, (t) => {
755
+ t && (E.value = t);
756
+ }), H(() => i.code, (t) => {
757
+ t !== void 0 && (k.value = t);
758
+ }), a({ open: function() {
759
+ o.value = !0, v("update:modelValue", !0);
760
+ }, close: f }), (t, r) => (S(), Se(we, { to: "body" }, [se(Ae, { name: "hep-cr-dialog-fade" }, { default: Te(() => [o.value ? (S(), w("div", { key: 0, class: "hep-cr-dialog-overlay", onMousedown: T, onClick: R }, [b("div", { class: "hep-cr-dialog-container", style: q({ width: typeof u.width == "number" ? u.width + "px" : u.width }), onMousedown: _, onMouseup: L }, [b("div", ct, [b("h3", dt, U(u.title), 1), b("button", { class: "hep-cr-dialog-close", onClick: f }, [...r[0] || (r[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: E.value, code: k.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": O, "onUpdate:code": F, onLanguageChange: n, onChange: e }, null, 8, ["language", "code", "pistonUrl", "token", "theme", "themeColor", "showLanguageSelector", "showEditor", "editable", "executorLabel"])]), t.$slots.footer ? (S(), w("div", gt, [xe(t.$slots, "footer", { close: f })])) : $("", !0)], 36)], 32)) : $("", !0)]), _: 3 })]));
750
761
  } });
751
762
  J.install = (u) => {
752
763
  u.component("CodeRunner", J);