@mxmweb/rtext 1.6.12 → 1.6.13
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/adopters/ChatMessageAdapter.d.ts +4 -0
- package/adopters/Markdownit.d.ts +2 -0
- package/adopters/PromptTempDesigner.d.ts +2 -0
- package/adopters/RetriveChatMessage.d.ts +4 -0
- package/assets/style.css +1 -1
- package/core/UnifiedRichText.d.ts +2 -0
- package/core/richElements/CodeBlock.d.ts +19 -0
- package/index.js +14 -30233
- package/lib_enter-Dc5XyCCf.js +31770 -0
- package/mockserverdata.d.ts +67 -29
- package/package.json +1 -1
- package/prism-bash-zSjFhtUz.js +219 -0
- package/prism-c-CXS5tkeN.js +76 -0
- package/prism-cpp-CvP_gscY.js +113 -0
- package/prism-css-3Jya3wSQ.js +55 -0
- package/prism-diff-Apx1lkH_.js +42 -0
- package/prism-go-CHuRSSd-.js +26 -0
- package/prism-java-DUOgyYJG.js +142 -0
- package/prism-javascript-CLux6jF8.js +137 -0
- package/prism-json-iVb7He6L.js +25 -0
- package/prism-jsx-yfun9EDN.js +51 -0
- package/prism-kotlin-QHMLy1lI.js +75 -0
- package/prism-markdown-tjNeCMi3.js +300 -0
- package/prism-markup-BNGj0Tvm.js +173 -0
- package/prism-php-BQcudfaM.js +347 -0
- package/prism-python-DERGD9Re.js +89 -0
- package/prism-ruby-DfaHE8ro.js +195 -0
- package/prism-rust-ChXOQips.js +144 -0
- package/prism-sql-8Y2-THrf.js +33 -0
- package/prism-swift-CeDyTyXT.js +113 -0
- package/prism-tsx-D_jjxt3I.js +6 -0
- package/prism-typescript-FZlwMqq2.js +73 -0
- package/prism-yaml-DwdKlmeG.js +66 -0
- package/stats.html +1 -1
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { g as c } from "./lib_enter-Dc5XyCCf.js";
|
|
2
|
+
function f(e, r) {
|
|
3
|
+
for (var n = 0; n < r.length; n++) {
|
|
4
|
+
const t = r[n];
|
|
5
|
+
if (typeof t != "string" && !Array.isArray(t)) {
|
|
6
|
+
for (const a in t)
|
|
7
|
+
if (a !== "default" && !(a in e)) {
|
|
8
|
+
const i = Object.getOwnPropertyDescriptor(t, a);
|
|
9
|
+
i && Object.defineProperty(e, a, i.get ? i : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => t[a]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var u = {}, d;
|
|
19
|
+
function g() {
|
|
20
|
+
return d || (d = 1, (function(e) {
|
|
21
|
+
var r = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, n = [
|
|
22
|
+
{
|
|
23
|
+
pattern: /\b(?:false|true)\b/i,
|
|
24
|
+
alias: "boolean"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,
|
|
28
|
+
greedy: !0,
|
|
29
|
+
lookbehind: !0
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,
|
|
33
|
+
greedy: !0,
|
|
34
|
+
lookbehind: !0
|
|
35
|
+
},
|
|
36
|
+
/\b(?:null)\b/i,
|
|
37
|
+
/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/
|
|
38
|
+
], t = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i, a = /<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, i = /[{}\[\](),:;]/;
|
|
39
|
+
e.languages.php = {
|
|
40
|
+
delimiter: {
|
|
41
|
+
pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i,
|
|
42
|
+
alias: "important"
|
|
43
|
+
},
|
|
44
|
+
comment: r,
|
|
45
|
+
variable: /\$+(?:\w+\b|(?=\{))/,
|
|
46
|
+
package: {
|
|
47
|
+
pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
|
|
48
|
+
lookbehind: !0,
|
|
49
|
+
inside: {
|
|
50
|
+
punctuation: /\\/
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"class-name-definition": {
|
|
54
|
+
pattern: /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,
|
|
55
|
+
lookbehind: !0,
|
|
56
|
+
alias: "class-name"
|
|
57
|
+
},
|
|
58
|
+
"function-definition": {
|
|
59
|
+
pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,
|
|
60
|
+
lookbehind: !0,
|
|
61
|
+
alias: "function"
|
|
62
|
+
},
|
|
63
|
+
keyword: [
|
|
64
|
+
{
|
|
65
|
+
pattern: /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,
|
|
66
|
+
alias: "type-casting",
|
|
67
|
+
greedy: !0,
|
|
68
|
+
lookbehind: !0
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
pattern: /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,
|
|
72
|
+
alias: "type-hint",
|
|
73
|
+
greedy: !0,
|
|
74
|
+
lookbehind: !0
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,
|
|
78
|
+
alias: "return-type",
|
|
79
|
+
greedy: !0,
|
|
80
|
+
lookbehind: !0
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
pattern: /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,
|
|
84
|
+
alias: "type-declaration",
|
|
85
|
+
greedy: !0
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,
|
|
89
|
+
alias: "type-declaration",
|
|
90
|
+
greedy: !0,
|
|
91
|
+
lookbehind: !0
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
pattern: /\b(?:parent|self|static)(?=\s*::)/i,
|
|
95
|
+
alias: "static-context",
|
|
96
|
+
greedy: !0
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
// yield from
|
|
100
|
+
pattern: /(\byield\s+)from\b/i,
|
|
101
|
+
lookbehind: !0
|
|
102
|
+
},
|
|
103
|
+
// `class` is always a keyword unlike other keywords
|
|
104
|
+
/\bclass\b/i,
|
|
105
|
+
{
|
|
106
|
+
// https://www.php.net/manual/en/reserved.keywords.php
|
|
107
|
+
//
|
|
108
|
+
// keywords cannot be preceded by "->"
|
|
109
|
+
// the complex lookbehind means `(?<!(?:->|::)\s*)`
|
|
110
|
+
pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,
|
|
111
|
+
lookbehind: !0
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"argument-name": {
|
|
115
|
+
pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,
|
|
116
|
+
lookbehind: !0
|
|
117
|
+
},
|
|
118
|
+
"class-name": [
|
|
119
|
+
{
|
|
120
|
+
pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,
|
|
121
|
+
greedy: !0,
|
|
122
|
+
lookbehind: !0
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i,
|
|
126
|
+
greedy: !0,
|
|
127
|
+
lookbehind: !0
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,
|
|
131
|
+
greedy: !0
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,
|
|
135
|
+
alias: "class-name-fully-qualified",
|
|
136
|
+
greedy: !0,
|
|
137
|
+
lookbehind: !0,
|
|
138
|
+
inside: {
|
|
139
|
+
punctuation: /\\/
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,
|
|
144
|
+
alias: "class-name-fully-qualified",
|
|
145
|
+
greedy: !0,
|
|
146
|
+
inside: {
|
|
147
|
+
punctuation: /\\/
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
|
|
152
|
+
alias: "class-name-fully-qualified",
|
|
153
|
+
greedy: !0,
|
|
154
|
+
lookbehind: !0,
|
|
155
|
+
inside: {
|
|
156
|
+
punctuation: /\\/
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
pattern: /\b[a-z_]\w*(?=\s*\$)/i,
|
|
161
|
+
alias: "type-declaration",
|
|
162
|
+
greedy: !0
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
|
|
166
|
+
alias: ["class-name-fully-qualified", "type-declaration"],
|
|
167
|
+
greedy: !0,
|
|
168
|
+
inside: {
|
|
169
|
+
punctuation: /\\/
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
pattern: /\b[a-z_]\w*(?=\s*::)/i,
|
|
174
|
+
alias: "static-context",
|
|
175
|
+
greedy: !0
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,
|
|
179
|
+
alias: ["class-name-fully-qualified", "static-context"],
|
|
180
|
+
greedy: !0,
|
|
181
|
+
inside: {
|
|
182
|
+
punctuation: /\\/
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,
|
|
187
|
+
alias: "type-hint",
|
|
188
|
+
greedy: !0,
|
|
189
|
+
lookbehind: !0
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,
|
|
193
|
+
alias: ["class-name-fully-qualified", "type-hint"],
|
|
194
|
+
greedy: !0,
|
|
195
|
+
lookbehind: !0,
|
|
196
|
+
inside: {
|
|
197
|
+
punctuation: /\\/
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
pattern: /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,
|
|
202
|
+
alias: "return-type",
|
|
203
|
+
greedy: !0,
|
|
204
|
+
lookbehind: !0
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
pattern: /(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,
|
|
208
|
+
alias: ["class-name-fully-qualified", "return-type"],
|
|
209
|
+
greedy: !0,
|
|
210
|
+
lookbehind: !0,
|
|
211
|
+
inside: {
|
|
212
|
+
punctuation: /\\/
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
constant: n,
|
|
217
|
+
function: {
|
|
218
|
+
pattern: /(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,
|
|
219
|
+
lookbehind: !0,
|
|
220
|
+
inside: {
|
|
221
|
+
punctuation: /\\/
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
property: {
|
|
225
|
+
pattern: /(->\s*)\w+/,
|
|
226
|
+
lookbehind: !0
|
|
227
|
+
},
|
|
228
|
+
number: t,
|
|
229
|
+
operator: a,
|
|
230
|
+
punctuation: i
|
|
231
|
+
};
|
|
232
|
+
var l = {
|
|
233
|
+
pattern: /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,
|
|
234
|
+
lookbehind: !0,
|
|
235
|
+
inside: e.languages.php
|
|
236
|
+
}, o = [
|
|
237
|
+
{
|
|
238
|
+
pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,
|
|
239
|
+
alias: "nowdoc-string",
|
|
240
|
+
greedy: !0,
|
|
241
|
+
inside: {
|
|
242
|
+
delimiter: {
|
|
243
|
+
pattern: /^<<<'[^']+'|[a-z_]\w*;$/i,
|
|
244
|
+
alias: "symbol",
|
|
245
|
+
inside: {
|
|
246
|
+
punctuation: /^<<<'?|[';]$/
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,
|
|
253
|
+
alias: "heredoc-string",
|
|
254
|
+
greedy: !0,
|
|
255
|
+
inside: {
|
|
256
|
+
delimiter: {
|
|
257
|
+
pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,
|
|
258
|
+
alias: "symbol",
|
|
259
|
+
inside: {
|
|
260
|
+
punctuation: /^<<<"?|[";]$/
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
interpolation: l
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
pattern: /`(?:\\[\s\S]|[^\\`])*`/,
|
|
268
|
+
alias: "backtick-quoted-string",
|
|
269
|
+
greedy: !0
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
pattern: /'(?:\\[\s\S]|[^\\'])*'/,
|
|
273
|
+
alias: "single-quoted-string",
|
|
274
|
+
greedy: !0
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
pattern: /"(?:\\[\s\S]|[^\\"])*"/,
|
|
278
|
+
alias: "double-quoted-string",
|
|
279
|
+
greedy: !0,
|
|
280
|
+
inside: {
|
|
281
|
+
interpolation: l
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
];
|
|
285
|
+
e.languages.insertBefore("php", "variable", {
|
|
286
|
+
string: o,
|
|
287
|
+
attribute: {
|
|
288
|
+
pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,
|
|
289
|
+
greedy: !0,
|
|
290
|
+
inside: {
|
|
291
|
+
"attribute-content": {
|
|
292
|
+
pattern: /^(#\[)[\s\S]+(?=\]$)/,
|
|
293
|
+
lookbehind: !0,
|
|
294
|
+
// inside can appear subset of php
|
|
295
|
+
inside: {
|
|
296
|
+
comment: r,
|
|
297
|
+
string: o,
|
|
298
|
+
"attribute-class-name": [
|
|
299
|
+
{
|
|
300
|
+
pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i,
|
|
301
|
+
alias: "class-name",
|
|
302
|
+
greedy: !0,
|
|
303
|
+
lookbehind: !0
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i,
|
|
307
|
+
alias: [
|
|
308
|
+
"class-name",
|
|
309
|
+
"class-name-fully-qualified"
|
|
310
|
+
],
|
|
311
|
+
greedy: !0,
|
|
312
|
+
lookbehind: !0,
|
|
313
|
+
inside: {
|
|
314
|
+
punctuation: /\\/
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
constant: n,
|
|
319
|
+
number: t,
|
|
320
|
+
operator: a,
|
|
321
|
+
punctuation: i
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
delimiter: {
|
|
325
|
+
pattern: /^#\[|\]$/,
|
|
326
|
+
alias: "punctuation"
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}), e.hooks.add("before-tokenize", function(s) {
|
|
331
|
+
if (/<\?/.test(s.code)) {
|
|
332
|
+
var p = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;
|
|
333
|
+
e.languages["markup-templating"].buildPlaceholders(s, "php", p);
|
|
334
|
+
}
|
|
335
|
+
}), e.hooks.add("after-tokenize", function(s) {
|
|
336
|
+
e.languages["markup-templating"].tokenizePlaceholders(s, "php");
|
|
337
|
+
});
|
|
338
|
+
})(Prism)), u;
|
|
339
|
+
}
|
|
340
|
+
var b = g();
|
|
341
|
+
const y = /* @__PURE__ */ c(b), m = /* @__PURE__ */ f({
|
|
342
|
+
__proto__: null,
|
|
343
|
+
default: y
|
|
344
|
+
}, [b]);
|
|
345
|
+
export {
|
|
346
|
+
m as p
|
|
347
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { g as p } from "./lib_enter-Dc5XyCCf.js";
|
|
2
|
+
function u(r, a) {
|
|
3
|
+
for (var n = 0; n < a.length; n++) {
|
|
4
|
+
const e = a[n];
|
|
5
|
+
if (typeof e != "string" && !Array.isArray(e)) {
|
|
6
|
+
for (const t in e)
|
|
7
|
+
if (t !== "default" && !(t in r)) {
|
|
8
|
+
const i = Object.getOwnPropertyDescriptor(e, t);
|
|
9
|
+
i && Object.defineProperty(r, t, i.get ? i : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => e[t]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(r, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var o = {}, s;
|
|
19
|
+
function d() {
|
|
20
|
+
return s || (s = 1, Prism.languages.python = {
|
|
21
|
+
comment: {
|
|
22
|
+
pattern: /(^|[^\\])#.*/,
|
|
23
|
+
lookbehind: !0,
|
|
24
|
+
greedy: !0
|
|
25
|
+
},
|
|
26
|
+
"string-interpolation": {
|
|
27
|
+
pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,
|
|
28
|
+
greedy: !0,
|
|
29
|
+
inside: {
|
|
30
|
+
interpolation: {
|
|
31
|
+
// "{" <expression> <optional "!s", "!r", or "!a"> <optional ":" format specifier> "}"
|
|
32
|
+
pattern: /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,
|
|
33
|
+
lookbehind: !0,
|
|
34
|
+
inside: {
|
|
35
|
+
"format-spec": {
|
|
36
|
+
pattern: /(:)[^:(){}]+(?=\}$)/,
|
|
37
|
+
lookbehind: !0
|
|
38
|
+
},
|
|
39
|
+
"conversion-option": {
|
|
40
|
+
pattern: //,
|
|
41
|
+
alias: "punctuation"
|
|
42
|
+
},
|
|
43
|
+
rest: null
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
string: /[\s\S]+/
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"triple-quoted-string": {
|
|
50
|
+
pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,
|
|
51
|
+
greedy: !0,
|
|
52
|
+
alias: "string"
|
|
53
|
+
},
|
|
54
|
+
string: {
|
|
55
|
+
pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,
|
|
56
|
+
greedy: !0
|
|
57
|
+
},
|
|
58
|
+
function: {
|
|
59
|
+
pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,
|
|
60
|
+
lookbehind: !0
|
|
61
|
+
},
|
|
62
|
+
"class-name": {
|
|
63
|
+
pattern: /(\bclass\s+)\w+/i,
|
|
64
|
+
lookbehind: !0
|
|
65
|
+
},
|
|
66
|
+
decorator: {
|
|
67
|
+
pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m,
|
|
68
|
+
lookbehind: !0,
|
|
69
|
+
alias: ["annotation", "punctuation"],
|
|
70
|
+
inside: {
|
|
71
|
+
punctuation: /\./
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
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/,
|
|
75
|
+
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/,
|
|
76
|
+
boolean: /\b(?:False|None|True)\b/,
|
|
77
|
+
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,
|
|
78
|
+
operator: /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
|
|
79
|
+
punctuation: /[{}[\];(),.:]/
|
|
80
|
+
}, Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python, Prism.languages.py = Prism.languages.python), o;
|
|
81
|
+
}
|
|
82
|
+
var l = d();
|
|
83
|
+
const c = /* @__PURE__ */ p(l), m = /* @__PURE__ */ u({
|
|
84
|
+
__proto__: null,
|
|
85
|
+
default: c
|
|
86
|
+
}, [l]);
|
|
87
|
+
export {
|
|
88
|
+
m as p
|
|
89
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { g as l } from "./lib_enter-Dc5XyCCf.js";
|
|
2
|
+
function d(e, r) {
|
|
3
|
+
for (var n = 0; n < r.length; n++) {
|
|
4
|
+
const t = r[n];
|
|
5
|
+
if (typeof t != "string" && !Array.isArray(t)) {
|
|
6
|
+
for (const i in t)
|
|
7
|
+
if (i !== "default" && !(i in e)) {
|
|
8
|
+
const s = Object.getOwnPropertyDescriptor(t, i);
|
|
9
|
+
s && Object.defineProperty(e, i, s.get ? s : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => t[i]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var a = {}, o;
|
|
19
|
+
function g() {
|
|
20
|
+
return o || (o = 1, (function(e) {
|
|
21
|
+
e.languages.ruby = e.languages.extend("clike", {
|
|
22
|
+
comment: {
|
|
23
|
+
pattern: /#.*|^=begin\s[\s\S]*?^=end/m,
|
|
24
|
+
greedy: !0
|
|
25
|
+
},
|
|
26
|
+
"class-name": {
|
|
27
|
+
pattern: /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,
|
|
28
|
+
lookbehind: !0,
|
|
29
|
+
inside: {
|
|
30
|
+
punctuation: /[.\\]/
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
keyword: /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,
|
|
34
|
+
operator: /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,
|
|
35
|
+
punctuation: /[(){}[\].,;]/
|
|
36
|
+
}), e.languages.insertBefore("ruby", "operator", {
|
|
37
|
+
"double-colon": {
|
|
38
|
+
pattern: /::/,
|
|
39
|
+
alias: "punctuation"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var r = {
|
|
43
|
+
pattern: /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,
|
|
44
|
+
lookbehind: !0,
|
|
45
|
+
inside: {
|
|
46
|
+
content: {
|
|
47
|
+
pattern: /^(#\{)[\s\S]+(?=\}$)/,
|
|
48
|
+
lookbehind: !0,
|
|
49
|
+
inside: e.languages.ruby
|
|
50
|
+
},
|
|
51
|
+
delimiter: {
|
|
52
|
+
pattern: /^#\{|\}$/,
|
|
53
|
+
alias: "punctuation"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
delete e.languages.ruby.function;
|
|
58
|
+
var n = "(?:" + [
|
|
59
|
+
/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,
|
|
60
|
+
/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,
|
|
61
|
+
/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,
|
|
62
|
+
/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,
|
|
63
|
+
/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source
|
|
64
|
+
].join("|") + ")", t = /(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;
|
|
65
|
+
e.languages.insertBefore("ruby", "keyword", {
|
|
66
|
+
"regex-literal": [
|
|
67
|
+
{
|
|
68
|
+
pattern: RegExp(/%r/.source + n + /[egimnosux]{0,6}/.source),
|
|
69
|
+
greedy: !0,
|
|
70
|
+
inside: {
|
|
71
|
+
interpolation: r,
|
|
72
|
+
regex: /[\s\S]+/
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,
|
|
77
|
+
lookbehind: !0,
|
|
78
|
+
greedy: !0,
|
|
79
|
+
inside: {
|
|
80
|
+
interpolation: r,
|
|
81
|
+
regex: /[\s\S]+/
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
variable: /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,
|
|
86
|
+
symbol: [
|
|
87
|
+
{
|
|
88
|
+
pattern: RegExp(/(^|[^:]):/.source + t),
|
|
89
|
+
lookbehind: !0,
|
|
90
|
+
greedy: !0
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
pattern: RegExp(/([\r\n{(,][ \t]*)/.source + t + /(?=:(?!:))/.source),
|
|
94
|
+
lookbehind: !0,
|
|
95
|
+
greedy: !0
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"method-definition": {
|
|
99
|
+
pattern: /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,
|
|
100
|
+
lookbehind: !0,
|
|
101
|
+
inside: {
|
|
102
|
+
function: /\b\w+$/,
|
|
103
|
+
keyword: /^self\b/,
|
|
104
|
+
"class-name": /^\w+/,
|
|
105
|
+
punctuation: /\./
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}), e.languages.insertBefore("ruby", "string", {
|
|
109
|
+
"string-literal": [
|
|
110
|
+
{
|
|
111
|
+
pattern: RegExp(/%[qQiIwWs]?/.source + n),
|
|
112
|
+
greedy: !0,
|
|
113
|
+
inside: {
|
|
114
|
+
interpolation: r,
|
|
115
|
+
string: /[\s\S]+/
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,
|
|
120
|
+
greedy: !0,
|
|
121
|
+
inside: {
|
|
122
|
+
interpolation: r,
|
|
123
|
+
string: /[\s\S]+/
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
pattern: /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
128
|
+
alias: "heredoc-string",
|
|
129
|
+
greedy: !0,
|
|
130
|
+
inside: {
|
|
131
|
+
delimiter: {
|
|
132
|
+
pattern: /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,
|
|
133
|
+
inside: {
|
|
134
|
+
symbol: /\b\w+/,
|
|
135
|
+
punctuation: /^<<[-~]?/
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
interpolation: r,
|
|
139
|
+
string: /[\s\S]+/
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
pattern: /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,
|
|
144
|
+
alias: "heredoc-string",
|
|
145
|
+
greedy: !0,
|
|
146
|
+
inside: {
|
|
147
|
+
delimiter: {
|
|
148
|
+
pattern: /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,
|
|
149
|
+
inside: {
|
|
150
|
+
symbol: /\b\w+/,
|
|
151
|
+
punctuation: /^<<[-~]?'|'$/
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
string: /[\s\S]+/
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"command-literal": [
|
|
159
|
+
{
|
|
160
|
+
pattern: RegExp(/%x/.source + n),
|
|
161
|
+
greedy: !0,
|
|
162
|
+
inside: {
|
|
163
|
+
interpolation: r,
|
|
164
|
+
command: {
|
|
165
|
+
pattern: /[\s\S]+/,
|
|
166
|
+
alias: "string"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
pattern: /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,
|
|
172
|
+
greedy: !0,
|
|
173
|
+
inside: {
|
|
174
|
+
interpolation: r,
|
|
175
|
+
command: {
|
|
176
|
+
pattern: /[\s\S]+/,
|
|
177
|
+
alias: "string"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}), delete e.languages.ruby.string, e.languages.insertBefore("ruby", "number", {
|
|
183
|
+
builtin: /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,
|
|
184
|
+
constant: /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/
|
|
185
|
+
}), e.languages.rb = e.languages.ruby;
|
|
186
|
+
})(Prism)), a;
|
|
187
|
+
}
|
|
188
|
+
var u = g();
|
|
189
|
+
const p = /* @__PURE__ */ l(u), b = /* @__PURE__ */ d({
|
|
190
|
+
__proto__: null,
|
|
191
|
+
default: p
|
|
192
|
+
}, [u]);
|
|
193
|
+
export {
|
|
194
|
+
b as p
|
|
195
|
+
};
|