beansflight-json-form
Version:
> **版本号:verison 0.23.17**
1,330 lines (1,329 loc) • 84.9 kB
JavaScript
/**
* TinyMCE version 6.1.0 (2022-06-29)
*/
!(function () {
'use strict'
var e = tinymce.util.Tools.resolve('tinymce.PluginManager')
const t = e => () => e
class n {
constructor(e, t) {
;(this.tag = e), (this.value = t)
}
static some(e) {
return new n(!0, e)
}
static none() {
return n.singletonNone
}
fold(e, t) {
return this.tag ? t(this.value) : e()
}
isSome() {
return this.tag
}
isNone() {
return !this.tag
}
map(e) {
return this.tag ? n.some(e(this.value)) : n.none()
}
bind(e) {
return this.tag ? e(this.value) : n.none()
}
exists(e) {
return this.tag && e(this.value)
}
forall(e) {
return !this.tag || e(this.value)
}
filter(e) {
return !this.tag || e(this.value) ? this : n.none()
}
getOr(e) {
return this.tag ? this.value : e
}
or(e) {
return this.tag ? this : e
}
getOrThunk(e) {
return this.tag ? this.value : e()
}
orThunk(e) {
return this.tag ? this : e()
}
getOrDie(e) {
if (this.tag) return this.value
throw new Error(null != e ? e : 'Called getOrDie on None')
}
static from(e) {
return null == e ? n.none() : n.some(e)
}
getOrNull() {
return this.tag ? this.value : null
}
getOrUndefined() {
return this.value
}
each(e) {
this.tag && e(this.value)
}
toArray() {
return this.tag ? [this.value] : []
}
toString() {
return this.tag ? `some(${this.value})` : 'none()'
}
}
n.singletonNone = new n(!1)
var a = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils')
const s = 'undefined' != typeof window ? window : Function('return this;')(),
r = (function (e, t, n) {
const a = window.Prism
window.Prism = { manual: !0 }
var s = (function (e) {
var t = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
n = 0,
a = {},
s = {
manual: e.Prism && e.Prism.manual,
disableWorkerMessageHandler:
e.Prism && e.Prism.disableWorkerMessageHandler,
util: {
encode: function e(t) {
return t instanceof r
? new r(t.type, e(t.content), t.alias)
: Array.isArray(t)
? t.map(e)
: t
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/\u00a0/g, ' ')
},
type: function (e) {
return Object.prototype.toString.call(e).slice(8, -1)
},
objId: function (e) {
return (
e.__id || Object.defineProperty(e, '__id', { value: ++n }),
e.__id
)
},
clone: function e(t, n) {
var a, r
switch (((n = n || {}), s.util.type(t))) {
case 'Object':
if (((r = s.util.objId(t)), n[r])) return n[r]
for (var i in ((a = {}), (n[r] = a), t))
t.hasOwnProperty(i) && (a[i] = e(t[i], n))
return a
case 'Array':
return (
(r = s.util.objId(t)),
n[r]
? n[r]
: ((a = []),
(n[r] = a),
t.forEach(function (t, s) {
a[s] = e(t, n)
}),
a)
)
default:
return t
}
},
getLanguage: function (e) {
for (; e; ) {
var n = t.exec(e.className)
if (n) return n[1].toLowerCase()
e = e.parentElement
}
return 'none'
},
setLanguage: function (e, n) {
;(e.className = e.className.replace(RegExp(t, 'gi'), '')),
e.classList.add('language-' + n)
},
currentScript: function () {
if ('undefined' == typeof document) return null
if ('currentScript' in document) return document.currentScript
try {
throw new Error()
} catch (a) {
var e = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(a.stack) ||
[])[1]
if (e) {
var t = document.getElementsByTagName('script')
for (var n in t) if (t[n].src == e) return t[n]
}
return null
}
},
isActive: function (e, t, n) {
for (var a = 'no-' + t; e; ) {
var s = e.classList
if (s.contains(t)) return !0
if (s.contains(a)) return !1
e = e.parentElement
}
return !!n
}
},
languages: {
plain: a,
plaintext: a,
text: a,
txt: a,
extend: function (e, t) {
var n = s.util.clone(s.languages[e])
for (var a in t) n[a] = t[a]
return n
},
insertBefore: function (e, t, n, a) {
var r = (a = a || s.languages)[e],
i = {}
for (var o in r)
if (r.hasOwnProperty(o)) {
if (o == t)
for (var l in n) n.hasOwnProperty(l) && (i[l] = n[l])
n.hasOwnProperty(o) || (i[o] = r[o])
}
var u = a[e]
return (
(a[e] = i),
s.languages.DFS(s.languages, function (t, n) {
n === u && t != e && (this[t] = i)
}),
i
)
},
DFS: function e(t, n, a, r) {
r = r || {}
var i = s.util.objId
for (var o in t)
if (t.hasOwnProperty(o)) {
n.call(t, o, t[o], a || o)
var l = t[o],
u = s.util.type(l)
'Object' !== u || r[i(l)]
? 'Array' !== u ||
r[i(l)] ||
((r[i(l)] = !0), e(l, n, o, r))
: ((r[i(l)] = !0), e(l, n, null, r))
}
}
},
plugins: {},
highlightAll: function (e, t) {
s.highlightAllUnder(document, e, t)
},
highlightAllUnder: function (e, t, n) {
var a = {
callback: n,
container: e,
selector:
'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
}
s.hooks.run('before-highlightall', a),
(a.elements = Array.prototype.slice.apply(
a.container.querySelectorAll(a.selector)
)),
s.hooks.run('before-all-elements-highlight', a)
for (var r, i = 0; (r = a.elements[i++]); )
s.highlightElement(r, !0 === t, a.callback)
},
highlightElement: function (t, n, a) {
var r = s.util.getLanguage(t),
i = s.languages[r]
s.util.setLanguage(t, r)
var o = t.parentElement
o &&
'pre' === o.nodeName.toLowerCase() &&
s.util.setLanguage(o, r)
var l = {
element: t,
language: r,
grammar: i,
code: t.textContent
}
function u(e) {
;(l.highlightedCode = e),
s.hooks.run('before-insert', l),
(l.element.innerHTML = l.highlightedCode),
s.hooks.run('after-highlight', l),
s.hooks.run('complete', l),
a && a.call(l.element)
}
if (
(s.hooks.run('before-sanity-check', l),
(o = l.element.parentElement) &&
'pre' === o.nodeName.toLowerCase() &&
!o.hasAttribute('tabindex') &&
o.setAttribute('tabindex', '0'),
!l.code)
)
return s.hooks.run('complete', l), void (a && a.call(l.element))
if ((s.hooks.run('before-highlight', l), l.grammar))
if (n && e.Worker) {
var c = new Worker(s.filename)
;(c.onmessage = function (e) {
u(e.data)
}),
c.postMessage(
JSON.stringify({
language: l.language,
code: l.code,
immediateClose: !0
})
)
} else u(s.highlight(l.code, l.grammar, l.language))
else u(s.util.encode(l.code))
},
highlight: function (e, t, n) {
var a = { code: e, grammar: t, language: n }
if ((s.hooks.run('before-tokenize', a), !a.grammar))
throw new Error(
'The language "' + a.language + '" has no grammar.'
)
return (
(a.tokens = s.tokenize(a.code, a.grammar)),
s.hooks.run('after-tokenize', a),
r.stringify(s.util.encode(a.tokens), a.language)
)
},
tokenize: function (e, t) {
var n = t.rest
if (n) {
for (var a in n) t[a] = n[a]
delete t.rest
}
var s = new l()
return (
u(s, s.head, e),
o(e, s, t, s.head, 0),
(function (e) {
for (var t = [], n = e.head.next; n !== e.tail; )
t.push(n.value), (n = n.next)
return t
})(s)
)
},
hooks: {
all: {},
add: function (e, t) {
var n = s.hooks.all
;(n[e] = n[e] || []), n[e].push(t)
},
run: function (e, t) {
var n = s.hooks.all[e]
if (n && n.length) for (var a, r = 0; (a = n[r++]); ) a(t)
}
},
Token: r
}
function r(e, t, n, a) {
;(this.type = e),
(this.content = t),
(this.alias = n),
(this.length = 0 | (a || '').length)
}
function i(e, t, n, a) {
e.lastIndex = t
var s = e.exec(n)
if (s && a && s[1]) {
var r = s[1].length
;(s.index += r), (s[0] = s[0].slice(r))
}
return s
}
function o(e, t, n, a, l, d) {
for (var g in n)
if (n.hasOwnProperty(g) && n[g]) {
var p = n[g]
p = Array.isArray(p) ? p : [p]
for (var b = 0; b < p.length; ++b) {
if (d && d.cause == g + ',' + b) return
var h = p[b],
f = h.inside,
m = !!h.lookbehind,
y = !!h.greedy,
w = h.alias
if (y && !h.pattern.global) {
var k = h.pattern.toString().match(/[imsuy]*$/)[0]
h.pattern = RegExp(h.pattern.source, k + 'g')
}
for (
var v = h.pattern || h, _ = a.next, x = l;
_ !== t.tail && !(d && x >= d.reach);
x += _.value.length, _ = _.next
) {
var F = _.value
if (t.length > e.length) return
if (!(F instanceof r)) {
var S,
A = 1
if (y) {
if (!(S = i(v, x, e, m)) || S.index >= e.length) break
var $ = S.index,
z = S.index + S[0].length,
E = x
for (E += _.value.length; $ >= E; )
E += (_ = _.next).value.length
if (((x = E -= _.value.length), _.value instanceof r))
continue
for (
var C = _;
C !== t.tail && (E < z || 'string' == typeof C.value);
C = C.next
)
A++, (E += C.value.length)
A--, (F = e.slice(x, E)), (S.index -= x)
} else if (!(S = i(v, 0, F, m))) continue
$ = S.index
var j = S[0],
B = F.slice(0, $),
T = F.slice($ + j.length),
N = x + F.length
d && N > d.reach && (d.reach = N)
var P = _.prev
if (
(B && ((P = u(t, P, B)), (x += B.length)),
c(t, P, A),
(_ = u(t, P, new r(g, f ? s.tokenize(j, f) : j, w, j))),
T && u(t, _, T),
A > 1)
) {
var O = { cause: g + ',' + b, reach: N }
o(e, t, n, _.prev, x, O),
d && O.reach > d.reach && (d.reach = O.reach)
}
}
}
}
}
}
function l() {
var e = { value: null, prev: null, next: null },
t = { value: null, prev: e, next: null }
;(e.next = t), (this.head = e), (this.tail = t), (this.length = 0)
}
function u(e, t, n) {
var a = t.next,
s = { value: n, prev: t, next: a }
return (t.next = s), (a.prev = s), e.length++, s
}
function c(e, t, n) {
for (var a = t.next, s = 0; s < n && a !== e.tail; s++) a = a.next
;(t.next = a), (a.prev = t), (e.length -= s)
}
if (
((e.Prism = s),
(r.stringify = function e(t, n) {
if ('string' == typeof t) return t
if (Array.isArray(t)) {
var a = ''
return (
t.forEach(function (t) {
a += e(t, n)
}),
a
)
}
var r = {
type: t.type,
content: e(t.content, n),
tag: 'span',
classes: ['token', t.type],
attributes: {},
language: n
},
i = t.alias
i &&
(Array.isArray(i)
? Array.prototype.push.apply(r.classes, i)
: r.classes.push(i)),
s.hooks.run('wrap', r)
var o = ''
for (var l in r.attributes)
o +=
' ' +
l +
'="' +
(r.attributes[l] || '').replace(/"/g, '"') +
'"'
return (
'<' +
r.tag +
' class="' +
r.classes.join(' ') +
'"' +
o +
'>' +
r.content +
'</' +
r.tag +
'>'
)
}),
!e.document)
)
return e.addEventListener
? (s.disableWorkerMessageHandler ||
e.addEventListener(
'message',
function (t) {
var n = JSON.parse(t.data),
a = n.language,
r = n.code,
i = n.immediateClose
e.postMessage(s.highlight(r, s.languages[a], a)),
i && e.close()
},
!1
),
s)
: s
var d = s.util.currentScript()
function g() {
s.manual || s.highlightAll()
}
if (
(d &&
((s.filename = d.src),
d.hasAttribute('data-manual') && (s.manual = !0)),
!s.manual)
) {
var p = document.readyState
'loading' === p || ('interactive' === p && d && d.defer)
? document.addEventListener('DOMContentLoaded', g)
: window.requestAnimationFrame
? window.requestAnimationFrame(g)
: window.setTimeout(g, 16)
}
return s
})(
'undefined' != typeof window
? window
: 'undefined' != typeof WorkerGlobalScope &&
self instanceof WorkerGlobalScope
? self
: {}
)
return (
(s.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: /[{}[\];(),.:]/
}),
(function (e) {
function t(e, t) {
return '___' + e.toUpperCase() + t + '___'
}
Object.defineProperties((e.languages['markup-templating'] = {}), {
buildPlaceholders: {
value: function (n, a, s, r) {
if (n.language === a) {
var i = (n.tokenStack = [])
;(n.code = n.code.replace(s, function (e) {
if ('function' == typeof r && !r(e)) return e
for (
var s, o = i.length;
-1 !== n.code.indexOf((s = t(a, o)));
)
++o
return (i[o] = e), s
})),
(n.grammar = e.languages.markup)
}
}
},
tokenizePlaceholders: {
value: function (n, a) {
if (n.language === a && n.tokenStack) {
n.grammar = e.languages[a]
var s = 0,
r = Object.keys(n.tokenStack)
!(function i(o) {
for (var l = 0; l < o.length && !(s >= r.length); l++) {
var u = o[l]
if (
'string' == typeof u ||
(u.content && 'string' == typeof u.content)
) {
var c = r[s],
d = n.tokenStack[c],
g = 'string' == typeof u ? u : u.content,
p = t(a, c),
b = g.indexOf(p)
if (b > -1) {
++s
var h = g.substring(0, b),
f = new e.Token(
a,
e.tokenize(d, n.grammar),
'language-' + a,
d
),
m = g.substring(b + p.length),
y = []
h && y.push.apply(y, i([h])),
y.push(f),
m && y.push.apply(y, i([m])),
'string' == typeof u
? o.splice.apply(o, [l, 1].concat(y))
: (u.content = y)
}
} else u.content && i(u.content)
}
return o
})(n.tokens)
}
}
}
})
})(s),
(s.languages.c = s.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|[?:~]|[-+*/%&|^!=<>]=?/
})),
s.languages.insertBefore('c', 'string', {
char: {
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
greedy: !0
}
}),
s.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 },
s.languages.c.string
],
char: s.languages.c.char,
comment: s.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: s.languages.c }
}
}
}),
s.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 s.languages.c.boolean,
(function (e) {
var t =
/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
n = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(
/<keyword>/g,
function () {
return t.source
}
)
;(e.languages.cpp = e.languages.extend('c', {
'class-name': [
{
pattern: RegExp(
/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(
/<keyword>/g,
function () {
return t.source
}
)
),
lookbehind: !0
},
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
],
keyword: t,
number: {
pattern:
/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
greedy: !0
},
operator:
/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
boolean: /\b(?:false|true)\b/
})),
e.languages.insertBefore('cpp', 'string', {
module: {
pattern: RegExp(
/(\b(?:import|module)\s+)/.source +
'(?:' +
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
'|' +
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(
/<mod-name>/g,
function () {
return n
}
) +
')'
),
lookbehind: !0,
greedy: !0,
inside: {
string: /^[<"][\s\S]+/,
operator: /:/,
punctuation: /\./
}
},
'raw-string': {
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
alias: 'string',
greedy: !0
}
}),
e.languages.insertBefore('cpp', 'keyword', {
'generic-function': {
pattern:
/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
inside: {
function: /^\w+/,
generic: {
pattern: /<[\s\S]+/,
alias: 'class-name',
inside: e.languages.cpp
}
}
}
}),
e.languages.insertBefore('cpp', 'operator', {
'double-colon': { pattern: /::/, alias: 'punctuation' }
}),
e.languages.insertBefore('cpp', 'class-name', {
'base-clause': {
pattern:
/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
lookbehind: !0,
greedy: !0,
inside: e.languages.extend('cpp', {})
}
}),
e.languages.insertBefore(
'inside',
'double-colon',
{ 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i },
e.languages.cpp['base-clause']
)
})(s),
(function (e) {
function t(e, t) {
return e.replace(/<<(\d+)>>/g, function (e, n) {
return '(?:' + t[+n] + ')'
})
}
function n(e, n, a) {
return RegExp(t(e, n), a || '')
}
function a(e, t) {
for (var n = 0; n < t; n++)
e = e.replace(/<<self>>/g, function () {
return '(?:' + e + ')'
})
return e.replace(/<<self>>/g, '[^\\s\\S]')
}
var s =
'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void',
r = 'class enum interface record struct',
i =
'add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)',
o =
'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield'
function l(e) {
return '\\b(?:' + e.trim().replace(/ /g, '|') + ')\\b'
}
var u = l(r),
c = RegExp(l(s + ' ' + r + ' ' + i + ' ' + o)),
d = l(r + ' ' + i + ' ' + o),
g = l(s + ' ' + r + ' ' + o),
p = a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source, 2),
b = a(/\((?:[^()]|<<self>>)*\)/.source, 2),
h = /@?\b[A-Za-z_]\w*\b/.source,
f = t(/<<0>>(?:\s*<<1>>)?/.source, [h, p]),
m = t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [d, f]),
y = /\[\s*(?:,\s*)*\]/.source,
w = t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [m, y]),
k = t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [p, b, y]),
v = t(/\(<<0>>+(?:,<<0>>+)+\)/.source, [k]),
_ = t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [
v,
m,
y
]),
x = { keyword: c, punctuation: /[<>()?,.:[\]]/ },
F = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,
S = /"(?:\\.|[^\\"\r\n])*"/.source,
A = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source
;(e.languages.csharp = e.languages.extend('clike', {
string: [
{
pattern: n(/(^|[^$\\])<<0>>/.source, [A]),
lookbehind: !0,
greedy: !0
},
{
pattern: n(/(^|[^@$\\])<<0>>/.source, [S]),
lookbehind: !0,
greedy: !0
}
],
'class-name': [
{
pattern: n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [m]),
lookbehind: !0,
inside: x
},
{
pattern: n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [
h,
_
]),
lookbehind: !0,
inside: x
},
{
pattern: n(/(\busing\s+)<<0>>(?=\s*=)/.source, [h]),
lookbehind: !0
},
{
pattern: n(/(\b<<0>>\s+)<<1>>/.source, [u, f]),
lookbehind: !0,
inside: x
},
{
pattern: n(/(\bcatch\s*\(\s*)<<0>>/.source, [m]),
lookbehind: !0,
inside: x
},
{ pattern: n(/(\bwhere\s+)<<0>>/.source, [h]), lookbehind: !0 },
{
pattern: n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [w]),
lookbehind: !0,
inside: x
},
{
pattern: n(
/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/
.source,
[_, g, h]
),
inside: x
}
],
keyword: c,
number:
/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,
operator: />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,
punctuation: /\?\.?|::|[{}[\];(),.:]/
})),
e.languages.insertBefore('csharp', 'number', {
range: { pattern: /\.\./, alias: 'operator' }
}),
e.languages.insertBefore('csharp', 'punctuation', {
'named-parameter': {
pattern: n(/([(,]\s*)<<0>>(?=\s*:)/.source, [h]),
lookbehind: !0,
alias: 'punctuation'
}
}),
e.languages.insertBefore('csharp', 'class-name', {
namespace: {
pattern: n(
/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/
.source,
[h]
),
lookbehind: !0,
inside: { punctuation: /\./ }
},
'type-expression': {
pattern: n(
/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/
.source,
[b]
),
lookbehind: !0,
alias: 'class-name',
inside: x
},
'return-type': {
pattern: n(
/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/
.source,
[_, m]
),
inside: x,
alias: 'class-name'
},
'constructor-invocation': {
pattern: n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [_]),
lookbehind: !0,
inside: x,
alias: 'class-name'
},
'generic-method': {
pattern: n(/<<0>>\s*<<1>>(?=\s*\()/.source, [h, p]),
inside: {
function: n(/^<<0>>/.source, [h]),
generic: {
pattern: RegExp(p),
alias: 'class-name',
inside: x
}
}
},
'type-list': {
pattern: n(
/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/
.source,
[u, f, h, _, c.source, b, /\bnew\s*\(\s*\)/.source]
),
lookbehind: !0,
inside: {
'record-arguments': {
pattern: n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source, [f, b]),
lookbehind: !0,
greedy: !0,
inside: e.languages.csharp
},
keyword: c,
'class-name': { pattern: RegExp(_), greedy: !0, inside: x },
punctuation: /[,()]/
}
},
preprocessor: {
pattern: /(^[\t ]*)#.*/m,
lookbehind: !0,
alias: 'property',
inside: {
directive: {
pattern:
/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,
lookbehind: !0,
alias: 'keyword'
}
}
}
})
var $ = S + '|' + F,
z = t(
/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/
.source,
[$]
),
E = a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [z]), 2),
C =
/\b(?:assembly|event|field|method|module|param|property|return|type)\b/
.source,
j = t(/<<0>>(?:\s*\(<<1>>*\))?/.source, [m, E])
e.languages.insertBefore('csharp', 'class-name', {
attribute: {
pattern: n(
/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/
.source,
[C, j]
),
lookbehind: !0,
greedy: !0,
inside: {
target: {
pattern: n(/^<<0>>(?=\s*:)/.source, [C]),
alias: 'keyword'
},
'attribute-arguments': {
pattern: n(/\(<<0>>*\)/.source, [E]),
inside: e.languages.csharp
},
'class-name': {
pattern: RegExp(m),
inside: { punctuation: /\./ }
},
punctuation: /[:,]/
}
}
})
var B = /:[^}\r\n]+/.source,
T = a(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source, [z]), 2),
N = t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [T, B]),
P = a(
t(
/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/
.source,
[$]
),
2
),
O = t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [P, B])
function R(t, a) {
return {
interpolation: {
pattern: n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [t]),
lookbehind: !0,
inside: {
'format-string': {
pattern: n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [
a,
B
]),
lookbehind: !0,
inside: { punctuation: /^:/ }
},
punctuation: /^\{|\}$/,
expression: {
pattern: /[\s\S]+/,
alias: 'language-csharp',
inside: e.languages.csharp
}
}
},
string: /[\s\S]+/
}
}
e.languages.insertBefore('csharp', 'string', {
'interpolation-string': [
{
pattern: n(
/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/
.source,
[N]
),
lookbehind: !0,
greedy: !0,
inside: R(N, T)
},
{
pattern: n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [
O
]),
lookbehind: !0,
greedy: !0,
inside: R(O, P)
}
],
char: { pattern: RegExp(F), greedy: !0 }
}),
(e.languages.dotnet = e.languages.cs = e.languages.csharp)
})(s),
(function (e) {
var t =
/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/
;(e.languages.css = {
comment: /\/\*[\s\S]*?\*\//,
atrule: {
pattern: /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,
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\\((?:' +
t.source +
'|' +
/(?:[^\\\r\n()"']|\\[\s\S])*/.source +
')\\)',
'i'
),
greedy: !0,
inside: {
function: /^url/i,
punctuation: /^\(|\)$/,
string: { pattern: RegExp('^' + t.source + '$'), alias: 'url' }
}
},
selector: {
pattern: RegExp(
'(^|[{}\\s])[^{}\\s](?:[^{};"\'\\s]|\\s+(?![\\s{])|' +
t.source +
')*(?=\\s*\\{)'
),
lookbehind: !0
},
string: { pattern: t, 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: /[(){};:,]/
}),
(e.languages.css.atrule.inside.rest = e.languages.css)
var n = e.languages.markup
n &&
(n.tag.addInlined('style', 'css'),
n.tag.addAttribute('style', 'css'))
})(s),
(function (e) {
var t =
/\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/,
n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,
a = {
pattern: RegExp(
/(^|[^\w.])/.source + n + /[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: /\./
}
}
;(e.languages.java = e.languages.extend('clike', {
string: {
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
lookbehind: !0,
greedy: !0
},
'class-name': [
a,
{
pattern: RegExp(
/(^|[^\w.])/.source +
n +
/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/
.source
),
lookbehind: !0,
inside: a.inside
},
{
pattern: RegExp(
/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/
.source +
n +
/[A-Z]\w*\b/.source
),
lookbehind: !0,
inside: a.inside
}
],
keyword: t,
function: [
e.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
}
})),
e.languages.insertBefore('java', 'string', {
'triple-quoted-string': {
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
greedy: !0,
alias: 'string'
},
char: { pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/, greedy: !0 }
}),
e.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': a,
keyword: t,
punctuation: /[<>(),.:]/,
operator: /[?&|]/
}
},
import: [
{
pattern: RegExp(
/(\bimport\s+)/.source +
n +
/(?:[A-Z]\w*|\*)(?=\s*;)/.source
),
lookbehind: !0,
inside: {
namespace: a.inside.namespace,
punctuation: /\./,
operator: /\*/,
'class-name': /\w+/
}
},
{
pattern: RegExp(
/(\bimport\s+static\s+)/.source +
n +
/(?:\w+|\*)(?=\s*;)/.source
),
lookbehind: !0,
alias: 'static',
inside: {
namespace: a.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 () {
return t.source
}
)
),
lookbehind: !0,
inside: { punctuation: /\./ }
}
})
})(s),
(s.languages.javascript = s.languages.extend('clike', {
'class-name': [
s.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}|\?\?=?|\?\.?|[~:]/
})),
(s.languages.javascript['class-name'][0].pattern =
/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/),
s.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: s.la