@hep-code-runner/vue3 2.3.3 → 2.3.5
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/README.md +90 -171
- package/dist/index.d.ts +8 -2
- package/dist/index.js +69 -3
- package/dist/index.mjs +337 -263
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as oe, useCssVars as pe, ref as
|
|
2
|
-
var xe = Object.defineProperty, ie = (u, n,
|
|
1
|
+
import { defineComponent as oe, useCssVars as pe, ref as I, computed as M, onMounted as ge, watch as U, onUnmounted as he, openBlock as w, createElementBlock as T, normalizeClass as H, createElementVNode as E, normalizeStyle as K, withDirectives as me, createCommentVNode as P, Fragment as fe, renderList as be, toDisplayString as $, vModelSelect as Ee, createTextVNode as ve, createStaticVNode as ye, createVNode as re, createBlock as ke, Teleport as Se, Transition as we, withCtx as Ae, renderSlot as Te } from "vue";
|
|
2
|
+
var xe = Object.defineProperty, ie = (u, n, i) => ((l, h, f) => h in l ? xe(l, h, { enumerable: !0, configurable: !0, writable: !0, value: f }) : l[h] = f)(u, typeof n != "symbol" ? n + "" : n, i);
|
|
3
3
|
let ne = null;
|
|
4
4
|
class Fe {
|
|
5
5
|
constructor(n = {}) {
|
|
@@ -8,42 +8,108 @@ class Fe {
|
|
|
8
8
|
async getRuntimes(n = !1) {
|
|
9
9
|
if (ne && !n) return ne;
|
|
10
10
|
try {
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
const
|
|
14
|
-
return ne =
|
|
15
|
-
} catch (
|
|
16
|
-
throw
|
|
11
|
+
const i = await fetch(`${this.baseUrl}/runtimes`, { method: "GET", headers: { "Content-Type": "application/json" } });
|
|
12
|
+
if (!i.ok) throw new Error(`Failed to fetch runtimes: ${i.statusText}`);
|
|
13
|
+
const l = await i.json();
|
|
14
|
+
return ne = l, l;
|
|
15
|
+
} catch (i) {
|
|
16
|
+
throw i;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
async execute(n,
|
|
20
|
-
const h = (await this.getRuntimes()).find((
|
|
21
|
-
var
|
|
22
|
-
return
|
|
19
|
+
async execute(n, i, l = {}) {
|
|
20
|
+
const h = (await this.getRuntimes()).find((k) => {
|
|
21
|
+
var b;
|
|
22
|
+
return k.language.toLowerCase() === n.toLowerCase() || ((b = k.aliases) == null ? void 0 : b.some((A) => A.toLowerCase() === n.toLowerCase()));
|
|
23
23
|
});
|
|
24
24
|
if (!h) throw new Error(`Language '${n}' is not supported`);
|
|
25
|
-
const
|
|
25
|
+
const f = this.getFileName(n), s = { language: h.language, version: l.version || h.version, files: [{ name: f, content: i }], stdin: l.stdin || "", args: l.args || [], run_timeout: l.runTimeout || this.timeout, compile_timeout: this.timeout }, S = Date.now();
|
|
26
26
|
try {
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
29
|
-
const
|
|
30
|
-
return { success:
|
|
31
|
-
} catch (
|
|
32
|
-
return { success: !1, output: "", stderr:
|
|
27
|
+
const k = await fetch(`${this.baseUrl}/execute`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(s) });
|
|
28
|
+
if (!k.ok) throw new Error(`Execute failed: ${k.statusText}`);
|
|
29
|
+
const b = await k.json(), A = Date.now() - S, x = b.run.stdout || "", v = b.run.stderr || "";
|
|
30
|
+
return { success: b.run.code === 0, output: x, stderr: v, code: b.run.code, executionTime: A, compile: b.compile ? { stdout: b.compile.stdout || "", stderr: b.compile.stderr || "", code: b.compile.code } : void 0 };
|
|
31
|
+
} catch (k) {
|
|
32
|
+
return { success: !1, output: "", stderr: k instanceof Error ? k.message : "Unknown error", code: -1, executionTime: Date.now() - S };
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
getFileName(n) {
|
|
36
36
|
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}`;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
+
const Ie = { javascript: 'console.log("Hello, World!");', typescript: 'console.log("Hello, World!");', python: 'print("Hello, World!")', python3: 'print("Hello, World!")', go: `package main
|
|
40
|
+
|
|
41
|
+
import "fmt"
|
|
42
|
+
|
|
43
|
+
func main() {
|
|
44
|
+
fmt.Println("Hello, World!")
|
|
45
|
+
}`, rust: `fn main() {
|
|
46
|
+
println!("Hello, World!");
|
|
47
|
+
}`, java: `public class Main {
|
|
48
|
+
public static void main(String[] args) {
|
|
49
|
+
System.out.println("Hello, World!");
|
|
50
|
+
}
|
|
51
|
+
}`, c: `#include <stdio.h>
|
|
52
|
+
|
|
53
|
+
int main() {
|
|
54
|
+
printf("Hello, World!\\n");
|
|
55
|
+
return 0;
|
|
56
|
+
}`, cpp: `#include <iostream>
|
|
57
|
+
|
|
58
|
+
int main() {
|
|
59
|
+
std::cout << "Hello, World!" << std::endl;
|
|
60
|
+
return 0;
|
|
61
|
+
}`, csharp: `using System;
|
|
62
|
+
|
|
63
|
+
class Main {
|
|
64
|
+
static void Main() {
|
|
65
|
+
Console.WriteLine("Hello, World!");
|
|
66
|
+
}
|
|
67
|
+
}`, ruby: 'puts "Hello, World!"', php: `<?php
|
|
68
|
+
echo "Hello, World!";
|
|
69
|
+
?>`, bash: 'echo "Hello, World!"', shell: 'echo "Hello, World!"', perl: 'print "Hello, World!\\n";', lua: 'print("Hello, World!")', r: 'print("Hello, World!")', swift: 'print("Hello, World!")', kotlin: `fun main() {
|
|
70
|
+
println("Hello, World!")
|
|
71
|
+
}`, scala: `object Main extends App {
|
|
72
|
+
println("Hello, World!")
|
|
73
|
+
}`, haskell: 'main = putStrLn "Hello, World!"', elixir: 'IO.puts "Hello, World!"', erlang: 'main() -> io:fwrite("Hello, World!~n").', clojure: '(println "Hello, World!")', fsharp: 'printfn "Hello, World!"', dart: `void main() {
|
|
74
|
+
print("Hello, World!");
|
|
75
|
+
}`, assembly: `section .data
|
|
76
|
+
msg db 'Hello, World!', 0
|
|
77
|
+
section .text
|
|
78
|
+
global _start
|
|
79
|
+
_start:
|
|
80
|
+
mov rax, 1
|
|
81
|
+
mov rdi, 1
|
|
82
|
+
mov rsi, msg
|
|
83
|
+
mov rdx, 13
|
|
84
|
+
syscall
|
|
85
|
+
mov rax, 60
|
|
86
|
+
xor rdi, rdi
|
|
87
|
+
syscall`, html: `<!DOCTYPE html>
|
|
88
|
+
<html>
|
|
89
|
+
<head>
|
|
90
|
+
<title>Hello</title>
|
|
91
|
+
</head>
|
|
92
|
+
<body>
|
|
93
|
+
<h1>Hello, World!</h1>
|
|
94
|
+
</body>
|
|
95
|
+
</html>`, css: `body {
|
|
96
|
+
background-color: #f0f0f0;
|
|
97
|
+
font-family: Arial, sans-serif;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
h1 {
|
|
101
|
+
color: #333;
|
|
102
|
+
}`, sql: "SELECT 'Hello, World!' AS message;", markdown: `# Hello, World!
|
|
103
|
+
|
|
104
|
+
This is a sample markdown document.` };
|
|
39
105
|
var le = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
40
|
-
function
|
|
106
|
+
function _e(u) {
|
|
41
107
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
42
108
|
}
|
|
43
109
|
var ue = { exports: {} };
|
|
44
110
|
(function(u) {
|
|
45
|
-
var n = function(
|
|
46
|
-
var
|
|
111
|
+
var n = function(i) {
|
|
112
|
+
var l = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, h = 0, f = {}, s = { manual: i.Prism && i.Prism.manual, disableWorkerMessageHandler: i.Prism && i.Prism.disableWorkerMessageHandler, util: { encode: function t(e) {
|
|
47
113
|
return e instanceof S ? new S(e.type, t(e.content), e.alias) : Array.isArray(e) ? e.map(t) : e.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
48
114
|
}, type: function(t) {
|
|
49
115
|
return Object.prototype.toString.call(t).slice(8, -1);
|
|
@@ -54,24 +120,24 @@ var ue = { exports: {} };
|
|
|
54
120
|
switch (a = a || {}, s.util.type(e)) {
|
|
55
121
|
case "Object":
|
|
56
122
|
if (o = s.util.objId(e), a[o]) return a[o];
|
|
57
|
-
for (var
|
|
123
|
+
for (var d in r = {}, a[o] = r, e) e.hasOwnProperty(d) && (r[d] = t(e[d], a));
|
|
58
124
|
return r;
|
|
59
125
|
case "Array":
|
|
60
|
-
return o = s.util.objId(e), a[o] ? a[o] : (r = [], a[o] = r, e.forEach(function(
|
|
61
|
-
r[
|
|
126
|
+
return o = s.util.objId(e), a[o] ? a[o] : (r = [], a[o] = r, e.forEach(function(p, m) {
|
|
127
|
+
r[m] = t(p, a);
|
|
62
128
|
}), r);
|
|
63
129
|
default:
|
|
64
130
|
return e;
|
|
65
131
|
}
|
|
66
132
|
}, getLanguage: function(t) {
|
|
67
133
|
for (; t; ) {
|
|
68
|
-
var e =
|
|
134
|
+
var e = l.exec(t.className);
|
|
69
135
|
if (e) return e[1].toLowerCase();
|
|
70
136
|
t = t.parentElement;
|
|
71
137
|
}
|
|
72
138
|
return "none";
|
|
73
139
|
}, setLanguage: function(t, e) {
|
|
74
|
-
t.className = t.className.replace(RegExp(
|
|
140
|
+
t.className = t.className.replace(RegExp(l, "gi"), ""), t.classList.add("language-" + e);
|
|
75
141
|
}, currentScript: function() {
|
|
76
142
|
if (typeof document > "u") return null;
|
|
77
143
|
if (document.currentScript && document.currentScript.tagName === "SCRIPT") return document.currentScript;
|
|
@@ -93,51 +159,51 @@ var ue = { exports: {} };
|
|
|
93
159
|
t = t.parentElement;
|
|
94
160
|
}
|
|
95
161
|
return !!a;
|
|
96
|
-
} }, languages: { plain:
|
|
162
|
+
} }, languages: { plain: f, plaintext: f, text: f, txt: f, extend: function(t, e) {
|
|
97
163
|
var a = s.util.clone(s.languages[t]);
|
|
98
164
|
for (var r in e) a[r] = e[r];
|
|
99
165
|
return a;
|
|
100
166
|
}, insertBefore: function(t, e, a, r) {
|
|
101
|
-
var o = (r = r || s.languages)[t],
|
|
102
|
-
for (var
|
|
103
|
-
if (
|
|
104
|
-
a.hasOwnProperty(
|
|
167
|
+
var o = (r = r || s.languages)[t], d = {};
|
|
168
|
+
for (var p in o) if (o.hasOwnProperty(p)) {
|
|
169
|
+
if (p == e) for (var m in a) a.hasOwnProperty(m) && (d[m] = a[m]);
|
|
170
|
+
a.hasOwnProperty(p) || (d[p] = o[p]);
|
|
105
171
|
}
|
|
106
|
-
var
|
|
107
|
-
return r[t] =
|
|
108
|
-
|
|
109
|
-
}),
|
|
172
|
+
var F = r[t];
|
|
173
|
+
return r[t] = d, s.languages.DFS(s.languages, function(R, j) {
|
|
174
|
+
j === F && R != t && (this[R] = d);
|
|
175
|
+
}), d;
|
|
110
176
|
}, DFS: function t(e, a, r, o) {
|
|
111
177
|
o = o || {};
|
|
112
|
-
var
|
|
113
|
-
for (var
|
|
114
|
-
a.call(e,
|
|
115
|
-
var
|
|
116
|
-
|
|
178
|
+
var d = s.util.objId;
|
|
179
|
+
for (var p in e) if (e.hasOwnProperty(p)) {
|
|
180
|
+
a.call(e, p, e[p], r || p);
|
|
181
|
+
var m = e[p], F = s.util.type(m);
|
|
182
|
+
F !== "Object" || o[d(m)] ? F !== "Array" || o[d(m)] || (o[d(m)] = !0, t(m, a, p, o)) : (o[d(m)] = !0, t(m, a, null, o));
|
|
117
183
|
}
|
|
118
184
|
} }, plugins: {}, highlightAll: function(t, e) {
|
|
119
185
|
s.highlightAllUnder(document, t, e);
|
|
120
186
|
}, highlightAllUnder: function(t, e, a) {
|
|
121
187
|
var r = { callback: a, container: t, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' };
|
|
122
188
|
s.hooks.run("before-highlightall", r), r.elements = Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)), s.hooks.run("before-all-elements-highlight", r);
|
|
123
|
-
for (var o,
|
|
189
|
+
for (var o, d = 0; o = r.elements[d++]; ) s.highlightElement(o, e === !0, r.callback);
|
|
124
190
|
}, highlightElement: function(t, e, a) {
|
|
125
191
|
var r = s.util.getLanguage(t), o = s.languages[r];
|
|
126
192
|
s.util.setLanguage(t, r);
|
|
127
|
-
var
|
|
128
|
-
|
|
129
|
-
var
|
|
130
|
-
function
|
|
131
|
-
|
|
193
|
+
var d = t.parentElement;
|
|
194
|
+
d && d.nodeName.toLowerCase() === "pre" && s.util.setLanguage(d, r);
|
|
195
|
+
var p = { element: t, language: r, grammar: o, code: t.textContent };
|
|
196
|
+
function m(R) {
|
|
197
|
+
p.highlightedCode = R, s.hooks.run("before-insert", p), p.element.innerHTML = p.highlightedCode, s.hooks.run("after-highlight", p), s.hooks.run("complete", p), a && a.call(p.element);
|
|
132
198
|
}
|
|
133
|
-
if (s.hooks.run("before-sanity-check",
|
|
134
|
-
if (s.hooks.run("before-highlight",
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
} else
|
|
140
|
-
else
|
|
199
|
+
if (s.hooks.run("before-sanity-check", p), (d = p.element.parentElement) && d.nodeName.toLowerCase() === "pre" && !d.hasAttribute("tabindex") && d.setAttribute("tabindex", "0"), !p.code) return s.hooks.run("complete", p), void (a && a.call(p.element));
|
|
200
|
+
if (s.hooks.run("before-highlight", p), p.grammar) if (e && i.Worker) {
|
|
201
|
+
var F = new Worker(s.filename);
|
|
202
|
+
F.onmessage = function(R) {
|
|
203
|
+
m(R.data);
|
|
204
|
+
}, F.postMessage(JSON.stringify({ language: p.language, code: p.code, immediateClose: !0 }));
|
|
205
|
+
} else m(s.highlight(p.code, p.grammar, p.language));
|
|
206
|
+
else m(s.util.encode(p.code));
|
|
141
207
|
}, highlight: function(t, e, a) {
|
|
142
208
|
var r = { code: t, grammar: e, language: a };
|
|
143
209
|
if (s.hooks.run("before-tokenize", r), !r.grammar) throw new Error('The language "' + r.language + '" has no grammar.');
|
|
@@ -148,10 +214,10 @@ var ue = { exports: {} };
|
|
|
148
214
|
for (var r in a) e[r] = a[r];
|
|
149
215
|
delete e.rest;
|
|
150
216
|
}
|
|
151
|
-
var o = new
|
|
152
|
-
return
|
|
153
|
-
for (var
|
|
154
|
-
return
|
|
217
|
+
var o = new A();
|
|
218
|
+
return x(o, o.head, t), b(t, o, e, o.head, 0), function(d) {
|
|
219
|
+
for (var p = [], m = d.head.next; m !== d.tail; ) p.push(m.value), m = m.next;
|
|
220
|
+
return p;
|
|
155
221
|
}(o);
|
|
156
222
|
}, hooks: { all: {}, add: function(t, e) {
|
|
157
223
|
var a = s.hooks.all;
|
|
@@ -163,154 +229,154 @@ var ue = { exports: {} };
|
|
|
163
229
|
function S(t, e, a, r) {
|
|
164
230
|
this.type = t, this.content = e, this.alias = a, this.length = 0 | (r || "").length;
|
|
165
231
|
}
|
|
166
|
-
function
|
|
232
|
+
function k(t, e, a, r) {
|
|
167
233
|
t.lastIndex = e;
|
|
168
234
|
var o = t.exec(a);
|
|
169
235
|
if (o && r && o[1]) {
|
|
170
|
-
var
|
|
171
|
-
o.index +=
|
|
236
|
+
var d = o[1].length;
|
|
237
|
+
o.index += d, o[0] = o[0].slice(d);
|
|
172
238
|
}
|
|
173
239
|
return o;
|
|
174
240
|
}
|
|
175
|
-
function
|
|
176
|
-
for (var
|
|
177
|
-
var
|
|
178
|
-
|
|
179
|
-
for (var
|
|
180
|
-
if (
|
|
181
|
-
var
|
|
182
|
-
if (
|
|
183
|
-
var Y =
|
|
184
|
-
|
|
241
|
+
function b(t, e, a, r, o, d) {
|
|
242
|
+
for (var p in a) if (a.hasOwnProperty(p) && a[p]) {
|
|
243
|
+
var m = a[p];
|
|
244
|
+
m = Array.isArray(m) ? m : [m];
|
|
245
|
+
for (var F = 0; F < m.length; ++F) {
|
|
246
|
+
if (d && d.cause == p + "," + F) return;
|
|
247
|
+
var R = m[F], j = R.inside, V = !!R.lookbehind, G = !!R.greedy, J = R.alias;
|
|
248
|
+
if (G && !R.pattern.global) {
|
|
249
|
+
var Y = R.pattern.toString().match(/[imsuy]*$/)[0];
|
|
250
|
+
R.pattern = RegExp(R.pattern.source, Y + "g");
|
|
185
251
|
}
|
|
186
|
-
for (var
|
|
187
|
-
var
|
|
252
|
+
for (var z = R.pattern || R, O = r.next, c = o; O !== e.tail && !(d && c >= d.reach); c += O.value.length, O = O.next) {
|
|
253
|
+
var g = O.value;
|
|
188
254
|
if (e.length > t.length) return;
|
|
189
|
-
if (!(
|
|
190
|
-
var
|
|
191
|
-
if (
|
|
192
|
-
if (!(
|
|
193
|
-
var
|
|
194
|
-
for (
|
|
195
|
-
if (
|
|
196
|
-
for (var
|
|
197
|
-
|
|
198
|
-
} else if (!(
|
|
199
|
-
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
-
if (Q && (
|
|
204
|
-
var te = { cause:
|
|
205
|
-
|
|
255
|
+
if (!(g instanceof S)) {
|
|
256
|
+
var y, C = 1;
|
|
257
|
+
if (G) {
|
|
258
|
+
if (!(y = k(z, c, t, V)) || y.index >= t.length) break;
|
|
259
|
+
var D = y.index, de = y.index + y[0].length, B = c;
|
|
260
|
+
for (B += O.value.length; D >= B; ) B += (O = O.next).value.length;
|
|
261
|
+
if (c = B -= O.value.length, O.value instanceof S) continue;
|
|
262
|
+
for (var W = O; W !== e.tail && (B < de || typeof W.value == "string"); W = W.next) C++, B += W.value.length;
|
|
263
|
+
C--, g = t.slice(c, B), y.index -= c;
|
|
264
|
+
} else if (!(y = k(z, 0, g, V))) continue;
|
|
265
|
+
D = y.index;
|
|
266
|
+
var X = y[0], Q = g.slice(0, D), se = g.slice(D + X.length), ee = c + g.length;
|
|
267
|
+
d && ee > d.reach && (d.reach = ee);
|
|
268
|
+
var Z = O.prev;
|
|
269
|
+
if (Q && (Z = x(e, Z, Q), c += Q.length), v(e, Z, C), O = x(e, Z, new S(p, j ? s.tokenize(X, j) : X, J, X)), se && x(e, O, se), C > 1) {
|
|
270
|
+
var te = { cause: p + "," + F, reach: ee };
|
|
271
|
+
b(t, e, a, O.prev, c, te), d && te.reach > d.reach && (d.reach = te.reach);
|
|
206
272
|
}
|
|
207
273
|
}
|
|
208
274
|
}
|
|
209
275
|
}
|
|
210
276
|
}
|
|
211
277
|
}
|
|
212
|
-
function
|
|
278
|
+
function A() {
|
|
213
279
|
var t = { value: null, prev: null, next: null }, e = { value: null, prev: t, next: null };
|
|
214
280
|
t.next = e, this.head = t, this.tail = e, this.length = 0;
|
|
215
281
|
}
|
|
216
|
-
function
|
|
282
|
+
function x(t, e, a) {
|
|
217
283
|
var r = e.next, o = { value: a, prev: e, next: r };
|
|
218
284
|
return e.next = o, r.prev = o, t.length++, o;
|
|
219
285
|
}
|
|
220
|
-
function
|
|
286
|
+
function v(t, e, a) {
|
|
221
287
|
for (var r = e.next, o = 0; o < a && r !== t.tail; o++) r = r.next;
|
|
222
288
|
e.next = r, r.prev = e, t.length -= o;
|
|
223
289
|
}
|
|
224
|
-
if (
|
|
290
|
+
if (i.Prism = s, S.stringify = function t(e, a) {
|
|
225
291
|
if (typeof e == "string") return e;
|
|
226
292
|
if (Array.isArray(e)) {
|
|
227
293
|
var r = "";
|
|
228
|
-
return e.forEach(function(
|
|
229
|
-
r += t(
|
|
294
|
+
return e.forEach(function(F) {
|
|
295
|
+
r += t(F, a);
|
|
230
296
|
}), r;
|
|
231
297
|
}
|
|
232
|
-
var o = { type: e.type, content: t(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a },
|
|
233
|
-
|
|
234
|
-
var
|
|
235
|
-
for (var
|
|
236
|
-
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' +
|
|
237
|
-
}, !
|
|
298
|
+
var o = { type: e.type, content: t(e.content, a), tag: "span", classes: ["token", e.type], attributes: {}, language: a }, d = e.alias;
|
|
299
|
+
d && (Array.isArray(d) ? Array.prototype.push.apply(o.classes, d) : o.classes.push(d)), s.hooks.run("wrap", o);
|
|
300
|
+
var p = "";
|
|
301
|
+
for (var m in o.attributes) p += " " + m + '="' + (o.attributes[m] || "").replace(/"/g, """) + '"';
|
|
302
|
+
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + p + ">" + o.content + "</" + o.tag + ">";
|
|
303
|
+
}, !i.document) return i.addEventListener && (s.disableWorkerMessageHandler || i.addEventListener("message", function(t) {
|
|
238
304
|
var e = JSON.parse(t.data), a = e.language, r = e.code, o = e.immediateClose;
|
|
239
|
-
|
|
305
|
+
i.postMessage(s.highlight(r, s.languages[a], a)), o && i.close();
|
|
240
306
|
}, !1)), s;
|
|
241
|
-
var
|
|
242
|
-
function
|
|
307
|
+
var _ = s.util.currentScript();
|
|
308
|
+
function N() {
|
|
243
309
|
s.manual || s.highlightAll();
|
|
244
310
|
}
|
|
245
|
-
if (
|
|
246
|
-
var
|
|
247
|
-
|
|
311
|
+
if (_ && (s.filename = _.src, _.hasAttribute("data-manual") && (s.manual = !0)), !s.manual) {
|
|
312
|
+
var L = document.readyState;
|
|
313
|
+
L === "loading" || L === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", N) : window.requestAnimationFrame ? window.requestAnimationFrame(N) : window.setTimeout(N, 16);
|
|
248
314
|
}
|
|
249
315
|
return s;
|
|
250
316
|
}(typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {});
|
|
251
|
-
u.exports && (u.exports = n), le !== void 0 && (le.Prism = n), n.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(
|
|
252
|
-
|
|
253
|
-
}), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(
|
|
317
|
+
u.exports && (u.exports = n), le !== void 0 && (le.Prism = n), n.languages.markup = { comment: { pattern: /<!--(?:(?!<!--)[\s\S])*?-->/, greedy: !0 }, prolog: { pattern: /<\?[\s\S]+?\?>/, greedy: !0 }, doctype: { pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i, greedy: !0, inside: { "internal-subset": { pattern: /(^[^\[]*\[)[\s\S]+(?=\]>$)/, lookbehind: !0, greedy: !0, inside: null }, string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 }, punctuation: /^<!|>$|[[\]]/, "doctype-tag": /^DOCTYPE/i, name: /[^\s<>'"]+/ } }, cdata: { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, greedy: !0 }, tag: { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: !0, inside: { tag: { pattern: /^<\/?[^\s>\/]+/, inside: { punctuation: /^<\/?/, namespace: /^[^\s>\/:]+:/ } }, "special-attr": [], "attr-value": { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { punctuation: [{ pattern: /^=/, alias: "attr-equals" }, { pattern: /^(\s*)["']|["']$/, lookbehind: !0 }] } }, punctuation: /\/?>/, "attr-name": { pattern: /[^\s>\/]+/, inside: { namespace: /^[^\s>\/:]+:/ } } } }, entity: [{ pattern: /&[\da-z]{1,8};/i, alias: "named-entity" }, /&#x?[\da-f]{1,8};/i] }, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(i) {
|
|
318
|
+
i.type === "entity" && (i.attributes.title = i.content.replace(/&/, "&"));
|
|
319
|
+
}), Object.defineProperty(n.languages.markup.tag, "addInlined", { value: function(i, l) {
|
|
254
320
|
var h = {};
|
|
255
|
-
h["language-" +
|
|
256
|
-
var
|
|
257
|
-
|
|
321
|
+
h["language-" + l] = { pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i, lookbehind: !0, inside: n.languages[l] }, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
322
|
+
var f = { "included-cdata": { pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i, inside: h } };
|
|
323
|
+
f["language-" + l] = { pattern: /[\s\S]+/, inside: n.languages[l] };
|
|
258
324
|
var s = {};
|
|
259
|
-
s[
|
|
260
|
-
return
|
|
261
|
-
}), "i"), lookbehind: !0, greedy: !0, inside:
|
|
262
|
-
} }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(
|
|
263
|
-
n.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" +
|
|
264
|
-
} }), 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(
|
|
265
|
-
var
|
|
266
|
-
|
|
267
|
-
var h =
|
|
325
|
+
s[i] = { pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
326
|
+
return i;
|
|
327
|
+
}), "i"), lookbehind: !0, greedy: !0, inside: f }, n.languages.insertBefore("markup", "cdata", s);
|
|
328
|
+
} }), Object.defineProperty(n.languages.markup.tag, "addAttribute", { value: function(i, l) {
|
|
329
|
+
n.languages.markup.tag.inside["special-attr"].push({ pattern: RegExp(/(^|["'\s])/.source + "(?:" + i + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), lookbehind: !0, inside: { "attr-name": /^[^\s=]+/, "attr-value": { pattern: /=[\s\S]+/, inside: { value: { pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, lookbehind: !0, alias: [l, "language-" + l], inside: n.languages[l] }, punctuation: [{ pattern: /^=/, alias: "attr-equals" }, /"|'/] } } } });
|
|
330
|
+
} }), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(i) {
|
|
331
|
+
var l = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
332
|
+
i.languages.css = { comment: /\/\*[\s\S]*?\*\//, atrule: { pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + l.source + ")*?" + /(?:;|(?=\s*\{))/.source), inside: { rule: /^@[\w-]+/, "selector-function-argument": { pattern: /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/, lookbehind: !0, alias: "selector" }, keyword: { pattern: /(^|[^\w-])(?:and|not|only|or)(?![\w-])/, lookbehind: !0 } } }, url: { pattern: RegExp("\\burl\\((?:" + l.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"), greedy: !0, inside: { function: /^url/i, punctuation: /^\(|\)$/, string: { pattern: RegExp("^" + l.source + "$"), alias: "url" } } }, selector: { pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + l.source + ")*(?=\\s*\\{)"), lookbehind: !0 }, string: { pattern: l, greedy: !0 }, property: { pattern: /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i, lookbehind: !0 }, important: /!important\b/i, function: { pattern: /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i, lookbehind: !0 }, punctuation: /[(){};:,]/ }, i.languages.css.atrule.inside.rest = i.languages.css;
|
|
333
|
+
var h = i.languages.markup;
|
|
268
334
|
h && (h.tag.addInlined("style", "css"), h.tag.addAttribute("style", "css"));
|
|
269
335
|
}(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() {
|
|
270
336
|
if (n !== void 0 && typeof document < "u") {
|
|
271
337
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
272
|
-
var
|
|
273
|
-
n.hooks.add("before-highlightall", function(
|
|
274
|
-
|
|
275
|
-
}), n.hooks.add("before-sanity-check", function(
|
|
276
|
-
var
|
|
277
|
-
if (
|
|
278
|
-
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
var
|
|
282
|
-
if (
|
|
283
|
-
var
|
|
284
|
-
|
|
338
|
+
var i = { js: "javascript", py: "python", rb: "ruby", ps1: "powershell", psm1: "powershell", sh: "bash", bat: "batch", h: "c", tex: "latex" }, l = "data-src-status", h = "loading", f = "loaded", s = "pre[data-src]:not([" + l + '="' + f + '"]):not([' + l + '="' + h + '"])';
|
|
339
|
+
n.hooks.add("before-highlightall", function(k) {
|
|
340
|
+
k.selector += ", " + s;
|
|
341
|
+
}), n.hooks.add("before-sanity-check", function(k) {
|
|
342
|
+
var b = k.element;
|
|
343
|
+
if (b.matches(s)) {
|
|
344
|
+
k.code = "", b.setAttribute(l, h);
|
|
345
|
+
var A = b.appendChild(document.createElement("CODE"));
|
|
346
|
+
A.textContent = "Loading…";
|
|
347
|
+
var x = b.getAttribute("data-src"), v = k.language;
|
|
348
|
+
if (v === "none") {
|
|
349
|
+
var _ = (/\.(\w+)$/.exec(x) || [, "none"])[1];
|
|
350
|
+
v = i[_] || _;
|
|
285
351
|
}
|
|
286
|
-
n.util.setLanguage(
|
|
287
|
-
var
|
|
288
|
-
|
|
352
|
+
n.util.setLanguage(A, v), n.util.setLanguage(b, v);
|
|
353
|
+
var N = n.plugins.autoloader;
|
|
354
|
+
N && N.loadLanguages(v), function(L, t, e) {
|
|
289
355
|
var a = new XMLHttpRequest();
|
|
290
|
-
a.open("GET",
|
|
356
|
+
a.open("GET", L, !0), a.onreadystatechange = function() {
|
|
291
357
|
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"));
|
|
292
358
|
}, a.send(null);
|
|
293
|
-
}(
|
|
294
|
-
|
|
359
|
+
}(x, function(L) {
|
|
360
|
+
b.setAttribute(l, f);
|
|
295
361
|
var t = function(o) {
|
|
296
|
-
var
|
|
297
|
-
if (
|
|
298
|
-
var
|
|
299
|
-
return
|
|
362
|
+
var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(o || "");
|
|
363
|
+
if (d) {
|
|
364
|
+
var p = Number(d[1]), m = d[2], F = d[3];
|
|
365
|
+
return m ? F ? [p, Number(F)] : [p, void 0] : [p, p];
|
|
300
366
|
}
|
|
301
|
-
}(
|
|
367
|
+
}(b.getAttribute("data-range"));
|
|
302
368
|
if (t) {
|
|
303
|
-
var e =
|
|
304
|
-
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)),
|
|
305
|
-
`),
|
|
369
|
+
var e = L.split(/\r\n?|\n/g), a = t[0], r = t[1] == null ? e.length : t[1];
|
|
370
|
+
a < 0 && (a += e.length), a = Math.max(0, Math.min(a - 1, e.length)), r < 0 && (r += e.length), r = Math.max(0, Math.min(r, e.length)), L = e.slice(a, r).join(`
|
|
371
|
+
`), b.hasAttribute("data-start") || b.setAttribute("data-start", String(a + 1));
|
|
306
372
|
}
|
|
307
|
-
|
|
308
|
-
}, function(
|
|
309
|
-
|
|
373
|
+
A.textContent = L, n.highlightElement(A);
|
|
374
|
+
}, function(L) {
|
|
375
|
+
b.setAttribute(l, "failed"), A.textContent = L;
|
|
310
376
|
});
|
|
311
377
|
}
|
|
312
|
-
}), n.plugins.fileHighlight = { highlight: function(
|
|
313
|
-
for (var
|
|
378
|
+
}), n.plugins.fileHighlight = { highlight: function(k) {
|
|
379
|
+
for (var b, A = (k || document).querySelectorAll(s), x = 0; b = A[x++]; ) n.highlightElement(b);
|
|
314
380
|
} };
|
|
315
381
|
var S = !1;
|
|
316
382
|
n.fileHighlight = function() {
|
|
@@ -319,31 +385,31 @@ var ue = { exports: {} };
|
|
|
319
385
|
}
|
|
320
386
|
}();
|
|
321
387
|
})(ue);
|
|
322
|
-
const ae =
|
|
388
|
+
const ae = _e(ue.exports);
|
|
323
389
|
Prism.languages.clike = { comment: [{ pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, lookbehind: !0, greedy: !0 }, { pattern: /(^|[^\\:])\/\/.*/, lookbehind: !0, greedy: !0 }], string: { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: !0 }, "class-name": { pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: !0, inside: { punctuation: /[.\\]/ } }, keyword: /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, boolean: /\b(?:false|true)\b/, function: /\b\w+(?=\()/, number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.javascript = Prism.languages.extend("clike", { "class-name": [Prism.languages.clike["class-name"], { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: !0 }], keyword: [{ pattern: /((?:^|\})\s*)catch\b/, lookbehind: !0 }, { pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: !0 }], function: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, number: { pattern: RegExp(/(^|[^\w$])/.source + "(?:" + /NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ")" + /(?![\w$])/.source), lookbehind: !0 }, operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }), Prism.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, Prism.languages.insertBefore("javascript", "keyword", { regex: { pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), lookbehind: !0, greedy: !0, inside: { "regex-source": { pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, lookbehind: !0, alias: "language-regex", inside: Prism.languages.regex }, "regex-delimiter": /^\/|\/$/, "regex-flags": /^[a-z]+$/ } }, "function-variable": { pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, alias: "function" }, parameter: [{ pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/, lookbehind: !0, inside: Prism.languages.javascript }, { pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/, lookbehind: !0, inside: Prism.languages.javascript }], constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }), Prism.languages.insertBefore("javascript", "string", { hashbang: { pattern: /^#!.*/, greedy: !0, alias: "comment" }, "template-string": { pattern: /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/, greedy: !0, inside: { "template-punctuation": { pattern: /^`|`$/, alias: "string" }, interpolation: { pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/, lookbehind: !0, inside: { "interpolation-punctuation": { pattern: /^\$\{|\}$/, alias: "punctuation" }, rest: Prism.languages.javascript } }, string: /[\s\S]+/ } }, "string-property": { pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, lookbehind: !0, greedy: !0, alias: "property" } }), Prism.languages.insertBefore("javascript", "operator", { "literal-property": { pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, lookbehind: !0, alias: "property" } }), Prism.languages.markup && (Prism.languages.markup.tag.addInlined("script", "javascript"), Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript")), Prism.languages.js = Prism.languages.javascript, Prism.languages.python = { comment: { pattern: /(^|[^\\])#.*/, lookbehind: !0, greedy: !0 }, "string-interpolation": { pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: !0, inside: { interpolation: { pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/, lookbehind: !0, inside: { "format-spec": { pattern: /(:)[^:(){}]+(?=\}$)/, lookbehind: !0 }, "conversion-option": { pattern: //, alias: "punctuation" }, rest: null } }, string: /[\s\S]+/ } }, "triple-quoted-string": { pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: !0, alias: "string" }, string: { pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: !0 }, function: { pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g, lookbehind: !0 }, "class-name": { pattern: /(\bclass\s+)\w+/i, lookbehind: !0 }, decorator: { pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: !0, alias: ["annotation", "punctuation"], inside: { punctuation: /\./ } }, keyword: /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, builtin: /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, boolean: /\b(?:False|None|True)\b/, number: /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, punctuation: /[{}[\];(),.:]/ }, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python, Prism.languages.go = Prism.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/, lookbehind: !0, greedy: !0 }, keyword: /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, boolean: /\b(?:_|false|iota|nil|true)\b/, number: [/\b0(?:b[01_]+|o[0-7_]+)i?\b/i, /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i, /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i], operator: /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, builtin: /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }), Prism.languages.insertBefore("go", "string", { char: { pattern: /'(?:\\.|[^'\\\r\n]){0,10}'/, greedy: !0 } }), delete Prism.languages.go["class-name"], function(u) {
|
|
324
|
-
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/,
|
|
325
|
-
u.languages.java = u.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [
|
|
390
|
+
var n = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, i = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, l = { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), lookbehind: !0, inside: { namespace: { pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, inside: { punctuation: /\./ } }, punctuation: /\./ } };
|
|
391
|
+
u.languages.java = u.languages.extend("clike", { string: { pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/, lookbehind: !0, greedy: !0 }, "class-name": [l, { pattern: RegExp(/(^|[^\w.])/.source + i + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source), lookbehind: !0, inside: l.inside }, { pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + i + /[A-Z]\w*\b/.source), lookbehind: !0, inside: l.inside }], keyword: n, function: [u.languages.clike.function, { pattern: /(::\s*)[a-z_]\w*/, lookbehind: !0 }], number: /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, operator: { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: !0 }, constant: /\b[A-Z][A-Z_\d]+\b/ }), u.languages.insertBefore("java", "string", { "triple-quoted-string": { pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, greedy: !0, alias: "string" }, char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 } }), u.languages.insertBefore("java", "class-name", { annotation: { pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/, lookbehind: !0, alias: "punctuation" }, generics: { pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { "class-name": l, keyword: n, punctuation: /[<>(),.:]/, operator: /[?&|]/ } }, import: [{ pattern: RegExp(/(\bimport\s+)/.source + i + /(?:[A-Z]\w*|\*)(?=\s*;)/.source), lookbehind: !0, inside: { namespace: l.inside.namespace, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }, { pattern: RegExp(/(\bimport\s+static\s+)/.source + i + /(?:\w+|\*)(?=\s*;)/.source), lookbehind: !0, alias: "static", inside: { namespace: l.inside.namespace, static: /\b\w+$/, punctuation: /\./, operator: /\*/, "class-name": /\w+/ } }], namespace: { pattern: RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
326
392
|
return n.source;
|
|
327
393
|
})), lookbehind: !0, inside: { punctuation: /\./ } } });
|
|
328
394
|
}(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) {
|
|
329
|
-
for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,
|
|
395
|
+
for (var n = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, i = 0; i < 2; i++) n = n.replace(/<self>/g, function() {
|
|
330
396
|
return n;
|
|
331
397
|
});
|
|
332
398
|
n = n.replace(/<self>/g, function() {
|
|
333
399
|
return /[^\s\S]/.source;
|
|
334
400
|
}), 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;
|
|
335
401
|
}(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) {
|
|
336
|
-
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",
|
|
337
|
-
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:
|
|
338
|
-
for (var h = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"],
|
|
402
|
+
var n = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", i = { pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, lookbehind: !0, alias: "punctuation", inside: null }, l = { bash: i, environment: { pattern: RegExp("\\$" + n), alias: "constant" }, variable: [{ pattern: /\$?\(\([\s\S]+?\)\)/, greedy: !0, inside: { variable: [{ pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: !0 }, /^\$\(\(/], number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, operator: /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/, punctuation: /\(\(?|\)\)?|,|;/ } }, { pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, greedy: !0, inside: { variable: /^\$\(|^`|\)$|`$/ } }, { pattern: /\$\{[^}]+\}/, greedy: !0, inside: { operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, punctuation: /[\[\]]/, environment: { pattern: RegExp("(\\{)" + n), lookbehind: !0, alias: "constant" } } }, /\$(?:\w+|[#?*!@$])/], entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ };
|
|
403
|
+
u.languages.bash = { shebang: { pattern: /^#!\s*\/.*/, alias: "important" }, comment: { pattern: /(^|[^"{\\$])#.*/, lookbehind: !0 }, "function-name": [{ pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: !0, alias: "function" }, { pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: "function" }], "for-or-select": { pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, alias: "variable", lookbehind: !0 }, "assign-left": { pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/, inside: { environment: { pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + n), lookbehind: !0, alias: "constant" } }, alias: "variable", lookbehind: !0 }, parameter: { pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/, alias: "variable", lookbehind: !0 }, string: [{ pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: !0, greedy: !0, inside: { bash: i } }, { pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: !0, greedy: !0, inside: l }, { pattern: /(^|[^$\\])'[^']*'/, lookbehind: !0, greedy: !0 }, { pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, greedy: !0, inside: { entity: l.entity } }], environment: { pattern: RegExp("\\$?" + n), alias: "constant" }, variable: l.variable, function: { pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: !0 }, keyword: { pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: !0 }, builtin: { pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: !0, alias: "class-name" }, boolean: { pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: !0 }, "file-descriptor": { pattern: /\B&\d\b/, alias: "important" }, operator: { pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/, inside: { "file-descriptor": { pattern: /^\d/, alias: "important" } } }, punctuation: /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, number: { pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, lookbehind: !0 } }, i.inside = u.languages.bash;
|
|
404
|
+
for (var h = ["comment", "function-name", "for-or-select", "assign-left", "parameter", "string", "environment", "function", "keyword", "builtin", "boolean", "file-descriptor", "operator", "punctuation", "number"], f = l.variable[1].inside, s = 0; s < h.length; s++) f[h[s]] = u.languages.bash[h[s]];
|
|
339
405
|
u.languages.sh = u.languages.bash, u.languages.shell = u.languages.bash;
|
|
340
406
|
}(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;
|
|
341
|
-
const Re = ["innerHTML"],
|
|
342
|
-
const
|
|
343
|
-
for (const [
|
|
344
|
-
return
|
|
345
|
-
},
|
|
346
|
-
function
|
|
407
|
+
const Re = ["innerHTML"], Ne = ["value", "disabled"], ce = (u, n) => {
|
|
408
|
+
const i = u.__vccOpts || u;
|
|
409
|
+
for (const [l, h] of n) i[l] = h;
|
|
410
|
+
return i;
|
|
411
|
+
}, Le = ce(oe({ __name: "CodeEditor", props: { modelValue: {}, language: {}, theme: { default: "dark" }, disabled: { type: Boolean, default: !1 } }, emits: ["update:modelValue", "change"], setup(u, { emit: n }) {
|
|
412
|
+
function i(t) {
|
|
347
413
|
if (typeof document > "u") return;
|
|
348
414
|
const e = "hep-cr-prism-styles", a = document.getElementById(e), r = t === "dark" ? `
|
|
349
415
|
/* 默认代码颜色 */
|
|
@@ -513,160 +579,168 @@ const Re = ["innerHTML"], _e = ["value", "disabled"], ce = (u, n) => {
|
|
|
513
579
|
const o = document.createElement("style");
|
|
514
580
|
o.id = e, o.textContent = r, document.head.appendChild(o);
|
|
515
581
|
}
|
|
516
|
-
pe((t) => ({
|
|
517
|
-
const
|
|
582
|
+
pe((t) => ({ e3543a54: x.value })), typeof window < "u" && (window.Prism = ae);
|
|
583
|
+
const l = u, h = n, f = I(null), s = I(null);
|
|
518
584
|
let S = null;
|
|
519
|
-
function
|
|
585
|
+
function k(t) {
|
|
520
586
|
S && clearTimeout(S), S = setTimeout(() => {
|
|
521
587
|
h("change", t);
|
|
522
588
|
}, 500);
|
|
523
589
|
}
|
|
524
|
-
const
|
|
590
|
+
const b = { javascript: "javascript", js: "javascript", typescript: "typescript", ts: "typescript", python: "python", py: "python", java: "java", c: "c", cpp: "cpp", "c++": "cpp", csharp: "csharp", "c#": "csharp", go: "go", golang: "go", rust: "rust", ruby: "ruby", rb: "ruby", php: "php", swift: "swift", kotlin: "kotlin", kt: "kotlin", sql: "sql", bash: "bash", sh: "bash", shell: "bash", json: "json", yaml: "yaml", yml: "yaml", markdown: "markdown", md: "markdown" }, A = M(() => b[l.language.toLowerCase()] || "javascript"), x = M(() => l.theme === "dark" ? "#1e1e1e" : "#fafafa"), v = M(() => {
|
|
525
591
|
try {
|
|
526
|
-
const t = ae.languages[
|
|
527
|
-
if (t) return ae.highlight(
|
|
592
|
+
const t = ae.languages[A.value];
|
|
593
|
+
if (t) return ae.highlight(l.modelValue || "", t, A.value);
|
|
528
594
|
} catch {
|
|
529
595
|
}
|
|
530
596
|
return function(t) {
|
|
531
597
|
const e = document.createElement("div");
|
|
532
598
|
return e.textContent = t, e.innerHTML;
|
|
533
|
-
}(
|
|
599
|
+
}(l.modelValue || "");
|
|
534
600
|
});
|
|
535
|
-
function
|
|
601
|
+
function _(t) {
|
|
536
602
|
const e = t.target;
|
|
537
|
-
h("update:modelValue", e.value),
|
|
603
|
+
h("update:modelValue", e.value), k(e.value);
|
|
538
604
|
}
|
|
539
|
-
function
|
|
540
|
-
|
|
605
|
+
function N() {
|
|
606
|
+
f.value && s.value && (s.value.scrollTop = f.value.scrollTop, s.value.scrollLeft = f.value.scrollLeft);
|
|
541
607
|
}
|
|
542
|
-
function
|
|
608
|
+
function L(t) {
|
|
543
609
|
if (t.key === "Tab") {
|
|
544
610
|
t.preventDefault();
|
|
545
611
|
const e = t.target, a = e.selectionStart, r = e.selectionEnd, o = e.value;
|
|
546
|
-
e.value = o.substring(0, a) + " " + o.substring(r), e.selectionStart = e.selectionEnd = a + 2, h("update:modelValue", e.value),
|
|
612
|
+
e.value = o.substring(0, a) + " " + o.substring(r), e.selectionStart = e.selectionEnd = a + 2, h("update:modelValue", e.value), k(e.value);
|
|
547
613
|
}
|
|
548
614
|
}
|
|
549
615
|
return ge(() => {
|
|
550
|
-
l
|
|
551
|
-
}),
|
|
552
|
-
|
|
616
|
+
i(l.theme);
|
|
617
|
+
}), U(() => l.theme, (t) => {
|
|
618
|
+
i(t);
|
|
553
619
|
}), he(() => {
|
|
554
620
|
S && clearTimeout(S);
|
|
555
|
-
}), (t, e) => (
|
|
556
|
-
} }), [["__scopeId", "data-v-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
c !==
|
|
560
|
-
}),
|
|
561
|
-
|
|
621
|
+
}), (t, e) => (w(), T("div", { class: H(["hep-cr-editor", `hep-cr-theme-${u.theme}`]) }, [E("pre", { ref_key: "highlightRef", ref: s, class: H(["hep-cr-highlight", [`language-${A.value}`, `hep-cr-prism-${u.theme}`]]), "aria-hidden": "true" }, [E("code", { innerHTML: v.value }, null, 8, Re)], 2), E("textarea", { ref_key: "codeRef", ref: f, class: "hep-cr-input", value: u.modelValue, disabled: u.disabled, onInput: _, onScroll: N, onKeydown: L, spellcheck: "false", placeholder: "请输入代码..." }, null, 40, Ne)], 2));
|
|
622
|
+
} }), [["__scopeId", "data-v-f7f3a9f5"]]), Oe = { class: "hep-cr-header" }, Ce = { class: "hep-cr-controls" }, Pe = ["disabled"], De = { key: 0, value: "" }, $e = ["value"], Me = { class: "hep-cr-actions" }, Ue = ["disabled"], Be = { key: 0, class: "hep-cr-spinner" }, He = { key: 1, class: "hep-cr-run-icon" }, je = ["title"], Ge = { key: 0, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, ze = { key: 1, width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, We = { key: 0, class: "hep-cr-error" }, Ve = { class: "hep-cr-main" }, Ye = { class: "hep-cr-panel-header" }, Xe = { class: "hep-cr-output-actions" }, Ze = { class: "hep-cr-language-badge" }, Ke = ["disabled", "title"], qe = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, Je = { key: 1, class: "hep-cr-copied-text" }, Qe = { class: "hep-cr-panel-header" }, et = { class: "hep-cr-output-tabs" }, tt = { class: "hep-cr-output-actions" }, nt = { key: 0, class: "hep-cr-execution-time" }, at = ["disabled", "title"], rt = { key: 0, width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, ot = { key: 1, class: "hep-cr-copied-text" }, st = { class: "hep-cr-output-content" }, it = { key: 0 }, lt = { key: 1, class: "hep-cr-stderr" }, q = ce(oe({ __name: "CodeRunner", props: { pistonUrl: { default: "/api/piston" }, 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 }) {
|
|
623
|
+
const i = u, l = n, h = I(!1), f = I(i.modelValue || i.code);
|
|
624
|
+
U(() => i.modelValue, (c) => {
|
|
625
|
+
c !== void 0 && c !== f.value && (f.value = c);
|
|
626
|
+
}), U(() => i.code, (c) => {
|
|
627
|
+
c !== void 0 && c !== f.value && (f.value = c);
|
|
628
|
+
}), U(f, (c) => {
|
|
629
|
+
l("update:modelValue", c), l("update:code", c);
|
|
562
630
|
});
|
|
563
|
-
const
|
|
564
|
-
|
|
565
|
-
c && c !==
|
|
566
|
-
}),
|
|
567
|
-
|
|
631
|
+
const s = I(i.language || "javascript");
|
|
632
|
+
U(() => i.language, (c) => {
|
|
633
|
+
c && c !== s.value && (s.value = c);
|
|
634
|
+
}), U(s, (c) => {
|
|
635
|
+
h.value || (f.value = function(g) {
|
|
636
|
+
const y = g.toLowerCase();
|
|
637
|
+
return Ie[y] || `// ${g}
|
|
638
|
+
// Write your code here`;
|
|
639
|
+
}(c)), h.value = !1, l("update:language", c);
|
|
568
640
|
});
|
|
569
|
-
const
|
|
570
|
-
if (!
|
|
571
|
-
const c =
|
|
572
|
-
const
|
|
573
|
-
return (0.299 * (
|
|
641
|
+
const S = M(() => {
|
|
642
|
+
if (!i.themeColor) return {};
|
|
643
|
+
const c = i.theme === "dark", g = i.themeColor, y = function(C) {
|
|
644
|
+
const D = parseInt(C.replace("#", ""), 16);
|
|
645
|
+
return (0.299 * (D >> 16 & 255) + 0.587 * (D >> 8 & 255) + 0.114 * (255 & D)) / 255 > 0.5;
|
|
574
646
|
}(g) ? "#000" : "#fff";
|
|
575
|
-
return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover":
|
|
647
|
+
return { "--hep-cr-theme-color": g, "--hep-cr-theme-color-hover": k(g, c ? 20 : -20), "--hep-cr-tab-active-color": y };
|
|
576
648
|
});
|
|
577
|
-
function
|
|
578
|
-
const
|
|
579
|
-
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (
|
|
649
|
+
function k(c, g) {
|
|
650
|
+
const y = parseInt(c.replace("#", ""), 16), C = Math.round(2.55 * g);
|
|
651
|
+
return "#" + (16777216 + 65536 * Math.min(255, Math.max(0, (y >> 16) + C)) + 256 * Math.min(255, Math.max(0, (y >> 8 & 255) + C)) + Math.min(255, Math.max(0, (255 & y) + C))).toString(16).slice(1);
|
|
580
652
|
}
|
|
581
|
-
const
|
|
582
|
-
const c =
|
|
653
|
+
const b = M(() => new Fe({ pistonUrl: i.pistonUrl })), A = I([]), x = I(i.theme), v = I(""), _ = I(""), N = I(!1), L = I(null), t = I("stdout"), e = I(null), a = I(!1), r = I(60), o = I(!1), d = I(!1), p = M(() => A.value.map((c) => ({ value: `${c.language}:${c.version}`, label: `${c.language.charAt(0).toUpperCase() + c.language.slice(1)} ${c.version}` }))), m = M(() => {
|
|
654
|
+
const c = s.value;
|
|
583
655
|
return c.includes(":") ? c.split(":")[0] : c;
|
|
584
656
|
});
|
|
585
|
-
function
|
|
586
|
-
|
|
657
|
+
function F() {
|
|
658
|
+
x.value = x.value === "light" ? "dark" : "light";
|
|
587
659
|
}
|
|
588
660
|
async function R() {
|
|
589
|
-
if (!
|
|
590
|
-
|
|
661
|
+
if (!N.value) {
|
|
662
|
+
N.value = !0, v.value = "", _.value = "", L.value = null, e.value = null, t.value = "stdout", l("execute-start");
|
|
591
663
|
try {
|
|
592
|
-
const c = await
|
|
593
|
-
|
|
664
|
+
const c = await b.value.execute(m.value, f.value);
|
|
665
|
+
v.value = c.output, _.value = c.stderr, L.value = c.executionTime || null, t.value = c.stderr ? "stderr" : "stdout", l("execute-end", c);
|
|
594
666
|
} catch (c) {
|
|
595
|
-
|
|
667
|
+
e.value = c instanceof Error ? c.message : "Execution failed", l("execute-end", { success: !1, output: "", stderr: e.value, code: -1 });
|
|
596
668
|
} finally {
|
|
597
|
-
|
|
669
|
+
N.value = !1;
|
|
598
670
|
}
|
|
599
671
|
}
|
|
600
672
|
}
|
|
601
|
-
async function
|
|
602
|
-
await navigator.clipboard.writeText(
|
|
603
|
-
|
|
673
|
+
async function j() {
|
|
674
|
+
await navigator.clipboard.writeText(f.value), o.value = !0, setTimeout(() => {
|
|
675
|
+
o.value = !1;
|
|
604
676
|
}, 2e3);
|
|
605
677
|
}
|
|
606
|
-
async function
|
|
607
|
-
const c =
|
|
608
|
-
await navigator.clipboard.writeText(c),
|
|
609
|
-
|
|
678
|
+
async function V() {
|
|
679
|
+
const c = t.value === "stdout" ? v.value : _.value;
|
|
680
|
+
await navigator.clipboard.writeText(c), d.value = !0, setTimeout(() => {
|
|
681
|
+
d.value = !1;
|
|
610
682
|
}, 2e3);
|
|
611
683
|
}
|
|
612
684
|
(async function() {
|
|
613
|
-
|
|
685
|
+
a.value = !0, e.value = null;
|
|
614
686
|
try {
|
|
615
|
-
|
|
616
|
-
const c =
|
|
617
|
-
g && !
|
|
687
|
+
A.value = await b.value.getRuntimes();
|
|
688
|
+
const c = m.value, g = A.value.find((y) => y.language === c);
|
|
689
|
+
g && !s.value.includes(":") && (s.value = `${c}:${g.version}`);
|
|
618
690
|
} catch (c) {
|
|
619
|
-
|
|
691
|
+
e.value = c instanceof Error ? c.message : "Failed to load runtimes";
|
|
620
692
|
} finally {
|
|
621
|
-
|
|
693
|
+
a.value = !1;
|
|
622
694
|
}
|
|
623
695
|
})();
|
|
624
|
-
let
|
|
625
|
-
function
|
|
626
|
-
|
|
696
|
+
let G = !1;
|
|
697
|
+
function J(c) {
|
|
698
|
+
G = !0, document.addEventListener("mousemove", Y), document.addEventListener("mouseup", z), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
627
699
|
}
|
|
628
|
-
function
|
|
629
|
-
if (!
|
|
700
|
+
function Y(c) {
|
|
701
|
+
if (!G) return;
|
|
630
702
|
const g = document.querySelector(".hep-cr-main");
|
|
631
703
|
if (!g) return;
|
|
632
|
-
const
|
|
633
|
-
|
|
704
|
+
const y = g.getBoundingClientRect(), C = (c.clientX - y.left) / y.width * 100;
|
|
705
|
+
r.value = Math.max(20, Math.min(80, C));
|
|
634
706
|
}
|
|
635
|
-
function
|
|
636
|
-
|
|
707
|
+
function z() {
|
|
708
|
+
G = !1, document.removeEventListener("mousemove", Y), document.removeEventListener("mouseup", z), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
637
709
|
}
|
|
638
|
-
const
|
|
639
|
-
return (c, g) => (
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
710
|
+
const O = M(() => `hep-cr-runner-${x.value}`);
|
|
711
|
+
return (c, g) => (w(), T("div", { class: H(["hep-cr-runner", O.value]), style: K(S.value) }, [E("div", Oe, [E("div", Ce, [u.showLanguageSelector ? me((w(), T("select", { key: 0, "onUpdate:modelValue": g[0] || (g[0] = (y) => s.value = y), class: "hep-cr-language-select", disabled: N.value }, [a.value ? (w(), T("option", De, "加载中...")) : P("", !0), (w(!0), T(fe, null, be(p.value, (y) => (w(), T("option", { key: y.value, value: y.value }, $(y.label), 9, $e))), 128))], 8, Pe)), [[Ee, s.value]]) : P("", !0)]), E("div", Me, [E("button", { class: "hep-cr-btn hep-cr-btn-run", disabled: N.value || a.value, onClick: R }, [N.value ? (w(), T("span", Be)) : (w(), T("span", He, "▶")), ve(" " + $(N.value ? "运行中..." : u.executorLabel), 1)], 8, Ue), E("button", { class: "hep-cr-btn hep-cr-btn-theme", onClick: F, title: x.value === "light" ? "Switch to dark mode" : "Switch to light mode" }, [x.value === "light" ? (w(), T("svg", Ge, [...g[5] || (g[5] = [E("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }, null, -1)])])) : (w(), T("svg", ze, [...g[6] || (g[6] = [ye('<circle cx="12" cy="12" r="5" data-v-28f350be></circle><line x1="12" y1="1" x2="12" y2="3" data-v-28f350be></line><line x1="12" y1="21" x2="12" y2="23" data-v-28f350be></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64" data-v-28f350be></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78" data-v-28f350be></line><line x1="1" y1="12" x2="3" y2="12" data-v-28f350be></line><line x1="21" y1="12" x2="23" y2="12" data-v-28f350be></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36" data-v-28f350be></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22" data-v-28f350be></line>', 9)])]))], 8, je)])]), e.value ? (w(), T("div", We, $(e.value), 1)) : P("", !0), E("div", Ve, [u.showEditor ? (w(), T("div", { key: 0, class: "hep-cr-editor-panel", style: K({ width: r.value + "%" }) }, [E("div", Ye, [g[8] || (g[8] = E("span", { class: "hep-cr-panel-title" }, "编辑器", -1)), E("div", Xe, [E("span", Ze, $(m.value), 1), E("button", { class: H(["hep-cr-btn-icon", { "hep-cr-btn-copied": o.value }]), disabled: o.value, onClick: j, title: o.value ? "已复制" : "复制" }, [o.value ? (w(), T("span", Je, "已复制")) : (w(), T("svg", qe, [...g[7] || (g[7] = [E("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, Ke)])]), re(Le, { modelValue: f.value, "onUpdate:modelValue": g[1] || (g[1] = (y) => f.value = y), language: m.value, theme: x.value, disabled: !u.editable || N.value, onChange: g[2] || (g[2] = (y) => {
|
|
712
|
+
h.value = !0, l("update:modelValue", y);
|
|
713
|
+
}) }, null, 8, ["modelValue", "language", "theme", "disabled"])], 4)) : P("", !0), u.showEditor ? (w(), T("div", { key: 1, class: "hep-cr-resize-handle", onMousedown: J }, [...g[9] || (g[9] = [E("div", { class: "hep-cr-resize-line" }, null, -1)])], 32)) : P("", !0), E("div", { class: "hep-cr-output-panel", style: K({ width: u.showEditor ? 100 - r.value + "%" : "100%" }) }, [E("div", Qe, [E("div", et, [E("button", { class: H(["hep-cr-tab", { active: t.value === "stdout" }]), onClick: g[3] || (g[3] = (y) => t.value = "stdout") }, " 输出 ", 2), _.value ? (w(), T("button", { key: 0, class: H(["hep-cr-tab", "hep-cr-tab-error", { active: t.value === "stderr" }]), onClick: g[4] || (g[4] = (y) => t.value = "stderr") }, " 错误 ", 2)) : P("", !0)]), E("div", tt, [L.value !== null ? (w(), T("span", nt, $(L.value) + "ms ", 1)) : P("", !0), E("button", { class: H(["hep-cr-btn-icon", { "hep-cr-btn-copied": d.value }]), disabled: d.value, onClick: V, title: d.value ? "已复制" : "复制" }, [d.value ? (w(), T("span", ot, "已复制")) : (w(), T("svg", rt, [...g[10] || (g[10] = [E("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }, null, -1), E("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)])]))], 10, at)])]), E("div", st, [t.value === "stdout" ? (w(), T("pre", it, $(N.value ? "代码执行中..." : v.value || '点击"运行"执行代码'), 1)) : (w(), T("pre", lt, $(_.value), 1))])], 4)])], 6));
|
|
714
|
+
} }), [["__scopeId", "data-v-28f350be"]]), ut = { class: "hep-cr-dialog-header" }, ct = { class: "hep-cr-dialog-title" }, dt = { class: "hep-cr-dialog-body" }, pt = { key: 0, class: "hep-cr-dialog-footer" }, ht = oe({ __name: "CodeRunnerDialog", props: { title: { default: "代码执行器" }, width: { default: 800 }, pistonUrl: { default: "/api/piston" }, language: { default: "javascript" }, code: { default: "" }, theme: { default: "light" }, themeColor: { default: "" }, showLanguageSelector: { type: Boolean, default: !0 }, showEditor: { type: Boolean, default: !0 }, editable: { type: Boolean, default: !0 }, executorLabel: { default: "运行" } }, emits: ["update:modelValue", "update:language", "update:code", "close"], setup(u, { expose: n, emit: i }) {
|
|
715
|
+
const l = u, h = i, f = I(!1), s = I(l.language || "javascript"), S = I(l.code || "");
|
|
716
|
+
function k() {
|
|
717
|
+
f.value = !1, h("update:modelValue", !1), h("close");
|
|
644
718
|
}
|
|
645
|
-
function
|
|
646
|
-
|
|
719
|
+
function b(v) {
|
|
720
|
+
v.target === v.currentTarget && k();
|
|
647
721
|
}
|
|
648
|
-
function
|
|
649
|
-
s.value =
|
|
722
|
+
function A(v) {
|
|
723
|
+
s.value = v, h("update:language", v);
|
|
650
724
|
}
|
|
651
|
-
function
|
|
652
|
-
S.value =
|
|
725
|
+
function x(v) {
|
|
726
|
+
S.value = v, h("update:code", v);
|
|
653
727
|
}
|
|
654
|
-
return
|
|
655
|
-
|
|
656
|
-
}),
|
|
657
|
-
|
|
728
|
+
return U(() => l.language, (v) => {
|
|
729
|
+
v && (s.value = v);
|
|
730
|
+
}), U(() => l.code, (v) => {
|
|
731
|
+
v !== void 0 && (S.value = v);
|
|
658
732
|
}), n({ open: function() {
|
|
659
|
-
|
|
660
|
-
}, close:
|
|
733
|
+
f.value = !0, h("update:modelValue", !0);
|
|
734
|
+
}, close: k }), (v, _) => (w(), ke(Se, { to: "body" }, [re(we, { name: "hep-cr-dialog-fade" }, { default: Ae(() => [f.value ? (w(), T("div", { key: 0, class: "hep-cr-dialog-overlay", onClick: b }, [E("div", { class: "hep-cr-dialog-container", style: K({ width: typeof u.width == "number" ? u.width + "px" : u.width }) }, [E("div", ut, [E("h3", ct, $(u.title), 1), E("button", { class: "hep-cr-dialog-close", onClick: k }, [..._[0] || (_[0] = [E("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, [E("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), E("line", { x1: "6", y1: "6", x2: "18", y2: "18" })], -1)])])]), E("div", dt, [re(q, { language: s.value, code: S.value, pistonUrl: u.pistonUrl, theme: u.theme, themeColor: u.themeColor, showLanguageSelector: u.showLanguageSelector, showEditor: u.showEditor, editable: u.editable, executorLabel: u.executorLabel, "onUpdate:language": A, "onUpdate:code": x }, null, 8, ["language", "code", "pistonUrl", "theme", "themeColor", "showLanguageSelector", "showEditor", "editable", "executorLabel"])]), v.$slots.footer ? (w(), T("div", pt, [Te(v.$slots, "footer", { close: k })])) : P("", !0)], 4)])) : P("", !0)]), _: 3 })]));
|
|
661
735
|
} });
|
|
662
|
-
|
|
663
|
-
u.component("CodeRunner",
|
|
736
|
+
q.install = (u) => {
|
|
737
|
+
u.component("CodeRunner", q);
|
|
664
738
|
};
|
|
665
|
-
const
|
|
666
|
-
u.component("CodeRunner",
|
|
739
|
+
const mt = { install(u) {
|
|
740
|
+
u.component("CodeRunner", q);
|
|
667
741
|
} };
|
|
668
742
|
export {
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
743
|
+
q as CodeRunner,
|
|
744
|
+
ht as CodeRunnerDialog,
|
|
745
|
+
mt as default
|
|
672
746
|
};
|