2020-09-03 03:32:57 +08:00
/ *
2021-03-11 00:35:00 +08:00
Highlight . js 10.6 . 0 ( 7 f3240ea )
2020-09-03 03:32:57 +08:00
License : BSD - 3 - Clause
2021-03-11 00:35:00 +08:00
Copyright ( c ) 2006 - 2021 , Ivan Sagalaev
2020-09-03 03:32:57 +08:00
* /
2021-03-11 00:35:00 +08:00
var hljs = function ( ) { "use strict" ; function e ( t ) {
return t instanceof Map ? t . clear = t . delete = t . set = ( ) => {
throw Error ( "map is read-only" ) } : t instanceof Set && ( t . add = t . clear = t . delete = ( ) => {
throw Error ( "set is read-only" )
} ) , Object . freeze ( t ) , Object . getOwnPropertyNames ( t ) . forEach ( ( n => { var i = t [ n ]
; "object" != typeof i || Object . isFrozen ( i ) || e ( i ) } ) ) , t } var t = e , n = e ; t . default = n
; class i { constructor ( e ) { void 0 === e . data && ( e . data = { } ) , this . data = e . data }
ignoreMatch ( ) { this . ignore = ! 0 } } function r ( e ) {
return e . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( />/g , ">" ) . replace ( /"/g , """ ) . replace ( /'/g , "'" )
} function s ( e , ... t ) { const n = Object . create ( null ) ; for ( const t in e ) n [ t ] = e [ t ]
; return t . forEach ( ( e => { for ( const t in e ) n [ t ] = e [ t ] } ) ) , n } const a = e => ! ! e . kind
; class l { constructor ( e , t ) {
this . buffer = "" , this . classPrefix = t . classPrefix , e . walk ( this ) } addText ( e ) {
this . buffer += r ( e ) } openNode ( e ) { if ( ! a ( e ) ) return ; let t = e . kind
; e . sublanguage || ( t = ` ${ this . classPrefix } ${ t } ` ) , this . span ( t ) } closeNode ( e ) {
a ( e ) && ( this . buffer += "</span>" ) } value ( ) { return this . buffer } span ( e ) {
this . buffer += ` <span class=" ${ e } "> ` } } class o { constructor ( ) { this . rootNode = {
children : [ ] } , this . stack = [ this . rootNode ] } get top ( ) {
return this . stack [ this . stack . length - 1 ] } get root ( ) { return this . rootNode } add ( e ) {
this . top . children . push ( e ) } openNode ( e ) { const t = { kind : e , children : [ ] }
; this . add ( t ) , this . stack . push ( t ) } closeNode ( ) {
if ( this . stack . length > 1 ) return this . stack . pop ( ) } closeAllNodes ( ) {
for ( ; this . closeNode ( ) ; ) ; } toJSON ( ) { return JSON . stringify ( this . rootNode , null , 4 ) }
walk ( e ) { return this . constructor . _walk ( e , this . rootNode ) } static _walk ( e , t ) {
return "string" == typeof t ? e . addText ( t ) : t . children && ( e . openNode ( t ) ,
t . children . forEach ( ( t => this . _walk ( e , t ) ) ) , e . closeNode ( t ) ) , e } static _collapse ( e ) {
"string" != typeof e && e . children && ( e . children . every ( ( e => "string" == typeof e ) ) ? e . children = [ e . children . join ( "" ) ] : e . children . forEach ( ( e => {
o . _collapse ( e ) } ) ) ) } } class c extends o { constructor ( e ) { super ( ) , this . options = e }
addKeyword ( e , t ) { "" !== e && ( this . openNode ( t ) , this . addText ( e ) , this . closeNode ( ) ) }
addText ( e ) { "" !== e && this . add ( e ) } addSublanguage ( e , t ) { const n = e . root
; n . kind = t , n . sublanguage = ! 0 , this . add ( n ) } toHTML ( ) {
return new l ( this , this . options ) . value ( ) } finalize ( ) { return ! 0 } } function g ( e ) {
return e ? "string" == typeof e ? e : e . source : null }
const u = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./ , d = "[a-zA-Z]\\w*" , h = "[a-zA-Z_]\\w*" , f = "\\b\\d+(\\.\\d+)?" , p = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)" , m = "\\b(0b[01]+)" , b = {
begin : "\\\\[\\s\\S]" , relevance : 0 } , E = { className : "string" , begin : "'" , end : "'" ,
illegal : "\\n" , contains : [ b ] } , x = { className : "string" , begin : '"' , end : '"' ,
illegal : "\\n" , contains : [ b ] } , v = {
begin : /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
} , w = ( e , t , n = { } ) => { const i = s ( { className : "comment" , begin : e , end : t , contains : [ ] } , n )
; return i . contains . push ( v ) , i . contains . push ( { className : "doctag" ,
begin : "(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):" , relevance : 0 } ) , i
} , y = w ( "//" , "$" ) , N = w ( "/\\*" , "\\*/" ) , R = w ( "#" , "$" ) ; var _ = Object . freeze ( {
_ _proto _ _ : null , MATCH _NOTHING _RE : /\b\B/ , IDENT _RE : d , UNDERSCORE _IDENT _RE : h ,
NUMBER _RE : f , C _NUMBER _RE : p , BINARY _NUMBER _RE : m ,
RE _STARTERS _RE : "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~" ,
SHEBANG : ( e = { } ) => { const t = /^#![ ]*\//
; return e . binary && ( e . begin = ( ( ... e ) => e . map ( ( e => g ( e ) ) ) . join ( "" ) ) ( t , /.*\b/ , e . binary , /\b.*/ ) ) ,
s ( { className : "meta" , begin : t , end : /$/ , relevance : 0 , "on:begin" : ( e , t ) => {
0 !== e . index && t . ignoreMatch ( ) } } , e ) } , BACKSLASH _ESCAPE : b , APOS _STRING _MODE : E ,
QUOTE _STRING _MODE : x , PHRASAL _WORDS _MODE : v , COMMENT : w , C _LINE _COMMENT _MODE : y ,
C _BLOCK _COMMENT _MODE : N , HASH _COMMENT _MODE : R , NUMBER _MODE : { className : "number" ,
begin : f , relevance : 0 } , C _NUMBER _MODE : { className : "number" , begin : p , relevance : 0 } ,
BINARY _NUMBER _MODE : { className : "number" , begin : m , relevance : 0 } , CSS _NUMBER _MODE : {
className : "number" ,
begin : f + "(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?" ,
relevance : 0 } , REGEXP _MODE : { begin : /(?=\/[^/\n]*\/)/ , contains : [ { className : "regexp" ,
begin : /\// , end : /\/[gimuy]*/ , illegal : /\n/ , contains : [ b , { begin : /\[/ , end : /\]/ ,
relevance : 0 , contains : [ b ] } ] } ] } , TITLE _MODE : { className : "title" , begin : d , relevance : 0
} , UNDERSCORE _TITLE _MODE : { className : "title" , begin : h , relevance : 0 } , METHOD _GUARD : {
begin : "\\.\\s*[a-zA-Z_]\\w*" , relevance : 0 } , END _SAME _AS _BEGIN : e => Object . assign ( e , {
"on:begin" : ( e , t ) => { t . data . _beginMatch = e [ 1 ] } , "on:end" : ( e , t ) => {
t . data . _beginMatch !== e [ 1 ] && t . ignoreMatch ( ) } } ) } ) ; function k ( e , t ) {
"." === e . input [ e . index - 1 ] && t . ignoreMatch ( ) } function O ( e , t ) {
t && e . beginKeywords && ( e . begin = "\\b(" + e . beginKeywords . split ( " " ) . join ( "|" ) + ")(?!\\.)(?=\\b|\\s)" ,
e . _ _beforeBegin = k , e . keywords = e . keywords || e . beginKeywords , delete e . beginKeywords ,
void 0 === e . relevance && ( e . relevance = 0 ) ) } function M ( e , t ) {
Array . isArray ( e . illegal ) && ( e . illegal = ( ( ... e ) => "(" + e . map ( ( e => g ( e ) ) ) . join ( "|" ) + ")" ) ( ... e . illegal ) )
} function A ( e , t ) { if ( e . match ) {
if ( e . begin || e . end ) throw Error ( "begin & end are not supported with match" )
; e . begin = e . match , delete e . match } } function L ( e , t ) {
void 0 === e . relevance && ( e . relevance = 1 ) }
const j = [ "of" , "and" , "for" , "in" , "not" , "or" , "if" , "then" , "parent" , "list" , "value" ]
; function B ( e , t , n = "keyword" ) { const i = { }
; return "string" == typeof e ? r ( n , e . split ( " " ) ) : Array . isArray ( e ) ? r ( n , e ) : Object . keys ( e ) . forEach ( ( n => {
Object . assign ( i , B ( e [ n ] , t , n ) ) } ) ) , i ; function r ( e , n ) {
t && ( n = n . map ( ( e => e . toLowerCase ( ) ) ) ) , n . forEach ( ( t => { const n = t . split ( "|" )
; i [ n [ 0 ] ] = [ e , I ( n [ 0 ] , n [ 1 ] ) ] } ) ) } } function I ( e , t ) {
return t ? Number ( t ) : ( e => j . includes ( e . toLowerCase ( ) ) ) ( e ) ? 0 : 1 }
function T ( e , { plugins : t } ) { function n ( t , n ) {
return RegExp ( g ( t ) , "m" + ( e . case _insensitive ? "i" : "" ) + ( n ? "g" : "" ) ) } class i {
constructor ( ) {
this . matchIndexes = { } , this . regexes = [ ] , this . matchAt = 1 , this . position = 0 }
addRule ( e , t ) {
t . position = this . position ++ , this . matchIndexes [ this . matchAt ] = t , this . regexes . push ( [ t , e ] ) ,
this . matchAt += ( e => RegExp ( e . toString ( ) + "|" ) . exec ( "" ) . length - 1 ) ( e ) + 1 } compile ( ) {
0 === this . regexes . length && ( this . exec = ( ) => null )
; const e = this . regexes . map ( ( e => e [ 1 ] ) ) ; this . matcherRe = n ( ( ( e , t = "|" ) => { let n = 0
; return e . map ( ( e => { n += 1 ; const t = n ; let i = g ( e ) , r = "" ; for ( ; i . length > 0 ; ) {
const e = u . exec ( i ) ; if ( ! e ) { r += i ; break }
r += i . substring ( 0 , e . index ) , i = i . substring ( e . index + e [ 0 ] . length ) ,
"\\" === e [ 0 ] [ 0 ] && e [ 1 ] ? r += "\\" + ( Number ( e [ 1 ] ) + t ) : ( r += e [ 0 ] , "(" === e [ 0 ] && n ++ ) } return r
} ) ) . map ( ( e => ` ( ${ e } ) ` ) ) . join ( t ) } ) ( e ) , ! 0 ) , this . lastIndex = 0 } exec ( e ) {
this . matcherRe . lastIndex = this . lastIndex ; const t = this . matcherRe . exec ( e )
; if ( ! t ) return null
; const n = t . findIndex ( ( ( e , t ) => t > 0 && void 0 !== e ) ) , i = this . matchIndexes [ n ]
; return t . splice ( 0 , n ) , Object . assign ( t , i ) } } class r { constructor ( ) {
this . rules = [ ] , this . multiRegexes = [ ] ,
this . count = 0 , this . lastIndex = 0 , this . regexIndex = 0 } getMatcher ( e ) {
if ( this . multiRegexes [ e ] ) return this . multiRegexes [ e ] ; const t = new i
; return this . rules . slice ( e ) . forEach ( ( ( [ e , n ] ) => t . addRule ( e , n ) ) ) ,
t . compile ( ) , this . multiRegexes [ e ] = t , t } resumingScanAtSamePosition ( ) {
return 0 !== this . regexIndex } considerAll ( ) { this . regexIndex = 0 } addRule ( e , t ) {
this . rules . push ( [ e , t ] ) , "begin" === t . type && this . count ++ } exec ( e ) {
const t = this . getMatcher ( this . regexIndex ) ; t . lastIndex = this . lastIndex
; let n = t . exec ( e )
; if ( this . resumingScanAtSamePosition ( ) ) if ( n && n . index === this . lastIndex ) ; else {
const t = this . getMatcher ( 0 ) ; t . lastIndex = this . lastIndex + 1 , n = t . exec ( e ) }
return n && ( this . regexIndex += n . position + 1 ,
this . regexIndex === this . count && this . considerAll ( ) ) , n } }
if ( e . compilerExtensions || ( e . compilerExtensions = [ ] ) ,
e . contains && e . contains . includes ( "self" ) ) throw Error ( "ERR: contains `self` is not supported at the top-level of a language. See documentation." )
; return e . classNameAliases = s ( e . classNameAliases || { } ) , function t ( i , a ) { const l = i
; if ( i . compiled ) return l
; [ A ] . forEach ( ( e => e ( i , a ) ) ) , e . compilerExtensions . forEach ( ( e => e ( i , a ) ) ) ,
i . _ _beforeBegin = null , [ O , M , L ] . forEach ( ( e => e ( i , a ) ) ) , i . compiled = ! 0 ; let o = null
; if ( "object" == typeof i . keywords && ( o = i . keywords . $pattern ,
delete i . keywords . $pattern ) ,
i . keywords && ( i . keywords = B ( i . keywords , e . case _insensitive ) ) ,
i . lexemes && o ) throw Error ( "ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) " )
; return o = o || i . lexemes || /\w+/ ,
l . keywordPatternRe = n ( o , ! 0 ) , a && ( i . begin || ( i . begin = /\B|\b/ ) ,
l . beginRe = n ( i . begin ) , i . endSameAsBegin && ( i . end = i . begin ) ,
i . end || i . endsWithParent || ( i . end = /\B|\b/ ) ,
i . end && ( l . endRe = n ( i . end ) ) , l . terminatorEnd = g ( i . end ) || "" ,
i . endsWithParent && a . terminatorEnd && ( l . terminatorEnd += ( i . end ? "|" : "" ) + a . terminatorEnd ) ) ,
i . illegal && ( l . illegalRe = n ( i . illegal ) ) ,
i . contains || ( i . contains = [ ] ) , i . contains = [ ] . concat ( ... i . contains . map ( ( e => ( e => ( e . variants && ! e . cachedVariants && ( e . cachedVariants = e . variants . map ( ( t => s ( e , {
variants : null } , t ) ) ) ) , e . cachedVariants ? e . cachedVariants : S ( e ) ? s ( e , {
starts : e . starts ? s ( e . starts ) : null
} ) : Object . isFrozen ( e ) ? s ( e ) : e ) ) ( "self" === e ? i : e ) ) ) ) , i . contains . forEach ( ( e => { t ( e , l )
} ) ) , i . starts && t ( i . starts , a ) , l . matcher = ( e => { const t = new r
; return e . contains . forEach ( ( e => t . addRule ( e . begin , { rule : e , type : "begin"
} ) ) ) , e . terminatorEnd && t . addRule ( e . terminatorEnd , { type : "end"
} ) , e . illegal && t . addRule ( e . illegal , { type : "illegal" } ) , t } ) ( l ) , l } ( e ) } function S ( e ) {
return ! ! e && ( e . endsWithParent || S ( e . starts ) ) } function P ( e ) { const t = {
props : [ "language" , "code" , "autodetect" ] , data : ( ) => ( { detectedLanguage : "" ,
unknownLanguage : ! 1 } ) , computed : { className ( ) {
return this . unknownLanguage ? "" : "hljs " + this . detectedLanguage } , highlighted ( ) {
if ( ! this . autoDetect && ! e . getLanguage ( this . language ) ) return console . warn ( ` The language " ${ this . language } " you specified could not be found. ` ) ,
this . unknownLanguage = ! 0 , r ( this . code ) ; let t = { }
; return this . autoDetect ? ( t = e . highlightAuto ( this . code ) ,
this . detectedLanguage = t . language ) : ( t = e . highlight ( this . language , this . code , this . ignoreIllegals ) ,
this . detectedLanguage = this . language ) , t . value } , autoDetect ( ) {
return ! ( this . language && ( e = this . autodetect , ! e && "" !== e ) ) ; var e } ,
ignoreIllegals : ( ) => ! 0 } , render ( e ) { return e ( "pre" , { } , [ e ( "code" , {
class : this . className , domProps : { innerHTML : this . highlighted } } ) ] ) } } ; return {
Component : t , VuePlugin : { install ( e ) { e . component ( "highlightjs" , t ) } } } } const D = {
"after:highlightElement" : ( { el : e , result : t , text : n } ) => { const i = H ( e )
; if ( ! i . length ) return ; const s = document . createElement ( "div" )
; s . innerHTML = t . value , t . value = ( ( e , t , n ) => { let i = 0 , s = "" ; const a = [ ] ; function l ( ) {
return e . length && t . length ? e [ 0 ] . offset !== t [ 0 ] . offset ? e [ 0 ] . offset < t [ 0 ] . offset ? e : t : "start" === t [ 0 ] . event ? e : t : e . length ? e : t
} function o ( e ) { s += "<" + C ( e ) + [ ] . map . call ( e . attributes , ( function ( e ) {
return " " + e . nodeName + '="' + r ( e . value ) + '"' } ) ) . join ( "" ) + ">" } function c ( e ) {
s += "</" + C ( e ) + ">" } function g ( e ) { ( "start" === e . event ? o : c ) ( e . node ) }
for ( ; e . length || t . length ; ) { let t = l ( )
; if ( s += r ( n . substring ( i , t [ 0 ] . offset ) ) , i = t [ 0 ] . offset , t === e ) { a . reverse ( ) . forEach ( c )
; do { g ( t . splice ( 0 , 1 ) [ 0 ] ) , t = l ( ) } while ( t === e && t . length && t [ 0 ] . offset === i )
; a . reverse ( ) . forEach ( o )
} else "start" === t [ 0 ] . event ? a . push ( t [ 0 ] . node ) : a . pop ( ) , g ( t . splice ( 0 , 1 ) [ 0 ] ) }
return s + r ( n . substr ( i ) ) } ) ( i , H ( s ) , n ) } } ; function C ( e ) {
return e . nodeName . toLowerCase ( ) } function H ( e ) { const t = [ ] ; return function e ( n , i ) {
for ( let r = n . firstChild ; r ; r = r . nextSibling ) 3 === r . nodeType ? i += r . nodeValue . length : 1 === r . nodeType && ( t . push ( {
event : "start" , offset : i , node : r } ) , i = e ( r , i ) , C ( r ) . match ( /br|hr|img|input/ ) || t . push ( {
event : "stop" , offset : i , node : r } ) ) ; return i } ( e , 0 ) , t } const $ = e => { console . error ( e )
} , U = ( e , ... t ) => { console . log ( "WARN: " + e , ... t ) } , z = ( e , t ) => {
console . log ( ` Deprecated as of ${ e } . ${ t } ` ) } , K = r , G = s , V = Symbol ( "nomatch" )
; return ( e => { const n = Object . create ( null ) , r = Object . create ( null ) , s = [ ] ; let a = ! 0
; const l = /(^(<[^>]+>|\t|)+|\n)/gm , o = "Could not find the language '{}', did you forget to load/include a language module?" , g = {
disableAutodetect : ! 0 , name : "Plain text" , contains : [ ] } ; let u = {
noHighlightRe : /^(no-?highlight)$/i ,
languageDetectRe : /\blang(?:uage)?-([\w-]+)\b/i , classPrefix : "hljs-" ,
tabReplace : null , useBR : ! 1 , languages : null , _ _emitter : c } ; function d ( e ) {
return u . noHighlightRe . test ( e ) } function h ( e , t , n , i ) { const r = { code : t , language : e }
; O ( "before:highlight" , r ) ; const s = r . result ? r . result : f ( r . language , r . code , n , i )
; return s . code = r . code , O ( "after:highlight" , s ) , s } function f ( e , t , r , l ) { const c = t
; function g ( e , t ) { const n = w . case _insensitive ? t [ 0 ] . toLowerCase ( ) : t [ 0 ]
; return Object . prototype . hasOwnProperty . call ( e . keywords , n ) && e . keywords [ n ] }
function d ( ) { null != _ . subLanguage ? ( ( ) => { if ( "" === M ) return ; let e = null
; if ( "string" == typeof _ . subLanguage ) {
if ( ! n [ _ . subLanguage ] ) return void O . addText ( M )
; e = f ( _ . subLanguage , M , ! 0 , k [ _ . subLanguage ] ) , k [ _ . subLanguage ] = e . top
} else e = p ( M , _ . subLanguage . length ? _ . subLanguage : null )
; _ . relevance > 0 && ( A += e . relevance ) , O . addSublanguage ( e . emitter , e . language )
} ) ( ) : ( ( ) => { if ( ! _ . keywords ) return void O . addText ( M ) ; let e = 0
; _ . keywordPatternRe . lastIndex = 0 ; let t = _ . keywordPatternRe . exec ( M ) , n = "" ; for ( ; t ; ) {
n += M . substring ( e , t . index ) ; const i = g ( _ , t ) ; if ( i ) { const [ e , r ] = i
; O . addText ( n ) , n = "" , A += r ; const s = w . classNameAliases [ e ] || e ; O . addKeyword ( t [ 0 ] , s )
} else n += t [ 0 ] ; e = _ . keywordPatternRe . lastIndex , t = _ . keywordPatternRe . exec ( M ) }
n += M . substr ( e ) , O . addText ( n ) } ) ( ) , M = "" } function h ( e ) {
return e . className && O . openNode ( w . classNameAliases [ e . className ] || e . className ) ,
_ = Object . create ( e , { parent : { value : _ } } ) , _ } function m ( e , t , n ) { let r = ( ( e , t ) => {
const n = e && e . exec ( t ) ; return n && 0 === n . index } ) ( e . endRe , n ) ; if ( r ) { if ( e [ "on:end" ] ) {
const n = new i ( e ) ; e [ "on:end" ] ( t , n ) , n . ignore && ( r = ! 1 ) } if ( r ) {
for ( ; e . endsParent && e . parent ; ) e = e . parent ; return e } }
if ( e . endsWithParent ) return m ( e . parent , t , n ) } function b ( e ) {
return 0 === _ . matcher . regexIndex ? ( M += e [ 0 ] , 1 ) : ( B = ! 0 , 0 ) } function E ( e ) {
const t = e [ 0 ] , n = c . substr ( e . index ) , i = m ( _ , e , n ) ; if ( ! i ) return V ; const r = _
; r . skip ? M += t : ( r . returnEnd || r . excludeEnd || ( M += t ) , d ( ) , r . excludeEnd && ( M = t ) ) ; do {
_ . className && O . closeNode ( ) , _ . skip || _ . subLanguage || ( A += _ . relevance ) , _ = _ . parent
} while ( _ !== i . parent )
; return i . starts && ( i . endSameAsBegin && ( i . starts . endRe = i . endRe ) ,
h ( i . starts ) ) , r . returnEnd ? 0 : t . length } let x = { } ; function v ( t , n ) { const s = n && n [ 0 ]
; if ( M += t , null == s ) return d ( ) , 0
; if ( "begin" === x . type && "end" === n . type && x . index === n . index && "" === s ) {
if ( M += c . slice ( n . index , n . index + 1 ) , ! a ) { const t = Error ( "0 width match regex" )
; throw t . languageName = e , t . badRule = x . rule , t } return 1 }
if ( x = n , "begin" === n . type ) return function ( e ) {
const t = e [ 0 ] , n = e . rule , r = new i ( n ) , s = [ n . _ _beforeBegin , n [ "on:begin" ] ]
; for ( const n of s ) if ( n && ( n ( e , r ) , r . ignore ) ) return b ( t )
; return n && n . endSameAsBegin && ( n . endRe = RegExp ( t . replace ( /[-/\\^$*+?.()|[\]{}]/g , "\\$&" ) , "m" ) ) ,
n . skip ? M += t : ( n . excludeBegin && ( M += t ) ,
d ( ) , n . returnBegin || n . excludeBegin || ( M = t ) ) , h ( n ) , n . returnBegin ? 0 : t . length } ( n )
; if ( "illegal" === n . type && ! r ) {
const e = Error ( 'Illegal lexeme "' + s + '" for mode "' + ( _ . className || "<unnamed>" ) + '"' )
; throw e . mode = _ , e } if ( "end" === n . type ) { const e = E ( n ) ; if ( e !== V ) return e }
if ( "illegal" === n . type && "" === s ) return 1
; if ( j > 1e5 && j > 3 * n . index ) throw Error ( "potential infinite loop, way more iterations than matches" )
; return M += s , s . length } const w = N ( e )
; if ( ! w ) throw $ ( o . replace ( "{}" , e ) ) , Error ( 'Unknown language: "' + e + '"' )
; const y = T ( w , { plugins : s } ) ; let R = "" , _ = l || y ; const k = { } , O = new u . _ _emitter ( u ) ; ( ( ) => {
const e = [ ] ; for ( let t = _ ; t !== w ; t = t . parent ) t . className && e . unshift ( t . className )
; e . forEach ( ( e => O . openNode ( e ) ) ) } ) ( ) ; let M = "" , A = 0 , L = 0 , j = 0 , B = ! 1 ; try {
for ( _ . matcher . considerAll ( ) ; ; ) {
j ++ , B ? B = ! 1 : _ . matcher . considerAll ( ) , _ . matcher . lastIndex = L
; const e = _ . matcher . exec ( c ) ; if ( ! e ) break ; const t = v ( c . substring ( L , e . index ) , e )
; L = e . index + t } return v ( c . substr ( L ) ) , O . closeAllNodes ( ) , O . finalize ( ) , R = O . toHTML ( ) , {
relevance : Math . floor ( A ) , value : R , language : e , illegal : ! 1 , emitter : O , top : _ } } catch ( t ) {
if ( t . message && t . message . includes ( "Illegal" ) ) return { illegal : ! 0 , illegalBy : {
msg : t . message , context : c . slice ( L - 100 , L + 100 ) , mode : t . mode } , sofar : R , relevance : 0 ,
value : K ( c ) , emitter : O } ; if ( a ) return { illegal : ! 1 , relevance : 0 , value : K ( c ) , emitter : O ,
language : e , top : _ , errorRaised : t } ; throw t } } function p ( e , t ) {
t = t || u . languages || Object . keys ( n ) ; const i = ( e => { const t = { relevance : 0 ,
emitter : new u . _ _emitter ( u ) , value : K ( e ) , illegal : ! 1 , top : g }
; return t . emitter . addText ( e ) , t } ) ( e ) , r = t . filter ( N ) . filter ( k ) . map ( ( t => f ( t , e , ! 1 ) ) )
; r . unshift ( i ) ; const s = r . sort ( ( ( e , t ) => {
if ( e . relevance !== t . relevance ) return t . relevance - e . relevance
; if ( e . language && t . language ) { if ( N ( e . language ) . supersetOf === t . language ) return 1
; if ( N ( t . language ) . supersetOf === e . language ) return - 1 } return 0 } ) ) , [ a , l ] = s , o = a
; return o . second _best = l , o } const m = { "before:highlightElement" : ( { el : e } ) => {
u . useBR && ( e . innerHTML = e . innerHTML . replace ( /\n/g , "" ) . replace ( /<br[ /]*>/g , "\n" ) )
} , "after:highlightElement" : ( { result : e } ) => {
u . useBR && ( e . value = e . value . replace ( /\n/g , "<br>" ) ) } } , b = /^(<[^>]+>|\t)+/gm , E = {
"after:highlightElement" : ( { result : e } ) => {
u . tabReplace && ( e . value = e . value . replace ( b , ( e => e . replace ( /\t/g , u . tabReplace ) ) ) ) } }
; function x ( e ) { let t = null ; const n = ( e => { let t = e . className + " "
; t += e . parentNode ? e . parentNode . className : "" ; const n = u . languageDetectRe . exec ( t )
; if ( n ) { const t = N ( n [ 1 ] )
; return t || ( U ( o . replace ( "{}" , n [ 1 ] ) ) , U ( "Falling back to no-highlight mode for this block." , e ) ) ,
t ? n [ 1 ] : "no-highlight" } return t . split ( /\s+/ ) . find ( ( e => d ( e ) || N ( e ) ) ) } ) ( e )
; if ( d ( n ) ) return ; O ( "before:highlightElement" , { el : e , language : n } ) , t = e
; const i = t . textContent , s = n ? h ( n , i , ! 0 ) : p ( i ) ; O ( "after:highlightElement" , { el : e ,
result : s , text : i } ) , e . innerHTML = s . value , ( ( e , t , n ) => { const i = t ? r [ t ] : n
; e . classList . add ( "hljs" ) , i && e . classList . add ( i ) } ) ( e , n , s . language ) , e . result = {
language : s . language , re : s . relevance , relavance : s . relevance
} , s . second _best && ( e . second _best = { language : s . second _best . language ,
re : s . second _best . relevance , relavance : s . second _best . relevance } ) } const v = ( ) => {
v . called || ( v . called = ! 0 ,
z ( "10.6.0" , "initHighlighting() is deprecated. Use highlightAll() instead." ) ,
document . querySelectorAll ( "pre code" ) . forEach ( x ) ) } ; let w = ! 1 ; function y ( ) {
"loading" !== document . readyState ? document . querySelectorAll ( "pre code" ) . forEach ( x ) : w = ! 0
} function N ( e ) { return e = ( e || "" ) . toLowerCase ( ) , n [ e ] || n [ r [ e ] ] }
function R ( e , { languageName : t } ) { "string" == typeof e && ( e = [ e ] ) , e . forEach ( ( e => {
r [ e . toLowerCase ( ) ] = t } ) ) } function k ( e ) { const t = N ( e )
; return t && ! t . disableAutodetect } function O ( e , t ) { const n = e ; s . forEach ( ( e => {
e [ n ] && e [ n ] ( t ) } ) ) }
"undefined" != typeof window && window . addEventListener && window . addEventListener ( "DOMContentLoaded" , ( ( ) => {
w && y ( ) } ) , ! 1 ) , Object . assign ( e , { highlight : h , highlightAuto : p , highlightAll : y ,
fixMarkup : e => {
return z ( "10.2.0" , "fixMarkup will be removed entirely in v11.0" ) , z ( "10.2.0" , "Please see https://github.com/highlightjs/highlight.js/issues/2534" ) ,
t = e ,
u . tabReplace || u . useBR ? t . replace ( l , ( e => "\n" === e ? u . useBR ? "<br>" : e : u . tabReplace ? e . replace ( /\t/g , u . tabReplace ) : e ) ) : t
; var t } , highlightElement : x ,
highlightBlock : e => ( z ( "10.7.0" , "highlightBlock will be removed entirely in v12.0" ) ,
z ( "10.7.0" , "Please use highlightElement now." ) , x ( e ) ) , configure : e => {
e . useBR && ( z ( "10.3.0" , "'useBR' will be removed entirely in v11.0" ) ,
z ( "10.3.0" , "Please see https://github.com/highlightjs/highlight.js/issues/2559" ) ) ,
u = G ( u , e ) } , initHighlighting : v , initHighlightingOnLoad : ( ) => {
z ( "10.6.0" , "initHighlightingOnLoad() is deprecated. Use highlightAll() instead." ) ,
w = ! 0 } , registerLanguage : ( t , i ) => { let r = null ; try { r = i ( e ) } catch ( e ) {
if ( $ ( "Language definition for '{}' could not be registered." . replace ( "{}" , t ) ) ,
! a ) throw e ; $ ( e ) , r = g }
r . name || ( r . name = t ) , n [ t ] = r , r . rawDefinition = i . bind ( null , e ) , r . aliases && R ( r . aliases , {
languageName : t } ) } , unregisterLanguage : e => { delete n [ e ]
; for ( const t of Object . keys ( r ) ) r [ t ] === e && delete r [ t ] } ,
listLanguages : ( ) => Object . keys ( n ) , getLanguage : N , registerAliases : R ,
requireLanguage : e => {
z ( "10.4.0" , "requireLanguage will be removed entirely in v11." ) ,
z ( "10.4.0" , "Please see https://github.com/highlightjs/highlight.js/pull/2844" )
; const t = N ( e ) ; if ( t ) return t
; throw Error ( "The '{}' language is required, but not loaded." . replace ( "{}" , e ) ) } ,
autoDetection : k , inherit : G , addPlugin : e => { ( e => {
e [ "before:highlightBlock" ] && ! e [ "before:highlightElement" ] && ( e [ "before:highlightElement" ] = t => {
e [ "before:highlightBlock" ] ( Object . assign ( { block : t . el } , t ) )
} ) , e [ "after:highlightBlock" ] && ! e [ "after:highlightElement" ] && ( e [ "after:highlightElement" ] = t => {
e [ "after:highlightBlock" ] ( Object . assign ( { block : t . el } , t ) ) } ) } ) ( e ) , s . push ( e ) } ,
vuePlugin : P ( e ) . VuePlugin } ) , e . debugMode = ( ) => { a = ! 1 } , e . safeMode = ( ) => { a = ! 0
} , e . versionString = "10.6.0" ; for ( const e in _ ) "object" == typeof _ [ e ] && t ( _ [ e ] )
; return Object . assign ( e , _ ) , e . addPlugin ( m ) , e . addPlugin ( D ) , e . addPlugin ( E ) , e } ) ( { } )
} ( ) ; "object" == typeof exports && "undefined" != typeof module && ( module . exports = hljs ) ;
hljs . registerLanguage ( "javascript" , ( ( ) => { "use strict"
; const e = "[A-Za-z$_][0-9A-Za-z$_]*" , n = [ "as" , "in" , "of" , "if" , "for" , "while" , "finally" , "var" , "new" , "function" , "do" , "return" , "void" , "else" , "break" , "catch" , "instanceof" , "with" , "throw" , "case" , "default" , "try" , "switch" , "continue" , "typeof" , "delete" , "let" , "yield" , "const" , "class" , "debugger" , "async" , "await" , "static" , "import" , "from" , "export" , "extends" ] , a = [ "true" , "false" , "null" , "undefined" , "NaN" , "Infinity" ] , s = [ ] . concat ( [ "setInterval" , "setTimeout" , "clearInterval" , "clearTimeout" , "require" , "exports" , "eval" , "isFinite" , "isNaN" , "parseFloat" , "parseInt" , "decodeURI" , "decodeURIComponent" , "encodeURI" , "encodeURIComponent" , "escape" , "unescape" ] , [ "arguments" , "this" , "super" , "console" , "window" , "document" , "localStorage" , "module" , "global" ] , [ "Intl" , "DataView" , "Number" , "Math" , "Date" , "String" , "RegExp" , "Object" , "Function" , "Boolean" , "Error" , "Symbol" , "Set" , "Map" , "WeakSet" , "WeakMap" , "Proxy" , "Reflect" , "JSON" , "Promise" , "Float64Array" , "Int16Array" , "Int32Array" , "Int8Array" , "Uint16Array" , "Uint32Array" , "Float32Array" , "Array" , "Uint8Array" , "Uint8ClampedArray" , "ArrayBuffer" , "BigInt64Array" , "BigUint64Array" , "BigInt" ] , [ "EvalError" , "InternalError" , "RangeError" , "ReferenceError" , "SyntaxError" , "TypeError" , "URIError" ] )
; function r ( e ) { return t ( "(?=" , e , ")" ) } function t ( ... e ) { return e . map ( ( e => {
return ( n = e ) ? "string" == typeof n ? n : n . source : null ; var n } ) ) . join ( "" ) } return i => {
const c = e , o = { begin : /<[A-Za-z0-9\\._:-]+/ , end : /\/[A-Za-z0-9\\._:-]+>|\/>/ ,
isTrulyOpeningTag : ( e , n ) => { const a = e [ 0 ] . length + e . index , s = e . input [ a ]
; "<" !== s ? ">" === s && ( ( ( e , { after : n } ) => { const a = "</" + e [ 0 ] . slice ( 1 )
; return - 1 !== e . input . indexOf ( a , n ) } ) ( e , { after : a
} ) || n . ignoreMatch ( ) ) : n . ignoreMatch ( ) } } , l = { $pattern : e , keyword : n , literal : a ,
built _in : s } , g = "\\.([0-9](_?[0-9])*)" , b = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*" , d = {
className : "number" , variants : [ {
begin : ` ( \\ b( ${ b } )(( ${ g } )| \\ .)?|( ${ g } ))[eE][+-]?([0-9](_?[0-9])*) \\ b ` } , {
begin : ` \\ b( ${ b } ) \\ b(( ${ g } ) \\ b| \\ .)?|( ${ g } ) \\ b ` } , {
begin : "\\b(0|[1-9](_?[0-9])*)n\\b" } , {
begin : "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b" } , {
begin : "\\b0[bB][0-1](_?[0-1])*n?\\b" } , { begin : "\\b0[oO][0-7](_?[0-7])*n?\\b" } , {
begin : "\\b0[0-7]+n?\\b" } ] , relevance : 0 } , E = { className : "subst" , begin : "\\$\\{" ,
end : "\\}" , keywords : l , contains : [ ] } , u = { begin : "html`" , end : "" , starts : { end : "`" ,
returnEnd : ! 1 , contains : [ i . BACKSLASH _ESCAPE , E ] , subLanguage : "xml" } } , _ = {
begin : "css`" , end : "" , starts : { end : "`" , returnEnd : ! 1 ,
contains : [ i . BACKSLASH _ESCAPE , E ] , subLanguage : "css" } } , m = { className : "string" ,
begin : "`" , end : "`" , contains : [ i . BACKSLASH _ESCAPE , E ] } , y = { className : "comment" ,
variants : [ i . COMMENT ( /\/\*\*(?!\/)/ , "\\*/" , { relevance : 0 , contains : [ {
className : "doctag" , begin : "@[A-Za-z]+" , contains : [ { className : "type" , begin : "\\{" ,
end : "\\}" , relevance : 0 } , { className : "variable" , begin : c + "(?=\\s*(-)|$)" ,
endsParent : ! 0 , relevance : 0 } , { begin : /(?=[^\n])\s/ , relevance : 0 } ] } ]
} ) , i . C _BLOCK _COMMENT _MODE , i . C _LINE _COMMENT _MODE ]
} , N = [ i . APOS _STRING _MODE , i . QUOTE _STRING _MODE , u , _ , m , d , i . REGEXP _MODE ]
; E . contains = N . concat ( { begin : /\{/ , end : /\}/ , keywords : l , contains : [ "self" ] . concat ( N )
} ) ; const A = [ ] . concat ( y , E . contains ) , f = A . concat ( [ { begin : /\(/ , end : /\)/ , keywords : l ,
contains : [ "self" ] . concat ( A ) } ] ) , p = { className : "params" , begin : /\(/ , end : /\)/ ,
excludeBegin : ! 0 , excludeEnd : ! 0 , keywords : l , contains : f } ; return { name : "Javascript" ,
aliases : [ "js" , "jsx" , "mjs" , "cjs" ] , keywords : l , exports : { PARAMS _CONTAINS : f } ,
illegal : /#(?![$_A-z])/ , contains : [ i . SHEBANG ( { label : "shebang" , binary : "node" ,
relevance : 5 } ) , { label : "use_strict" , className : "meta" , relevance : 10 ,
begin : /^\s*['"]use (strict|asm)['"]/
} , i . APOS _STRING _MODE , i . QUOTE _STRING _MODE , u , _ , m , y , d , {
begin : t ( /[{,\n]\s*/ , r ( t ( /(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/ , c + "\\s*:" ) ) ) ,
relevance : 0 , contains : [ { className : "attr" , begin : c + r ( "\\s*:" ) , relevance : 0 } ] } , {
begin : "(" + i . RE _STARTERS _RE + "|\\b(case|return|throw)\\b)\\s*" ,
keywords : "return throw case" , contains : [ y , i . REGEXP _MODE , { className : "function" ,
begin : "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + i . UNDERSCORE _IDENT _RE + ")\\s*=>" ,
returnBegin : ! 0 , end : "\\s*=>" , contains : [ { className : "params" , variants : [ {
begin : i . UNDERSCORE _IDENT _RE , relevance : 0 } , { className : null , begin : /\(\s*\)/ , skip : ! 0
} , { begin : /\(/ , end : /\)/ , excludeBegin : ! 0 , excludeEnd : ! 0 , keywords : l , contains : f } ] } ]
} , { begin : /,/ , relevance : 0 } , { className : "" , begin : /\s/ , end : /\s*/ , skip : ! 0 } , {
variants : [ { begin : "<>" , end : "</>" } , { begin : o . begin , "on:begin" : o . isTrulyOpeningTag ,
end : o . end } ] , subLanguage : "xml" , contains : [ { begin : o . begin , end : o . end , skip : ! 0 ,
contains : [ "self" ] } ] } ] , relevance : 0 } , { className : "function" ,
beginKeywords : "function" , end : /[{;]/ , excludeEnd : ! 0 , keywords : l ,
contains : [ "self" , i . inherit ( i . TITLE _MODE , { begin : c } ) , p ] , illegal : /%/ } , {
beginKeywords : "while if switch catch for" } , { className : "function" ,
begin : i . UNDERSCORE _IDENT _RE + "\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{" ,
returnBegin : ! 0 , contains : [ p , i . inherit ( i . TITLE _MODE , { begin : c } ) ] } , { variants : [ {
begin : "\\." + c } , { begin : "\\$" + c } ] , relevance : 0 } , { className : "class" ,
beginKeywords : "class" , end : /[{;=]/ , excludeEnd : ! 0 , illegal : /[:"[\]]/ , contains : [ {
beginKeywords : "extends" } , i . UNDERSCORE _TITLE _MODE ] } , { begin : /\b(?=constructor)/ ,
end : /[{;]/ , excludeEnd : ! 0 , contains : [ i . inherit ( i . TITLE _MODE , { begin : c } ) , "self" , p ]
} , { begin : "(get|set)\\s+(?=" + c + "\\()" , end : /\{/ , keywords : "get set" ,
contains : [ i . inherit ( i . TITLE _MODE , { begin : c } ) , { begin : /\(\)/ } , p ] } , { begin : /\$[(.]/ } ]
} } } ) ( ) ) ;
hljs . registerLanguage ( "sql" , ( ( ) => { "use strict" ; function e ( e ) {
return e ? "string" == typeof e ? e : e . source : null } function r ( ... r ) {
return r . map ( ( r => e ( r ) ) ) . join ( "" ) } function t ( ... r ) {
return "(" + r . map ( ( r => e ( r ) ) ) . join ( "|" ) + ")" } return e => {
const n = e . COMMENT ( "--" , "$" ) , a = [ "true" , "false" , "unknown" ] , i = [ "bigint" , "binary" , "blob" , "boolean" , "char" , "character" , "clob" , "date" , "dec" , "decfloat" , "decimal" , "float" , "int" , "integer" , "interval" , "nchar" , "nclob" , "national" , "numeric" , "real" , "row" , "smallint" , "time" , "timestamp" , "varchar" , "varying" , "varbinary" ] , s = [ "abs" , "acos" , "array_agg" , "asin" , "atan" , "avg" , "cast" , "ceil" , "ceiling" , "coalesce" , "corr" , "cos" , "cosh" , "count" , "covar_pop" , "covar_samp" , "cume_dist" , "dense_rank" , "deref" , "element" , "exp" , "extract" , "first_value" , "floor" , "json_array" , "json_arrayagg" , "json_exists" , "json_object" , "json_objectagg" , "json_query" , "json_table" , "json_table_primitive" , "json_value" , "lag" , "last_value" , "lead" , "listagg" , "ln" , "log" , "log10" , "lower" , "max" , "min" , "mod" , "nth_value" , "ntile" , "nullif" , "percent_rank" , "percentile_cont" , "percentile_disc" , "position" , "position_regex" , "power" , "rank" , "regr_avgx" , "regr_avgy" , "regr_count" , "regr_intercept" , "regr_r2" , "regr_slope" , "regr_sxx" , "regr_sxy" , "regr_syy" , "row_number" , "sin" , "sinh" , "sqrt" , "stddev_pop" , "stddev_samp" , "substring" , "substring_regex" , "sum" , "tan" , "tanh" , "translate" , "translate_regex" , "treat" , "trim" , "trim_array" , "unnest" , "upper" , "value_of" , "var_pop" , "var_samp" , "width_bucket" ] , o = [ "create table" , "insert into" , "primary key" , "foreign key" , "not null" , "alter table" , "add constraint" , "grouping sets" , "on overflow" , "character set" , "respect nulls" , "ignore nulls" , "nulls first" , "nulls last" , "depth first" , "breadth first" ] , c = s , l = [ "abs" , "acos" , "all" , "allocate" , "alter" , "and" , "any" , "are" , "array" , "array_agg" , "array_max_cardinality" , "as" , "asensitive" , "asin" , "asymmetric" , "at" , "atan" , "atomic" , "authorization" , "avg" , "begin" , "begin_frame" , "begin_partition" , "between" , "bigint" , "binary" , "blob" , "boolean" , "both" , "by" , "call" , "called" , "cardinality" , "cascaded" , "case" , "cast" , "ceil" , "ceiling" , "char" , "char_length" , "character" , "character_length" , "check" , "classifier" , "clob" , "close" , "coalesce" , "collate" , "collect" , "column" , "commit" , "condition" , "connect" , "constraint" , "contains" , "convert" , "copy" , "corr" , "corresponding" , "cos" , "cosh" , "count" , "covar_pop" , "covar_samp" , "create" , "cross" , "cube" , "cume_dist" , "current" , "current_catalog" , "current_date" , "current_default_transform_group" , "current_path" , "current_role" , "current_row" , "current_schema" , "current_time" , "current_timestamp" , "current_path" , "current_role" , "current_transform_group_for_type" , "current_user" , "cursor" , "cycle" , "date" , "day" , "deallocate" , "dec" , "decimal" , "decfloat" , "declare" , "default" , "define" , "delete" , "dense_rank" , "deref" , "describe" , "deterministic" , "disconnect" , "distinct" , "double" , "drop" , "dynamic" , "each" , "element" , "else" , "empty" , "end" , "end_frame" , "end_partition" , "end-exec" , "equals" , "escape" , "every" , "except" , "exec" , "execute" , "exists" , "exp" , "external" , "extract" , "false" , "fetch" , "filter" , "first_value" , "float" , "floor" , "for" , "foreign" , "frame_row" , "free" , "from" , "full" , "function" , "fusion" , "get" , "global" , "grant" , "group" , "grouping" , "groups" , "having" , "hold" , "hour" , "identity" , "in" , "indicator" , "initial" , "inner" , "inout" , "insensitive" , "insert" , "int" , "integer" , "intersect" , "intersection" , "interval" , "into" , "is" , "join" , "json_array" , "json_arrayagg" , "json_exists" , "json_object" , "json_objectagg" , "json_query" , "json_table" , "json_table_primitive" , "json_value" , "lag" , "language" , "large" , "last_value" , "lateral" , "lead" , "leading" , "left" , "like" , "like_regex" , "listagg" , "ln" , "local" , "localtime" , "localtimestamp" , "log" , "log10" , "lower" , "match" , "match_number" , "match_recognize" , "matches" , "max" , "member" , "merge" , "method" , "min" , "minute" , "mod" , "modifies" , "module" , "month" , "multiset" , "national" , "natural" , "nchar" , "nclob" , "new" , "no" , "none" , "normalize" , "not" , "nth_value" , "ntile" , "null" , "nullif" , "numeric" , "octet_length" , "occurrences_regex" , "of" , "offset" , "old" , "omit" , "on" , "one" , "only" , "open" , "or" , "order" , "out" , "outer" , "over" , "overlaps" , "overlay" , "parameter" , "partition" , "pattern" , "per" , "percent" , "percent_rank" , "percentile_cont" , "percentile_disc" , "period" , "portion" , "position" , "position_regex" , "power" , "precedes" , "precision" , "prepare" , "primary" , "procedure" , "ptf" , "range" , "rank" , "reads" , "real" , "recursive" , "ref" , "references" , "referencing" , "regr_avgx" , "regr_avgy" ,
begin : r ( /\b/ , t ( ... c ) , /\s*\(/ ) , keywords : { built _in : c } } ; return { name : "SQL" ,
case _insensitive : ! 0 , illegal : /[{}]|<\// , keywords : { $pattern : /\b[\w\.]+/ ,
keyword : ( ( e , { exceptions : r , when : t } = { } ) => { const n = t
; return r = r || [ ] , e . map ( ( e => e . match ( /\|\d+$/ ) || r . includes ( e ) ? e : n ( e ) ? e + "|0" : e ) )
} ) ( l , { when : e => e . length < 3 } ) , literal : a , type : i ,
built _in : [ "current_catalog" , "current_date" , "current_default_transform_group" , "current_path" , "current_role" , "current_schema" , "current_transform_group_for_type" , "current_user" , "session_user" , "system_time" , "system_user" , "current_time" , "localtime" , "current_timestamp" , "localtimestamp" ]
} , contains : [ { begin : t ( ... o ) , keywords : { $pattern : /[\w\.]+/ , keyword : l . concat ( o ) ,
literal : a , type : i } } , { className : "type" ,
begin : t ( "double precision" , "large object" , "with timezone" , "without timezone" )
} , u , { className : "variable" , begin : /@[a-z0-9]+/ } , { className : "string" , variants : [ {
begin : /'/ , end : /'/ , contains : [ { begin : /''/ } ] } ] } , { begin : /"/ , end : /"/ , contains : [ {
begin : /""/ } ] } , e . C _NUMBER _MODE , e . C _BLOCK _COMMENT _MODE , n , { className : "operator" ,
begin : /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/ , relevance : 0 } ] } } } ) ( ) ) ;
hljs . registerLanguage ( "ruby" , ( ( ) => { "use strict" ; function e ( ... e ) {
return e . map ( ( e => { return ( n = e ) ? "string" == typeof n ? n : n . source : null ; var n
} ) ) . join ( "" ) } return n => {
const a = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)" , i = {
keyword : "and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__" ,
built _in : "proc lambda" , literal : "true false nil" } , s = { className : "doctag" ,
begin : "@[A-Za-z]+" } , r = { begin : "#<" , end : ">" } , b = [ n . COMMENT ( "#" , "$" , { contains : [ s ]
} ) , n . COMMENT ( "^=begin" , "^=end" , { contains : [ s ] , relevance : 10
} ) , n . COMMENT ( "^__END__" , "\\n$" ) ] , c = { className : "subst" , begin : /#\{/ , end : /\}/ ,
keywords : i } , t = { className : "string" , contains : [ n . BACKSLASH _ESCAPE , c ] , variants : [ {
begin : /'/ , end : /'/ } , { begin : /"/ , end : /"/ } , { begin : /`/ , end : /`/ } , { begin : /%[qQwWx]?\(/ ,
end : /\)/ } , { begin : /%[qQwWx]?\[/ , end : /\]/ } , { begin : /%[qQwWx]?\{/ , end : /\}/ } , {
begin : /%[qQwWx]?</ , end : />/ } , { begin : /%[qQwWx]?\// , end : /\// } , { begin : /%[qQwWx]?%/ ,
end : /%/ } , { begin : /%[qQwWx]?-/ , end : /-/ } , { begin : /%[qQwWx]?\|/ , end : /\|/ } , {
begin : /\B\?(\\\d{1,3})/ } , { begin : /\B\?(\\x[A-Fa-f0-9]{1,2})/ } , {
begin : /\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/ } , {
begin : /\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/ } , {
begin : /\B\?\\(c|C-)[\x20-\x7e]/ } , { begin : /\B\?\\?\S/ } , {
begin : /<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/ , returnBegin : ! 0 , contains : [ {
begin : /<<[-~]?'?/ } , n . END _SAME _AS _BEGIN ( { begin : /(\w+)/ , end : /(\w+)/ ,
contains : [ n . BACKSLASH _ESCAPE , c ] } ) ] } ] } , g = "[0-9](_?[0-9])*" , d = { className : "number" ,
relevance : 0 , variants : [ {
begin : ` \\ b([1-9](_?[0-9])*|0)( \\ .( ${ g } ))?([eE][+-]?( ${ g } )|r)?i? \\ b ` } , {
begin : "\\b0[dD][0-9](_?[0-9])*r?i?\\b" } , { begin : "\\b0[bB][0-1](_?[0-1])*r?i?\\b"
} , { begin : "\\b0[oO][0-7](_?[0-7])*r?i?\\b" } , {
begin : "\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b" } , {
begin : "\\b0(_?[0-7])+r?i?\\b" } ] } , l = { className : "params" , begin : "\\(" , end : "\\)" ,
endsParent : ! 0 , keywords : i } , o = [ t , { className : "class" , beginKeywords : "class module" ,
end : "$|;" , illegal : /=/ , contains : [ n . inherit ( n . TITLE _MODE , {
begin : "[A-Za-z_]\\w*(::\\w+)*(\\?|!)?" } ) , { begin : "<\\s*" , contains : [ {
begin : "(" + n . IDENT _RE + "::)?" + n . IDENT _RE , relevance : 0 } ] } ] . concat ( b ) } , {
className : "function" , begin : e ( /def\s*/ , ( _ = a + "\\s*(\\(|;|$)" , e ( "(?=" , _ , ")" ) ) ) ,
relevance : 0 , keywords : "def" , end : "$|;" , contains : [ n . inherit ( n . TITLE _MODE , { begin : a
} ) , l ] . concat ( b ) } , { begin : n . IDENT _RE + "::" } , { className : "symbol" ,
begin : n . UNDERSCORE _IDENT _RE + "(!|\\?)?:" , relevance : 0 } , { className : "symbol" ,
begin : ":(?!\\s)" , contains : [ t , { begin : a } ] , relevance : 0 } , d , { className : "variable" ,
begin : "(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])" } , {
className : "params" , begin : /\|/ , end : /\|/ , relevance : 0 , keywords : i } , {
begin : "(" + n . RE _STARTERS _RE + "|unless)\\s*" , keywords : "unless" , contains : [ {
className : "regexp" , contains : [ n . BACKSLASH _ESCAPE , c ] , illegal : /\n/ , variants : [ {
begin : "/" , end : "/[a-z]*" } , { begin : /%r\{/ , end : /\}[a-z]*/ } , { begin : "%r\\(" ,
end : "\\)[a-z]*" } , { begin : "%r!" , end : "![a-z]*" } , { begin : "%r\\[" , end : "\\][a-z]*" } ]
} ] . concat ( r , b ) , relevance : 0 } ] . concat ( r , b ) ; var _ ; c . contains = o , l . contains = o
; const E = [ { begin : /^\s*=>/ , starts : { end : "$" , contains : o } } , { className : "meta" ,
begin : "^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])" ,
starts : { end : "$" , contains : o } } ] ; return b . unshift ( r ) , { name : "Ruby" ,
aliases : [ "rb" , "gemspec" , "podspec" , "thor" , "irb" ] , keywords : i , illegal : /\/\*/ ,
contains : [ n . SHEBANG ( { binary : "ruby" } ) ] . concat ( E ) . concat ( b ) . concat ( o ) } } } ) ( ) ) ;