2016-07-30 04:25:24 +00:00
! function ( e ) { if ( "object" == typeof exports && "object" == typeof module ) module . exports = e ( ) ; else { if ( "function" == typeof define && define . amd ) return define ( [ ] , e ) ; ( this || window ) . CodeMirror = e ( ) } } ( function ( ) { "use strict" ; function e ( r , n ) { if ( ! ( this instanceof e ) ) return new e ( r , n ) ; this . options = n = n ? Di ( n ) : { } , Di ( ra , n , ! 1 ) , p ( n ) ; var i = n . value ; "string" == typeof i && ( i = new Ma ( i , n . mode , null , n . lineSeparator ) ) , this . doc = i ; var o = new e . inputStyles [ n . inputStyle ] ( this ) , a = this . display = new t ( r , i , o ) ; a . wrapper . CodeMirror = this , c ( this ) , s ( this ) , n . lineWrapping && ( this . display . wrapper . className += " CodeMirror-wrap" ) , n . autofocus && ! Oo && a . input . focus ( ) , v ( this ) , this . state = { keyMaps : [ ] , overlays : [ ] , modeGen : 0 , overwrite : ! 1 , delayingBlurEvent : ! 1 , focused : ! 1 , suppressEdits : ! 1 , pasteIncoming : ! 1 , cutIncoming : ! 1 , selectingText : ! 1 , draggingText : ! 1 , highlight : new zi , keySeq : null , specialChars : null } ; var l = this ; xo && wo < 11 && setTimeout ( function ( ) { l . display . input . reset ( ! 0 ) } , 20 ) , $t ( this ) , Yi ( ) , wt ( this ) , this . curOp . forceUpdate = ! 0 , Qn ( this , i ) , n . autofocus && ! Oo || l . hasFocus ( ) ? setTimeout ( Bi ( yr , this ) , 20 ) : br ( this ) ; for ( var u in na ) na . hasOwnProperty ( u ) && na [ u ] ( this , n [ u ] , ia ) ; w ( this ) , n . finishInit && n . finishInit ( this ) ; for ( var f = 0 ; f < la . length ; ++ f ) la [ f ] ( this ) ; Ct ( this ) , _o && n . lineWrapping && "optimizelegibility" == getComputedStyle ( a . lineDiv ) . textRendering && ( a . lineDiv . style . textRendering = "auto" ) } function t ( e , t , r ) { var n = this ; this . input = r , n . scrollbarFiller = $i ( "div" , null , "CodeMirror-scrollbar-filler" ) , n . scrollbarFiller . setAttribute ( "cm-not-content" , "true" ) , n . gutterFiller = $i ( "div" , null , "CodeMirror-gutter-filler" ) , n . gutterFiller . setAttribute ( "cm-not-content" , "true" ) , n . lineDiv = $i ( "div" , null , "CodeMirror-code" ) , n . selectionDiv = $i ( "div" , null , null , "position: relative; z-index: 1" ) , n . cursorDiv = $i ( "div" , null , "CodeMirror-cursors" ) , n . measure = $i ( "div" , null , "CodeMirror-measure" ) , n . lineMeasure = $i ( "div" , null , "CodeMirror-measure" ) , n . lineSpace = $i ( "div" , [ n . measure , n . lineMeasure , n . selectionDiv , n . cursorDiv , n . lineDiv ] , null , "position: relative; outline: none" ) , n . mover = $i ( "div" , [ $i ( "div" , [ n . lineSpace ] , "CodeMirror-lines" ) ] , null , "position: relative" ) , n . sizer = $i ( "div" , [ n . mover ] , "CodeMirror-sizer" ) , n . sizerWidth = null , n . heightForcer = $i ( "div" , null , null , "position: absolute; height: " + Ra + "px; width: 1px;" ) , n . gutters = $i ( "div" , null , "CodeMirror-gutters" ) , n . lineGutter = null , n . scroller = $i ( "div" , [ n . sizer , n . heightForcer , n . gutters ] , "CodeMirror-scroll" ) , n . scroller . setAttribute ( "tabIndex" , "-1" ) , n . wrapper = $i ( "div" , [ n . scrollbarFiller , n . gutterFiller , n . scroller ] , "CodeMirror" ) , xo && wo < 8 && ( n . gutters . style . zIndex = - 1 , n . scroller . style . paddingRight = 0 ) , _o || yo && Oo || ( n . scroller . draggable = ! 0 ) , e && ( e . appendChild ? e . appendChild ( n . wrapper ) : e ( n . wrapper ) ) , n . viewFrom = n . viewTo = t . first , n . reportedViewFrom = n . reportedViewTo = t . first , n . view = [ ] , n . renderedView = null , n . externalMeasured = null , n . viewOffset = 0 , n . lastWrapHeight = n . lastWrapWidth = 0 , n . updateLineNumbers = null , n . nativeBarWidth = n . barHeight = n . barWidth = 0 , n . scrollbarsClipped = ! 1 , n . lineNumWidth = n . lineNumInnerWidth = n . lineNumChars = null , n . alignWidgets = ! 1 , n . cachedCharWidth = n . cachedTextHeight = n . cachedPaddingH = null , n . maxLine = null , n . maxLineLength = 0 , n . maxLineChanged = ! 1 , n . wheelDX = n . wheelDY = n . wheelStartX = n . wheelStartY = null , n . shift = ! 1 , n . selForContextMenu = null , n . activeTouch = null , r . init ( n ) } function r ( t ) { t . doc . mode = e . getMode ( t . options , t . doc . modeOption ) , n ( t ) } function n ( e ) { e . doc . iter ( function ( e ) { e . stateAfter && ( e . stateAfter = null ) , e . styles && ( e . styles = null ) } ) , e . doc . frontier = e . doc . first , Be ( e , 100 ) , e . state . modeGen ++ , e . curOp && Rt ( e ) } function i ( e ) { e . options . lineWrapping ? ( es ( e . display . wrapper , "CodeMirror-wrap" ) , e . display . sizer . style . minWidth = "" , e . display . sizerWidth = null ) : ( Ja ( e . display . wrapper , "CodeMirror-wrap" ) , d ( e ) ) , a ( e ) , Rt ( e ) , ct ( e ) , setTimeout ( function ( ) { y ( e ) } , 100 ) } function o ( e ) { var t = kt ( e . display ) , r = e . options . lineWrapping , n = r && Math . max ( 5 , e . display . scroller . clientWidth / xt ( e . display ) - 3 ) ; return function ( i ) { if ( Cn ( e . doc , i ) ) return 0 ; var o = 0 ; if ( i . widgets ) for ( var a = 0 ; a < i . widgets . length ; a ++ ) i . widgets [ a ] . height && ( o += i . widgets [ a ] . height ) ; return r ? o + ( Math . ceil ( i . text . length / n ) || 1 ) * t : o + t } } function a ( e ) { var t = e . doc , r = o ( e ) ; t . iter ( function ( e ) { var t = r ( e ) ; t != e . height && ri ( e , t ) } ) } function s ( e ) { e . d
o = ot ( e , t , r , n ) , o . bogus || ( t . cache [ a ] = o ) ) , { left : o . left , right : o . right , top : i ? o . rtop : o . top , bottom : i ? o . rbottom : o . bottom } } function nt ( e , t , r ) { for ( var n , i , o , a , s = 0 ; s < e . length ; s += 3 ) { var l = e [ s ] , c = e [ s + 1 ] ; if ( t < l ? ( i = 0 , o = 1 , a = "left" ) : t < c ? ( i = t - l , o = i + 1 ) : ( s == e . length - 3 || t == c && e [ s + 3 ] > t ) && ( o = c - l , i = o - 1 , t >= c && ( a = "right" ) ) , null != i ) { if ( n = e [ s + 2 ] , l == c && r == ( n . insertLeft ? "left" : "right" ) && ( a = r ) , "left" == r && 0 == i ) for ( ; s && e [ s - 2 ] == e [ s - 3 ] && e [ s - 1 ] . insertLeft ; ) n = e [ ( s -= 3 ) + 2 ] , a = "left" ; if ( "right" == r && i == c - l ) for ( ; s < e . length - 3 && e [ s + 3 ] == e [ s + 4 ] && ! e [ s + 5 ] . insertLeft ; ) n = e [ ( s += 3 ) + 2 ] , a = "right" ; break } } return { node : n , start : i , end : o , collapse : a , coverStart : l , coverEnd : c } } function it ( e , t ) { var r = Ko ; if ( "left" == t ) for ( var n = 0 ; n < e . length && ( r = e [ n ] ) . left == r . right ; n ++ ) ; else for ( var n = e . length - 1 ; n >= 0 && ( r = e [ n ] ) . left == r . right ; n -- ) ; return r } function ot ( e , t , r , n ) { var i , o = nt ( t . map , r , n ) , a = o . node , s = o . start , l = o . end , c = o . collapse ; if ( 3 == a . nodeType ) { for ( var u = 0 ; u < 4 ; u ++ ) { for ( ; s && Hi ( t . line . text . charAt ( o . coverStart + s ) ) ; ) -- s ; for ( ; o . coverStart + l < o . coverEnd && Hi ( t . line . text . charAt ( o . coverStart + l ) ) ; ) ++ l ; if ( i = xo && wo < 9 && 0 == s && l == o . coverEnd - o . coverStart ? a . parentNode . getBoundingClientRect ( ) : it ( Ka ( a , s , l ) . getClientRects ( ) , n ) , i . left || i . right || 0 == s ) break ; l = s , s -= 1 , c = "right" } xo && wo < 11 && ( i = at ( e . display . measure , i ) ) } else { s > 0 && ( c = n = "right" ) ; var f ; i = e . options . lineWrapping && ( f = a . getClientRects ( ) ) . length > 1 ? f [ "right" == n ? f . length - 1 : 0 ] : a . getBoundingClientRect ( ) } if ( xo && wo < 9 && ! s && ( ! i || ! i . left && ! i . right ) ) { var d = a . parentNode . getClientRects ( ) [ 0 ] ; i = d ? { left : d . left , right : d . left + xt ( e . display ) , top : d . top , bottom : d . bottom } : Ko } for ( var p = i . top - t . rect . top , h = i . bottom - t . rect . top , m = ( p + h ) / 2 , g = t . view . measure . heights , u = 0 ; u < g . length - 1 && ! ( m < g [ u ] ) ; u ++ ) ; var v = u ? g [ u - 1 ] : 0 , y = g [ u ] , b = { left : ( "right" == c ? i . right : i . left ) - t . rect . left , right : ( "left" == c ? i . left : i . right ) - t . rect . left , top : v , bottom : y } ; return i . left || i . right || ( b . bogus = ! 0 ) , e . options . singleCursorHeightPerLine || ( b . rtop = p , b . rbottom = h ) , b } function at ( e , t ) { if ( ! window . screen || null == screen . logicalXDPI || screen . logicalXDPI == screen . deviceXDPI || ! to ( e ) ) return t ; var r = screen . logicalXDPI / screen . deviceXDPI , n = screen . logicalYDPI / screen . deviceYDPI ; return { left : t . left * r , right : t . right * r , top : t . top * n , bottom : t . bottom * n } } function st ( e ) { if ( e . measure && ( e . measure . cache = { } , e . measure . heights = null , e . rest ) ) for ( var t = 0 ; t < e . rest . length ; t ++ ) e . measure . caches [ t ] = { } } function lt ( e ) { e . display . externalMeasure = null , Ui ( e . display . lineMeasure ) ; for ( var t = 0 ; t < e . display . view . length ; t ++ ) st ( e . display . view [ t ] ) } function ct ( e ) { lt ( e ) , e . display . cachedCharWidth = e . display . cachedTextHeight = e . display . cachedPaddingH = null , e . options . lineWrapping || ( e . display . maxLineChanged = ! 0 ) , e . display . lineNumChars = null } function ut ( ) { return window . pageXOffset || ( document . documentElement || document . body ) . scrollLeft } function ft ( ) { return window . pageYOffset || ( document . documentElement || document . body ) . scrollTop } function dt ( e , t , r , n ) { if ( t . widgets ) for ( var i = 0 ; i < t . widgets . length ; ++ i ) if ( t . widgets [ i ] . above ) { var o = Ln ( t . widgets [ i ] ) ; r . top += o , r . bottom += o } if ( "line" == n ) return r ; n || ( n = "local" ) ; var a = oi ( t ) ; if ( "local" == n ? a += $e ( e . display ) : a -= e . display . viewOffset , "page" == n || "window" == n ) { var s = e . display . lineSpace . getBoundingClientRect ( ) ; a += s . top + ( "window" == n ? 0 : ft ( ) ) ; var l = s . left + ( "window" == n ? 0 : ut ( ) ) ; r . left += l , r . right += l } return r . top += a , r . bottom += a , r } function pt ( e , t , r ) { if ( "div" == r ) return t ; var n = t . left , i = t . top ; if ( "page" == r ) n -= ut ( ) , i -= ft ( ) ; else if ( "local" == r || ! r ) { var o = e . display . sizer . getBoundingClientRect ( ) ; n += o . left , i += o . top } var a = e . display . lineSpace . getBoundingClientRect ( ) ; return { left : n - a . left , top : i - a . top } } function ht ( e , t , r , n , i ) { return n || ( n = Jn ( e . doc , t . line ) ) , dt ( e , n , Je ( e , n , t . ch , i ) , r ) } function mt ( e , t , r , n , i , o ) { function a ( t , a ) { var s = rt ( e , i , t , a ? "right" : "left" , o ) ; return a ? s . left = s . right : s . right = s . left , dt ( e , n , s , r ) } function s ( e , t ) { var r = l [ t ] , n = r . level % 2 ; return e == no ( r ) && t && r . level < l [ t - 1 ] . level ? ( r = l [ -- t ] , e = io ( r ) - ( r . level % 2 ? 0 : 1 ) , n = ! 0 ) : e == io ( r ) && t < l . length - 1 && r . level < l [ t + 1 ] . level && ( r = l [ ++ t ] , e = no ( r ) - r . level % 2 , n = ! 1 ) , n && e == r . to && e > r . from ? a ( e - 1 ) : a ( e , n ) } n = n || Jn ( e . doc , t . line ) , i || ( i = tt ( e , n ) ) ; var l = ai ( n ) , c = t . ch ; if ( ! l ) return a ( c ) ; var u = fo ( l , c ) , f = s ( c , u ) ; return null != ls && ( f . other = s ( c , ls ) ) , f } function gt ( e , t ) { var r = 0 , t = ge ( e . doc , t ) ; e
} var h = e . curOp && null != e . curOp . scrollLeft ? e . curOp . scrollLeft : o . scroller . scrollLeft , m = Ge ( e ) - ( e . options . fixedGutter ? o . gutters . offsetWidth : 0 ) , g = n - t > m ; return g && ( n = t + m ) , t < 10 ? c . scrollLeft = 0 : t < h ? c . scrollLeft = Math . max ( 0 , t - ( g ? 0 : 10 ) ) : n > m + h - 3 && ( c . scrollLeft = n + ( g ? 0 : 10 ) - m ) , c } function jr ( e , t , r ) { null == t && null == r || Br ( e ) , null != t && ( e . curOp . scrollLeft = ( null == e . curOp . scrollLeft ? e . doc . scrollLeft : e . curOp . scrollLeft ) + t ) , null != r && ( e . curOp . scrollTop = ( null == e . curOp . scrollTop ? e . doc . scrollTop : e . curOp . scrollTop ) + r ) } function Dr ( e ) { Br ( e ) ; var t = e . getCursor ( ) , r = t , n = t ; e . options . lineWrapping || ( r = t . ch ? Bo ( t . line , t . ch - 1 ) : t , n = Bo ( t . line , t . ch + 1 ) ) , e . curOp . scrollToPos = { from : r , to : n , margin : e . options . cursorScrollMargin , isCursor : ! 0 } } function Br ( e ) { var t = e . curOp . scrollToPos ; if ( t ) { e . curOp . scrollToPos = null ; var r = gt ( e , t . from ) , n = gt ( e , t . to ) , i = Rr ( e , Math . min ( r . left , n . left ) , Math . min ( r . top , n . top ) - t . margin , Math . max ( r . right , n . right ) , Math . max ( r . bottom , n . bottom ) + t . margin ) ; e . scrollTo ( i . scrollLeft , i . scrollTop ) } } function Fr ( e , t , r , n ) { var i , o = e . doc ; null == r && ( r = "add" ) , "smart" == r && ( o . mode . indent ? i = He ( e , t ) : r = "prev" ) ; var a = e . options . tabSize , s = Jn ( o , t ) , l = Wa ( s . text , null , a ) ; s . stateAfter && ( s . stateAfter = null ) ; var c , u = s . text . match ( /^\s*/ ) [ 0 ] ; if ( n || /\S/ . test ( s . text ) ) { if ( "smart" == r && ( c = o . mode . indent ( i , s . text . slice ( u . length ) , s . text ) , c == ja || c > 150 ) ) { if ( ! n ) return ; r = "prev" } } else c = 0 , r = "not" ; "prev" == r ? c = t > o . first ? Wa ( Jn ( o , t - 1 ) . text , null , a ) : 0 : "add" == r ? c = l + e . options . indentUnit : "subtract" == r ? c = l - e . options . indentUnit : "number" == typeof r && ( c = l + r ) , c = Math . max ( 0 , c ) ; var f = "" , d = 0 ; if ( e . options . indentWithTabs ) for ( var p = Math . floor ( c / a ) ; p ; -- p ) d += a , f += "\t" ; if ( d < c && ( f += Ii ( c - d ) ) , f != u ) return Ir ( o , f , Bo ( t , 0 ) , Bo ( t , u . length ) , "+input" ) , s . stateAfter = null , ! 0 ; for ( var p = 0 ; p < o . sel . ranges . length ; p ++ ) { var h = o . sel . ranges [ p ] ; if ( h . head . line == t && h . head . ch < u . length ) { var d = Bo ( t , u . length ) ; _e ( o , p , new de ( d , d ) ) ; break } } } function Wr ( e , t , r , n ) { var i = t , o = t ; return "number" == typeof t ? o = Jn ( e , me ( e , t ) ) : i = ni ( t ) , null == i ? null : ( n ( o , i ) && e . cm && jt ( e . cm , i , r ) , o ) } function Hr ( e , t ) { for ( var r = e . doc . sel . ranges , n = [ ] , i = 0 ; i < r . length ; i ++ ) { for ( var o = t ( r [ i ] ) ; n . length && Fo ( o . from , Ni ( n ) . to ) <= 0 ; ) { var a = n . pop ( ) ; if ( Fo ( a . from , o . from ) < 0 ) { o . from = a . from ; break } } n . push ( o ) } Ot ( e , function ( ) { for ( var t = n . length - 1 ; t >= 0 ; t -- ) Ir ( e . doc , "" , n [ t ] . from , n [ t ] . to , "+delete" ) ; Dr ( e ) } ) } function $r ( e , t , r , n , i ) { function o ( ) { var t = s + r ; return ! ( t < e . first || t >= e . first + e . size ) && ( s = t , u = Jn ( e , t ) ) } function a ( e ) { var t = ( i ? ho : mo ) ( u , l , r , ! 0 ) ; if ( null == t ) { if ( e || ! o ( ) ) return ! 1 ; l = i ? ( r < 0 ? ao : oo ) ( u ) : r < 0 ? u . text . length : 0 } else l = t ; return ! 0 } var s = t . line , l = t . ch , c = r , u = Jn ( e , s ) ; if ( "char" == n ) a ( ) ; else if ( "column" == n ) a ( ! 0 ) ; else if ( "word" == n || "group" == n ) for ( var f = null , d = "group" == n , p = e . cm && e . cm . getHelper ( t , "wordChars" ) , h = ! 0 ; ! ( r < 0 ) || a ( ! h ) ; h = ! 1 ) { var m = u . text . charAt ( l ) || "\n" , g = Fi ( m , p ) ? "w" : d && "\n" == m ? "n" : ! d || /\s/ . test ( m ) ? null : "p" ; if ( ! d || h || g || ( g = "s" ) , f && f != g ) { r < 0 && ( r = 1 , a ( ) ) ; break } if ( g && ( f = g ) , r > 0 && ! a ( ! h ) ) break } var v = Ie ( e , Bo ( s , l ) , t , c , ! 0 ) ; return Fo ( t , v ) || ( v . hitSide = ! 0 ) , v } function Ur ( e , t , r , n ) { var i , o = e . doc , a = t . left ; if ( "page" == n ) { var s = Math . min ( e . display . wrapper . clientHeight , window . innerHeight || document . documentElement . clientHeight ) ; i = t . top + r * ( s - ( r < 0 ? 1.5 : . 5 ) * kt ( e . display ) ) } else "line" == n && ( i = r > 0 ? t . bottom + 3 : t . top - 3 ) ; for ( ; ; ) { var l = yt ( e , a , i ) ; if ( ! l . outside ) break ; if ( r < 0 ? i <= 0 : i >= o . height ) { l . hitSide = ! 0 ; break } i += 5 * r } return l } function Kr ( t , r , n , i ) { e . defaults [ t ] = r , n && ( na [ t ] = i ? function ( e , t , r ) { r != ia && n ( e , t , r ) } : n ) } function Vr ( e ) { for ( var t , r , n , i , o = e . split ( /-(?!$)/ ) , e = o [ o . length - 1 ] , a = 0 ; a < o . length - 1 ; a ++ ) { var s = o [ a ] ; if ( /^(cmd|meta|m)$/i . test ( s ) ) i = ! 0 ; else if ( /^a(lt)?$/i . test ( s ) ) t = ! 0 ; else if ( /^(c|ctrl|control)$/i . test ( s ) ) r = ! 0 ; else { if ( ! /^s(hift)$/i . test ( s ) ) throw new Error ( "Unrecognized modifier name: " + s ) ; n = ! 0 } } return t && ( e = "Alt-" + e ) , r && ( e = "Ctrl-" + e ) , i && ( e = "Cmd-" + e ) , n && ( e = "Shift-" + e ) , e } function Gr ( e ) { return "string" == typeof e ? pa [ e ] : e } function Xr ( e , t , r , n , i ) { if ( n && n . shared ) return Zr ( e , t , r , n , i ) ; if ( e . cm && ! e . cm . curOp ) return zt ( e . cm , Xr ) ( e , t , r , n , i ) ; var o = new ba ( e , i ) , a = Fo ( t , r ) ; if ( n && Di ( n , o , ! 1 ) , a > 0 || 0 == a && o . clearWhenEmpty !== ! 1 ) return o ; if ( o . replacedWith && ( o . collapsed = ! 0 , o . widgetNode = $i ( "span" , [ o . replacedWith ] , "CodeMirror-widget" ) , n . handleMouseEvents || o . widgetNode . setAttribute ( " cm - ignor
this . vert . scrollTop != e && ( this . vert . scrollTop = e ) , this . disableVert && this . enableZeroWidthBar ( this . vert , this . disableVert ) } , zeroWidthHack : function ( ) { var e = zo && ! To ? "12px" : "18px" ; this . horiz . style . height = this . vert . style . width = e , this . horiz . style . pointerEvents = this . vert . style . pointerEvents = "none" , this . disableHoriz = new zi , this . disableVert = new zi } , enableZeroWidthBar : function ( e , t ) { function r ( ) { var n = e . getBoundingClientRect ( ) , i = document . elementFromPoint ( n . left + 1 , n . bottom - 1 ) ; i != e ? e . style . pointerEvents = "none" : t . set ( 1e3 , r ) } e . style . pointerEvents = "auto" , t . set ( 1e3 , r ) } , clear : function ( ) { var e = this . horiz . parentNode ; e . removeChild ( this . horiz ) , e . removeChild ( this . vert ) } } , m . prototype ) , g . prototype = Di ( { update : function ( ) { return { bottom : 0 , right : 0 } } , setScrollLeft : function ( ) { } , setScrollTop : function ( ) { } , clear : function ( ) { } } , g . prototype ) , e . scrollbarModel = { "native" : m , "null" : g } , S . prototype . signal = function ( e , t ) { Ei ( e , t ) && this . events . push ( arguments ) } , S . prototype . finish = function ( ) { for ( var e = 0 ; e < this . events . length ; e ++ ) qa . apply ( null , this . events [ e ] ) } ; var Bo = e . Pos = function ( e , t ) { return this instanceof Bo ? ( this . line = e , void ( this . ch = t ) ) : new Bo ( e , t ) } , Fo = e . cmpPos = function ( e , t ) { return e . line - t . line || e . ch - t . ch } , Wo = null ; ne . prototype = Di ( { init : function ( e ) { function t ( e ) { if ( ! Ti ( n , e ) ) { if ( n . somethingSelected ( ) ) Wo = { lineWise : ! 1 , text : n . getSelections ( ) } , r . inaccurateSelection && ( r . prevInput = "" , r . inaccurateSelection = ! 1 , o . value = Wo . text . join ( "\n" ) , Ua ( o ) ) ; else { if ( ! n . options . lineWiseCopyCut ) return ; var t = te ( n ) ; Wo = { lineWise : ! 0 , text : t . text } , "cut" == e . type ? n . setSelections ( t . ranges , null , Da ) : ( r . prevInput = "" , o . value = t . text . join ( "\n" ) , Ua ( o ) ) } "cut" == e . type && ( n . state . cutIncoming = ! 0 ) } } var r = this , n = this . cm , i = this . wrapper = ie ( ) , o = this . textarea = i . firstChild ; e . wrapper . insertBefore ( i , e . wrapper . firstChild ) , Eo && ( o . style . width = "0px" ) , za ( o , "input" , function ( ) { xo && wo >= 9 && r . hasSelection && ( r . hasSelection = null ) , r . poll ( ) } ) , za ( o , "paste" , function ( e ) { Ti ( n , e ) || J ( e , n ) || ( n . state . pasteIncoming = ! 0 , r . fastPoll ( ) ) } ) , za ( o , "cut" , t ) , za ( o , "copy" , t ) , za ( e . scroller , "paste" , function ( t ) { Vt ( e , t ) || Ti ( n , t ) || ( n . state . pasteIncoming = ! 0 , r . focus ( ) ) } ) , za ( e . lineSpace , "selectstart" , function ( t ) { Vt ( e , t ) || Aa ( t ) } ) , za ( o , "compositionstart" , function ( ) { var e = n . getCursor ( "from" ) ; r . composing && r . composing . range . clear ( ) , r . composing = { start : e , range : n . markText ( e , n . getCursor ( "to" ) , { className : "CodeMirror-composing" } ) } } ) , za ( o , "compositionend" , function ( ) { r . composing && ( r . poll ( ) , r . composing . range . clear ( ) , r . composing = null ) } ) } , prepareSelection : function ( ) { var e = this . cm , t = e . display , r = e . doc , n = Pe ( e ) ; if ( e . options . moveInputWithCursor ) { var i = mt ( e , r . sel . primary ( ) . head , "div" ) , o = t . wrapper . getBoundingClientRect ( ) , a = t . lineDiv . getBoundingClientRect ( ) ; n . teTop = Math . max ( 0 , Math . min ( t . wrapper . clientHeight - 10 , i . top + a . top - o . top ) ) , n . teLeft = Math . max ( 0 , Math . min ( t . wrapper . clientWidth - 10 , i . left + a . left - o . left ) ) } return n } , showSelection : function ( e ) { var t = this . cm , r = t . display ; Ki ( r . cursorDiv , e . cursors ) , Ki ( r . selectionDiv , e . selection ) , null != e . teTop && ( this . wrapper . style . top = e . teTop + "px" , this . wrapper . style . left = e . teLeft + "px" ) } , reset : function ( e ) { if ( ! this . contextMenuPending ) { var t , r , n = this . cm , i = n . doc ; if ( n . somethingSelected ( ) ) { this . prevInput = "" ; var o = i . sel . primary ( ) ; t = os && ( o . to ( ) . line - o . from ( ) . line > 100 || ( r = n . getSelection ( ) ) . length > 1e3 ) ; var a = t ? "-" : r || n . getSelection ( ) ; this . composing || ( this . textarea . value = a ) , n . state . focused && Ua ( this . textarea ) , xo && wo >= 9 && ( this . hasSelection = a ) } else e || ( this . composing || ( this . prevInput = this . textarea . value = "" ) , xo && wo >= 9 && ( this . hasSelection = null ) ) ; this . inaccurateSelection = t } } , getField : function ( ) { return this . textarea } , supportsTouch : function ( ) { return ! 1 } , focus : function ( ) { if ( "nocursor" != this . cm . options . readOnly && ( ! Oo || Vi ( ) != this . textarea ) ) try { this . textarea . focus ( ) } catch ( e ) { } } , blur : function ( ) { this . textarea . blur ( ) } , resetPosition : function ( ) { this . wrapper . style . top = this . wrapper . style . left = 0 } , receivedFocus : function ( ) { this . slowPoll ( ) } , slowPoll : function ( ) { var e = this ; e . pollingFast || e . polling . set ( this . cm . options . pollInterval , function ( ) { e . poll ( ) , e . cm . state . focused && e . slowPoll ( ) } ) } , fastPoll : function ( ) { function e ( ) { var n = r . poll ( ) ; n || t ? ( r . pollingFast = ! 1 , r . slowPoll ( ) ) : ( t = ! 0 , r . polling . set ( 60 , e ) ) } var t = ! 1
if ( o ) if ( i . ch == o . length && ( i = new Bo ( i . line , i . ch - 1 ) ) , i . ch > 0 ) i = new Bo ( i . line , i . ch + 1 ) , e . replaceRange ( o . charAt ( i . ch - 1 ) + o . charAt ( i . ch - 2 ) , Bo ( i . line , i . ch - 2 ) , i , "+transpose" ) ; else if ( i . line > e . doc . first ) { var a = Jn ( e . doc , i . line - 1 ) . text ; a && e . replaceRange ( o . charAt ( 0 ) + e . doc . lineSeparator ( ) + a . charAt ( a . length - 1 ) , Bo ( i . line - 1 , a . length - 1 ) , Bo ( i . line , 1 ) , "+transpose" ) } r . push ( new de ( i , i ) ) } e . setSelections ( r ) } ) } , newlineAndIndent : function ( e ) { Ot ( e , function ( ) { for ( var t = e . listSelections ( ) . length , r = 0 ; r < t ; r ++ ) { var n = e . listSelections ( ) [ r ] ; e . replaceRange ( e . doc . lineSeparator ( ) , n . anchor , n . head , "+input" ) , e . indentLine ( n . from ( ) . line + 1 , null , ! 0 ) } Dr ( e ) } ) } , openLine : function ( e ) { e . replaceSelection ( "\n" , "start" ) } , toggleOverwrite : function ( e ) { e . toggleOverwrite ( ) } } , pa = e . keyMap = { } ; pa . basic = { Left : "goCharLeft" , Right : "goCharRight" , Up : "goLineUp" , Down : "goLineDown" , End : "goLineEnd" , Home : "goLineStartSmart" , PageUp : "goPageUp" , PageDown : "goPageDown" , Delete : "delCharAfter" , Backspace : "delCharBefore" , "Shift-Backspace" : "delCharBefore" , Tab : "defaultTab" , "Shift-Tab" : "indentAuto" , Enter : "newlineAndIndent" , Insert : "toggleOverwrite" , Esc : "singleSelection" } , pa . pcDefault = { "Ctrl-A" : "selectAll" , "Ctrl-D" : "deleteLine" , "Ctrl-Z" : "undo" , "Shift-Ctrl-Z" : "redo" , "Ctrl-Y" : "redo" , "Ctrl-Home" : "goDocStart" , "Ctrl-End" : "goDocEnd" , "Ctrl-Up" : "goLineUp" , "Ctrl-Down" : "goLineDown" , "Ctrl-Left" : "goGroupLeft" , "Ctrl-Right" : "goGroupRight" , "Alt-Left" : "goLineStart" , "Alt-Right" : "goLineEnd" , "Ctrl-Backspace" : "delGroupBefore" , "Ctrl-Delete" : "delGroupAfter" , "Ctrl-S" : "save" , "Ctrl-F" : "find" , "Ctrl-G" : "findNext" , "Shift-Ctrl-G" : "findPrev" , "Shift-Ctrl-F" : "replace" , "Shift-Ctrl-R" : "replaceAll" , "Ctrl-[" : "indentLess" , "Ctrl-]" : "indentMore" , "Ctrl-U" : "undoSelection" , "Shift-Ctrl-U" : "redoSelection" , "Alt-U" : "redoSelection" , fallthrough : "basic" } , pa . emacsy = { "Ctrl-F" : "goCharRight" , "Ctrl-B" : "goCharLeft" , "Ctrl-P" : "goLineUp" , "Ctrl-N" : "goLineDown" , "Alt-F" : "goWordRight" , "Alt-B" : "goWordLeft" , "Ctrl-A" : "goLineStart" , "Ctrl-E" : "goLineEnd" , "Ctrl-V" : "goPageDown" , "Shift-Ctrl-V" : "goPageUp" , "Ctrl-D" : "delCharAfter" , "Ctrl-H" : "delCharBefore" , "Alt-D" : "delWordAfter" , "Alt-Backspace" : "delWordBefore" , "Ctrl-K" : "killLine" , "Ctrl-T" : "transposeChars" , "Ctrl-O" : "openLine" } , pa . macDefault = { "Cmd-A" : "selectAll" , "Cmd-D" : "deleteLine" , "Cmd-Z" : "undo" , "Shift-Cmd-Z" : "redo" , "Cmd-Y" : "redo" , "Cmd-Home" : "goDocStart" , "Cmd-Up" : "goDocStart" , "Cmd-End" : "goDocEnd" , "Cmd-Down" : "goDocEnd" , "Alt-Left" : "goGroupLeft" , "Alt-Right" : "goGroupRight" , "Cmd-Left" : "goLineLeft" , "Cmd-Right" : "goLineRight" , "Alt-Backspace" : "delGroupBefore" , "Ctrl-Alt-Backspace" : "delGroupAfter" , "Alt-Delete" : "delGroupAfter" , "Cmd-S" : "save" , "Cmd-F" : "find" , "Cmd-G" : "findNext" , "Shift-Cmd-G" : "findPrev" , "Cmd-Alt-F" : "replace" , "Shift-Cmd-Alt-F" : "replaceAll" , "Cmd-[" : "indentLess" , "Cmd-]" : "indentMore" , "Cmd-Backspace" : "delWrappedLineLeft" , "Cmd-Delete" : "delWrappedLineRight" , "Cmd-U" : "undoSelection" , "Shift-Cmd-U" : "redoSelection" , "Ctrl-Up" : "goDocStart" , "Ctrl-Down" : "goDocEnd" , fallthrough : [ "basic" , "emacsy" ] } , pa [ "default" ] = zo ? pa . macDefault : pa . pcDefault , e . normalizeKeyMap = function ( e ) { var t = { } ; for ( var r in e ) if ( e . hasOwnProperty ( r ) ) { var n = e [ r ] ; if ( /^(name|fallthrough|(de|at)tach)$/ . test ( r ) ) continue ; if ( "..." == n ) { delete e [ r ] ; continue } for ( var i = Pi ( r . split ( " " ) , Vr ) , o = 0 ; o < i . length ; o ++ ) { var a , s ; o == i . length - 1 ? ( s = i . join ( " " ) , a = n ) : ( s = i . slice ( 0 , o + 1 ) . join ( " " ) , a = "..." ) ; var l = t [ s ] ; if ( l ) { if ( l != a ) throw new Error ( "Inconsistent bindings for " + s ) } else t [ s ] = a } delete e [ r ] } for ( var c in t ) e [ c ] = t [ c ] ; return e } ; var ha = e . lookupKey = function ( e , t , r , n ) { t = Gr ( t ) ; var i = t . call ? t . call ( e , n ) : t [ e ] ; if ( i === ! 1 ) return "nothing" ; if ( "..." === i ) return "multi" ; if ( null != i && r ( i ) ) return "handled" ; if ( t . fallthrough ) { if ( "[object Array]" != Object . prototype . toString . call ( t . fallthrough ) ) return ha ( e , t . fallthrough , r , n ) ; for ( var o = 0 ; o < t . fallthrough . length ; o ++ ) { var a = ha ( e , t . fallthrough [ o ] , r , n ) ; if ( a ) return a } } } , ma = e . isModifierKey = function ( e ) { var t = "string" == typeof e ? e : ss [ e . keyCode ] ; return "Ctrl" == t || "Alt" == t || "Shift" == t || "Mod" == t } , ga = e . keyName = function ( e , t ) { if ( Mo && 34 == e . keyCode && e [ "char" ] ) return ! 1 ; var r = ss [ e . keyCode ] , n = r ; return null != n && ! e . altGraphKey && ( e . altKey && "Alt" != r && ( n = "Alt-" + n ) , ( Po ? e . metaKey : e . ctrlKey ) && "Ctrl" != r && ( n = "Ctrl-" +
next : n . persistentStates } ) , n . localState = u , n . local = { mode : c , end : i . end && r ( i . end ) , endScan : i . end && i . forceEnd !== ! 1 && r ( i . end , ! 1 ) , endToken : o && o . join ? o [ o . length - 1 ] : o } } function l ( e , t ) { for ( var r = 0 ; r < t . length ; r ++ ) if ( t [ r ] === e ) return ! 0 } function c ( t , r ) { return function ( n , i , o ) { if ( n . local && n . local . mode . indent ) return n . local . mode . indent ( n . localState , i , o ) ; if ( null == n . indent || n . local || r . dontIndentStates && l ( n . state , r . dontIndentStates ) > - 1 ) return e . Pass ; var a = n . indent . length - 1 , s = t [ n . state ] ; e : for ( ; ; ) { for ( var c = 0 ; c < s . length ; c ++ ) { var u = s [ c ] ; if ( u . data . dedent && u . data . dedentIfLineStart !== ! 1 ) { var f = u . regex . exec ( i ) ; if ( f && f [ 0 ] ) { a -- , ( u . next || u . push ) && ( s = t [ u . next || u . push ] ) , i = i . slice ( f [ 0 ] . length ) ; continue e } } } break } return a < 0 ? 0 : n . indent [ a ] } } e . defineSimpleMode = function ( t , r ) { e . defineMode ( t , function ( t ) { return e . simpleMode ( t , r ) } ) } , e . simpleMode = function ( r , n ) { t ( n , "start" ) ; var a = { } , s = n . meta || { } , l = ! 1 ; for ( var u in n ) if ( u != s && n . hasOwnProperty ( u ) ) for ( var f = a [ u ] = [ ] , d = n [ u ] , p = 0 ; p < d . length ; p ++ ) { var h = d [ p ] ; f . push ( new i ( h , n ) ) , ( h . indent || h . dedent ) && ( l = ! 0 ) } var m = { startState : function ( ) { return { state : "start" , pending : null , local : null , localState : null , indent : l ? [ ] : null } } , copyState : function ( t ) { var r = { state : t . state , pending : t . pending , local : t . local , localState : null , indent : t . indent && t . indent . slice ( 0 ) } ; t . localState && ( r . localState = e . copyState ( t . local . mode , t . localState ) ) , t . stack && ( r . stack = t . stack . slice ( 0 ) ) ; for ( var n = t . persistentStates ; n ; n = n . next ) r . persistentStates = { mode : n . mode , spec : n . spec , state : n . state == t . localState ? r . localState : e . copyState ( n . mode , n . state ) , next : r . persistentStates } ; return r } , token : o ( a , r ) , innerMode : function ( e ) { return e . local && { mode : e . local . mode , state : e . localState } } , indent : c ( a , s ) } ; if ( s ) for ( var g in s ) s . hasOwnProperty ( g ) && ( m [ g ] = s [ g ] ) ; return m } } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { "use strict" ; e . multiplexingMode = function ( t ) { function r ( e , t , r , n ) { if ( "string" == typeof t ) { var i = e . indexOf ( t , r ) ; return n && i > - 1 ? i + t . length : i } var o = t . exec ( r ? e . slice ( r ) : e ) ; return o ? o . index + r + ( n ? o [ 0 ] . length : 0 ) : - 1 } var n = Array . prototype . slice . call ( arguments , 1 ) ; return { startState : function ( ) { return { outer : e . startState ( t ) , innerActive : null , inner : null } } , copyState : function ( r ) { return { outer : e . copyState ( t , r . outer ) , innerActive : r . innerActive , inner : r . innerActive && e . copyState ( r . innerActive . mode , r . inner ) } } , token : function ( i , o ) { if ( o . innerActive ) { var a = o . innerActive , s = i . string ; if ( ! a . close && i . sol ( ) ) return o . innerActive = o . inner = null , this . token ( i , o ) ; var l = a . close ? r ( s , a . close , i . pos , a . parseDelimiters ) : - 1 ; if ( l == i . pos && ! a . parseDelimiters ) return i . match ( a . close ) , o . innerActive = o . inner = null , a . delimStyle && a . delimStyle + " " + a . delimStyle + "-close" ; l > - 1 && ( i . string = s . slice ( 0 , l ) ) ; var c = a . mode . token ( i , o . inner ) ; return l > - 1 && ( i . string = s ) , l == i . pos && a . parseDelimiters && ( o . innerActive = o . inner = null ) , a . innerStyle && ( c = c ? c + " " + a . innerStyle : a . innerStyle ) , c } for ( var u = 1 / 0 , s = i . string , f = 0 ; f < n . length ; ++ f ) { var d = n [ f ] , l = r ( s , d . open , i . pos ) ; if ( l == i . pos ) return d . parseDelimiters || i . match ( d . open ) , o . innerActive = d , o . inner = e . startState ( d . mode , t . indent ? t . indent ( o . outer , "" ) : 0 ) , d . delimStyle && d . delimStyle + " " + d . delimStyle + "-open" ; l != - 1 && l < u && ( u = l ) } u != 1 / 0 && ( i . string = s . slice ( 0 , u ) ) ; var p = t . token ( i , o . outer ) ; return u != 1 / 0 && ( i . string = s ) , p } , indent : function ( r , n ) { var i = r . innerActive ? r . innerActive . mode : t ; return i . indent ? i . indent ( r . innerActive ? r . inner : r . outer , n ) : e . Pass } , blankLine : function ( r ) { var i = r . innerActive ? r . innerActive . mode : t ; if ( i . blankLine && i . blankLine ( r . innerActive ? r . inner : r . outer ) , r . innerActive ) "\n" === r . innerActive . close && ( r . innerActive = r . inner = null ) ; else for ( var o = 0 ; o < n . length ; ++ o ) { var a = n [ o ] ; "\n" === a . open && ( r . innerActive = a , r . inner = e . startState ( a . mode , i . indent ? i . indent ( r . outer , "" ) : 0 ) ) } } , electricChars : t . electricChars , innerMode : function ( e ) { return e . inner ? { state : e . inner , mode : e . innerActive . mode } : { state : e . outer , mode : t } } } } } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { " use strict
o ( ) } ) , c && ( a = setTimeout ( o , c ) ) , o } ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { function t ( e , t , n , i ) { var o = e . getLineHandle ( t . line ) , l = t . ch - 1 , c = l >= 0 && s [ o . text . charAt ( l ) ] || s [ o . text . charAt ( ++ l ) ] ; if ( ! c ) return null ; var u = ">" == c . charAt ( 1 ) ? 1 : - 1 ; if ( n && u > 0 != ( l == t . ch ) ) return null ; var f = e . getTokenTypeAt ( a ( t . line , l + 1 ) ) , d = r ( e , a ( t . line , l + ( u > 0 ? 1 : 0 ) ) , u , f || null , i ) ; return null == d ? null : { from : a ( t . line , l ) , to : d && d . pos , match : d && d . ch == c . charAt ( 0 ) , forward : u > 0 } } function r ( e , t , r , n , i ) { for ( var o = i && i . maxScanLineLength || 1e4 , l = i && i . maxScanLines || 1e3 , c = [ ] , u = i && i . bracketRegex ? i . bracketRegex : /[(){}[\]]/ , f = r > 0 ? Math . min ( t . line + l , e . lastLine ( ) + 1 ) : Math . max ( e . firstLine ( ) - 1 , t . line - l ) , d = t . line ; d != f ; d += r ) { var p = e . getLine ( d ) ; if ( p ) { var h = r > 0 ? 0 : p . length - 1 , m = r > 0 ? p . length : - 1 ; if ( ! ( p . length > o ) ) for ( d == t . line && ( h = t . ch - ( r < 0 ? 1 : 0 ) ) ; h != m ; h += r ) { var g = p . charAt ( h ) ; if ( u . test ( g ) && ( void 0 === n || e . getTokenTypeAt ( a ( d , h + 1 ) ) == n ) ) { var v = s [ g ] ; if ( ">" == v . charAt ( 1 ) == r > 0 ) c . push ( g ) ; else { if ( ! c . length ) return { pos : a ( d , h ) , ch : g } ; c . pop ( ) } } } } } return d - r != ( r > 0 ? e . lastLine ( ) : e . firstLine ( ) ) && null } function n ( e , r , n ) { for ( var i = e . state . matchBrackets . maxHighlightLineLength || 1e3 , s = [ ] , l = e . listSelections ( ) , c = 0 ; c < l . length ; c ++ ) { var u = l [ c ] . empty ( ) && t ( e , l [ c ] . head , ! 1 , n ) ; if ( u && e . getLine ( u . from . line ) . length <= i ) { var f = u . match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket" ; s . push ( e . markText ( u . from , a ( u . from . line , u . from . ch + 1 ) , { className : f } ) ) , u . to && e . getLine ( u . to . line ) . length <= i && s . push ( e . markText ( u . to , a ( u . to . line , u . to . ch + 1 ) , { className : f } ) ) } } if ( s . length ) { o && e . state . focused && e . focus ( ) ; var d = function ( ) { e . operation ( function ( ) { for ( var e = 0 ; e < s . length ; e ++ ) s [ e ] . clear ( ) } ) } ; if ( ! r ) return d ; setTimeout ( d , 800 ) } } function i ( e ) { e . operation ( function ( ) { l && ( l ( ) , l = null ) , l = n ( e , ! 1 , e . state . matchBrackets ) } ) } var o = /MSIE \d/ . test ( navigator . userAgent ) && ( null == document . documentMode || document . documentMode < 8 ) , a = e . Pos , s = { "(" : ")>" , ")" : "(<" , "[" : "]>" , "]" : "[<" , "{" : "}>" , "}" : "{<" } , l = null ; e . defineOption ( "matchBrackets" , ! 1 , function ( t , r , n ) { n && n != e . Init && ( t . off ( "cursorActivity" , i ) , l && ( l ( ) , l = null ) ) , r && ( t . state . matchBrackets = "object" == typeof r ? r : { } , t . on ( "cursorActivity" , i ) ) } ) , e . defineExtension ( "matchBrackets" , function ( ) { n ( this , ! 0 ) } ) , e . defineExtension ( "findMatchingBracket" , function ( e , r , n ) { return t ( this , e , r , n ) } ) , e . defineExtension ( "scanForBracket" , function ( e , t , n , i ) { return r ( this , e , t , n , i ) } ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { function t ( e , t ) { return "pairs" == t && "string" == typeof e ? e : "object" == typeof e && null != e [ t ] ? e [ t ] : f [ t ] } function r ( e ) { return function ( t ) { return s ( t , e ) } } function n ( e ) { var t = e . state . closeBrackets ; if ( ! t ) return null ; var r = e . getModeAt ( e . getCursor ( ) ) ; return r . closeBrackets || t } function i ( r ) { var i = n ( r ) ; if ( ! i || r . getOption ( "disableInput" ) ) return e . Pass ; for ( var o = t ( i , "pairs" ) , a = r . listSelections ( ) , s = 0 ; s < a . length ; s ++ ) { if ( ! a [ s ] . empty ( ) ) return e . Pass ; var l = c ( r , a [ s ] . head ) ; if ( ! l || o . indexOf ( l ) % 2 != 0 ) return e . Pass } for ( var s = a . length - 1 ; s >= 0 ; s -- ) { var u = a [ s ] . head ; r . replaceRange ( "" , d ( u . line , u . ch - 1 ) , d ( u . line , u . ch + 1 ) , "+delete" ) } } function o ( r ) { var i = n ( r ) , o = i && t ( i , "explode" ) ; if ( ! o || r . getOption ( "disableInput" ) ) return e . Pass ; for ( var a = r . listSelections ( ) , s = 0 ; s < a . length ; s ++ ) { if ( ! a [ s ] . empty ( ) ) return e . Pass ; var l = c ( r , a [ s ] . head ) ; if ( ! l || o . indexOf ( l ) % 2 != 0 ) return e . Pass } r . operation ( function ( ) { r . replaceSelection ( "\n\n" , null ) , r . execCommand ( "goCharLeft" ) , a = r . listSelections ( ) ; for ( var e = 0 ; e < a . length ; e ++ ) { var t = a [ e ] . head . line ; r . indentLine ( t , null , ! 0 ) , r . indentLine ( t + 1 , null , ! 0 ) } } ) } function a ( t ) { var r = e . cmpPos ( t . anchor , t . head ) > 0 ; return { anchor : new d ( t . anchor . line , t . anchor . ch + ( r ? - 1 : 1 ) ) , head : new d ( t . head . line , t . head . ch + ( r ? 1 : - 1 ) ) } } function s ( r , i ) { var o = n ( r ) ; if ( ! o || r . getOption ( "disableInput" ) ) return e . Pass ; var s = t ( o , "pairs" ) , c = s . indexOf ( i ) ; if ( c == - 1 ) return e . Pass ; for ( var f , p = t ( o , "triples" ) , h = s . charAt ( c + 1 ) == i , m = r . listSelections ( ) , g = c % 2 == 0 , v = 0 ; v < m . length ; v ++ ) { var y , b = m [ v ] , k = b . head , x = r . getRa
i ? "atom" : "error" } return e . eatWhile ( /[^&<]/ ) , null } function a ( e , t ) { var r = e . next ( ) ; if ( ">" == r || "/" == r && e . eat ( ">" ) ) return t . tokenize = o , M = ">" == r ? "endTag" : "selfcloseTag" , "tag bracket" ; if ( "=" == r ) return M = "equals" , null ; if ( "<" == r ) { t . tokenize = o , t . state = p , t . tagName = t . tagStart = null ; var n = t . tokenize ( e , t ) ; return n ? n + " tag error" : "tag error" } return /[\'\"]/ . test ( r ) ? ( t . tokenize = s ( r ) , t . stringStartCol = e . column ( ) , t . tokenize ( e , t ) ) : ( e . match ( /^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/ ) , "word" ) } function s ( e ) { var t = function ( t , r ) { for ( ; ! t . eol ( ) ; ) if ( t . next ( ) == e ) { r . tokenize = a ; break } return "string" } ; return t . isInAttribute = ! 0 , t } function l ( e , t ) { return function ( r , n ) { for ( ; ! r . eol ( ) ; ) { if ( r . match ( t ) ) { n . tokenize = o ; break } r . next ( ) } return e } } function c ( e ) { return function ( t , r ) { for ( var n ; null != ( n = t . next ( ) ) ; ) { if ( "<" == n ) return r . tokenize = c ( e + 1 ) , r . tokenize ( t , r ) ; if ( ">" == n ) { if ( 1 == e ) { r . tokenize = o ; break } return r . tokenize = c ( e - 1 ) , r . tokenize ( t , r ) } } return "meta" } } function u ( e , t , r ) { this . prev = e . context , this . tagName = t , this . indent = e . indented , this . startOfLine = r , ( _ . doNotIndent . hasOwnProperty ( t ) || e . context && e . context . noIndent ) && ( this . noIndent = ! 0 ) } function f ( e ) { e . context && ( e . context = e . context . prev ) } function d ( e , t ) { for ( var r ; ; ) { if ( ! e . context ) return ; if ( r = e . context . tagName , ! _ . contextGrabbers . hasOwnProperty ( r ) || ! _ . contextGrabbers [ r ] . hasOwnProperty ( t ) ) return ; f ( e ) } } function p ( e , t , r ) { return "openTag" == e ? ( r . tagStart = t . column ( ) , h ) : "closeTag" == e ? m : p } function h ( e , t , r ) { return "word" == e ? ( r . tagName = t . current ( ) , L = "tag" , y ) : ( L = "error" , h ) } function m ( e , t , r ) { if ( "word" == e ) { var n = t . current ( ) ; return r . context && r . context . tagName != n && _ . implicitlyClosed . hasOwnProperty ( r . context . tagName ) && f ( r ) , r . context && r . context . tagName == n || _ . matchClosing === ! 1 ? ( L = "tag" , g ) : ( L = "tag error" , v ) } return L = "error" , v } function g ( e , t , r ) { return "endTag" != e ? ( L = "error" , g ) : ( f ( r ) , p ) } function v ( e , t , r ) { return L = "error" , g ( e , t , r ) } function y ( e , t , r ) { if ( "word" == e ) return L = "attribute" , b ; if ( "endTag" == e || "selfcloseTag" == e ) { var n = r . tagName , i = r . tagStart ; return r . tagName = r . tagStart = null , "selfcloseTag" == e || _ . autoSelfClosers . hasOwnProperty ( n ) ? d ( r , n ) : ( d ( r , n ) , r . context = new u ( r , n , i == r . indented ) ) , p } return L = "error" , y } function b ( e , t , r ) { return "equals" == e ? k : ( _ . allowMissing || ( L = "error" ) , y ( e , t , r ) ) } function k ( e , t , r ) { return "string" == e ? x : "word" == e && _ . allowUnquoted ? ( L = "string" , y ) : ( L = "error" , y ( e , t , r ) ) } function x ( e , t , r ) { return "string" == e ? x : y ( e , t , r ) } var w = n . indentUnit , _ = { } , C = i . htmlMode ? t : r ; for ( var S in C ) _ [ S ] = C [ S ] ; for ( var S in i ) _ [ S ] = i [ S ] ; var M , L ; return o . isInText = ! 0 , { startState : function ( e ) { var t = { tokenize : o , state : p , indented : e || 0 , tagName : null , tagStart : null , context : null } ; return null != e && ( t . baseIndent = e ) , t } , token : function ( e , t ) { if ( ! t . tagName && e . sol ( ) && ( t . indented = e . indentation ( ) ) , e . eatSpace ( ) ) return null ; M = null ; var r = t . tokenize ( e , t ) ; return ( r || M ) && "comment" != r && ( L = null , t . state = t . state ( M || r , e , t ) , L && ( r = "error" == L ? r + " error" : L ) ) , r } , indent : function ( t , r , n ) { var i = t . context ; if ( t . tokenize . isInAttribute ) return t . tagStart == t . indented ? t . stringStartCol + 1 : t . indented + w ; if ( i && i . noIndent ) return e . Pass ; if ( t . tokenize != a && t . tokenize != o ) return n ? n . match ( /^(\s*)/ ) [ 0 ] . length : 0 ; if ( t . tagName ) return _ . multilineTagIndentPastTag !== ! 1 ? t . tagStart + t . tagName . length + 2 : t . tagStart + w * ( _ . multilineTagIndentFactor || 1 ) ; if ( _ . alignCDATA && /<!\[CDATA\[/ . test ( r ) ) return 0 ; var s = r && /^<(\/)?([\w_:\.-]*)/ . exec ( r ) ; if ( s && s [ 1 ] ) for ( ; i ; ) { if ( i . tagName == s [ 2 ] ) { i = i . prev ; break } if ( ! _ . implicitlyClosed . hasOwnProperty ( i . tagName ) ) break ; i = i . prev } else if ( s ) for ( ; i ; ) { var l = _ . contextGrabbers [ i . tagName ] ; if ( ! l || ! l . hasOwnProperty ( s [ 2 ] ) ) break ; i = i . prev } for ( ; i && i . prev && ! i . startOfLine ; ) i = i . prev ; return i ? i . indent + w : t . baseIndent || 0 } , electricInput : /<\/[\s\w:]+>$/ , blockCommentStart : "<!--" , blockCommentEnd : "-->" , configuration : _ . htmlMode ? "html" : "xml" , helperType : _ . htmlMode ? "html" : "xml" , skipAttribute : function ( e ) { e . state == k && ( e . state = y ) } } } ) , e . defineMIME ( "text/xml" , "xml" ) , e . defineMIME ( "application/xml" , "xml" ) , e . mimeModes . hasOwnProperty ( "text/html" ) || e . defineMIME ( "text/html" , { name : "xml" , htmlMode : ! 0 } ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) , require ( "../xml/xml" ) , require ( "../meta" ) ) : "function" == typeof define &
n ( "number" , "unit" ) ) : "-" !== r ? /[,+>*\/]/ . test ( r ) ? n ( null , "select-op" ) : "." == r && e . match ( /^-?[_a-z][_a-z0-9-]*/i ) ? n ( "qualifier" , "qualifier" ) : /[:;{}\[\]\(\)]/ . test ( r ) ? n ( null , r ) : "u" == r && e . match ( /rl(-prefix)?\(/ ) || "d" == r && e . match ( "omain(" ) || "r" == r && e . match ( "egexp(" ) ? ( e . backUp ( 1 ) , t . tokenize = a , n ( "property" , "word" ) ) : /[\w\\\-]/ . test ( r ) ? ( e . eatWhile ( /[\w\\\-]/ ) , n ( "property" , "word" ) ) : n ( null , null ) : /[\d.]/ . test ( e . peek ( ) ) ? ( e . eatWhile ( /[\w.%]/ ) , n ( "number" , "unit" ) ) : e . match ( /^-[\w\\\-]+/ ) ? ( e . eatWhile ( /[\w\\\-]/ ) , e . match ( /^\s*:/ , ! 1 ) ? n ( "variable-2" , "variable-definition" ) : n ( "variable-2" , "variable" ) ) : e . match ( /^\w+-/ ) ? n ( "meta" , "meta" ) : void 0 } function o ( e ) { return function ( t , r ) { for ( var i , o = ! 1 ; null != ( i = t . next ( ) ) ; ) { if ( i == e && ! o ) { ")" == e && t . backUp ( 1 ) ; break } o = ! o && "\\" == i } return ( i == e || ! o && ")" != e ) && ( r . tokenize = null ) , n ( "string" , "string" ) } } function a ( e , t ) { return e . next ( ) , e . match ( /\s*[\"\')]/ , ! 1 ) ? t . tokenize = null : t . tokenize = o ( ")" ) , n ( null , "(" ) } function s ( e , t , r ) { this . type = e , this . indent = t , this . prev = r } function l ( e , t , r , n ) { return e . context = new s ( r , t . indentation ( ) + ( n === ! 1 ? 0 : g ) , e . context ) , r } function c ( e ) { return e . context . prev && ( e . context = e . context . prev ) , e . context . type } function u ( e , t , r ) { return E [ r . context . type ] ( e , t , r ) } function f ( e , t , r , n ) { for ( var i = n || 1 ; i > 0 ; i -- ) r . context = r . context . prev ; return u ( e , t , r ) } function d ( e ) { var t = e . current ( ) . toLowerCase ( ) ; m = L . hasOwnProperty ( t ) ? "atom" : M . hasOwnProperty ( t ) ? "keyword" : "variable" } var p = r . inline ; r . propertyKeywords || ( r = e . resolveMode ( "text/css" ) ) ; var h , m , g = t . indentUnit , v = r . tokenHooks , y = r . documentTypes || { } , b = r . mediaTypes || { } , k = r . mediaFeatures || { } , x = r . mediaValueKeywords || { } , w = r . propertyKeywords || { } , _ = r . nonStandardPropertyKeywords || { } , C = r . fontProperties || { } , S = r . counterDescriptors || { } , M = r . colorKeywords || { } , L = r . valueKeywords || { } , T = r . allowNested , A = r . supportsAtComponent === ! 0 , E = { } ; return E . top = function ( e , t , r ) { if ( "{" == e ) return l ( r , t , "block" ) ; if ( "}" == e && r . context . prev ) return c ( r ) ; if ( A && /@component/ . test ( e ) ) return l ( r , t , "atComponentBlock" ) ; if ( /^@(-moz-)?document$/ . test ( e ) ) return l ( r , t , "documentTypes" ) ; if ( /^@(media|supports|(-moz-)?document|import)$/ . test ( e ) ) return l ( r , t , "atBlock" ) ; if ( /^@(font-face|counter-style)/ . test ( e ) ) return r . stateArg = e , "restricted_atBlock_before" ; if ( /^@(-(moz|ms|o|webkit)-)?keyframes$/ . test ( e ) ) return "keyframes" ; if ( e && "@" == e . charAt ( 0 ) ) return l ( r , t , "at" ) ; if ( "hash" == e ) m = "builtin" ; else if ( "word" == e ) m = "tag" ; else { if ( "variable-definition" == e ) return "maybeprop" ; if ( "interpolation" == e ) return l ( r , t , "interpolation" ) ; if ( ":" == e ) return "pseudo" ; if ( T && "(" == e ) return l ( r , t , "parens" ) } return r . context . type } , E . block = function ( e , t , r ) { if ( "word" == e ) { var n = t . current ( ) . toLowerCase ( ) ; return w . hasOwnProperty ( n ) ? ( m = "property" , "maybeprop" ) : _ . hasOwnProperty ( n ) ? ( m = "string-2" , "maybeprop" ) : T ? ( m = t . match ( /^\s*:(?:\s|$)/ , ! 1 ) ? "property" : "tag" , "block" ) : ( m += " error" , "maybeprop" ) } return "meta" == e ? "block" : T || "hash" != e && "qualifier" != e ? E . top ( e , t , r ) : ( m = "error" , "block" ) } , E . maybeprop = function ( e , t , r ) { return ":" == e ? l ( r , t , "prop" ) : u ( e , t , r ) } , E . prop = function ( e , t , r ) { if ( ";" == e ) return c ( r ) ; if ( "{" == e && T ) return l ( r , t , "propBlock" ) ; if ( "}" == e || "{" == e ) return f ( e , t , r ) ; if ( "(" == e ) return l ( r , t , "parens" ) ; if ( "hash" != e || /^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/ . test ( t . current ( ) ) ) { if ( "word" == e ) d ( t ) ; else if ( "interpolation" == e ) return l ( r , t , "interpolation" ) } else m += " error" ; return "prop" } , E . propBlock = function ( e , t , r ) { return "}" == e ? c ( r ) : "word" == e ? ( m = "property" , "maybeprop" ) : r . context . type } , E . parens = function ( e , t , r ) { return "{" == e || "}" == e ? f ( e , t , r ) : ")" == e ? c ( r ) : "(" == e ? l ( r , t , "parens" ) : "interpolation" == e ? l ( r , t , "interpolation" ) : ( "word" == e && d ( t ) , "parens" ) } , E . pseudo = function ( e , t , r ) { return "word" == e ? ( m = "variable-3" , r . context . type ) : u ( e , t , r ) } , E . documentTypes = function ( e , t , r ) { return "word" == e && y . hasOwnProperty ( t . current ( ) ) ? ( m = "tag" , r . context . type ) : E . atBlock ( e , t , r ) } , E . atBlock = function ( e , t , r ) { if ( "(" == e ) return l ( r , t , "atBlock_parens" ) ; if ( "}" == e || ";" == e ) return f ( e , t , r ) ; if ( "{" == e ) return c ( r ) && l ( r , t , T ? "block" : "top" ) ; if ( "interpolation" == e ) return l ( r , t , "interpolation" ) ; if ( "word" == e ) { var n = t . current ( ) . toLowerCase ( ) ; m = "only" == n || "not" == n || "and" == n || "or" == n ? "keyword" : b . hasOwnProperty ( n ) ? "attribute" : k . hasOwnProperty ( n ) ? " proper
null ; p = h = null ; var s = ( t . tokenize || c ) ( e , t ) ; if ( "comment" == s || "meta" == s ) return s ; if ( null == a . align && ( a . align = ! 0 ) , I . test ( p ) ) for ( ; "statement" == t . context . type ; ) n ( t ) ; else if ( "{" == p ) r ( t , e . column ( ) , "}" ) ; else if ( "[" == p ) r ( t , e . column ( ) , "]" ) ; else if ( "(" == p ) r ( t , e . column ( ) , ")" ) ; else if ( "}" == p ) { for ( ; "statement" == a . type ; ) a = n ( t ) ; for ( "}" == a . type && ( a = n ( t ) ) ; "statement" == a . type ; ) a = n ( t ) } else p == a . type ? n ( t ) : M && ( ( "}" == a . type || "top" == a . type ) && ";" != p || "statement" == a . type && "newstatement" == p ) && r ( t , e . column ( ) , "statement" , e . current ( ) ) ; if ( "variable" == s && ( "def" == t . prevToken || l . typeFirstDefinitions && i ( e , t , e . start ) && o ( t . context ) && e . match ( /^\s*\(/ , ! 1 ) ) && ( s = "def" ) , C . token ) { var u = C . token ( e , t , s ) ; void 0 !== u && ( s = u ) } return "def" == s && l . styleDefs === ! 1 && ( s = "variable" ) , t . startOfLine = ! 1 , t . prevToken = h ? "def" : s || p , d ( e , t ) , s } , indent : function ( t , r ) { if ( t . tokenize != c && null != t . tokenize || t . typeAtEndOfLine ) return e . Pass ; var n = t . context , i = r && r . charAt ( 0 ) ; if ( "statement" == n . type && "}" == i && ( n = n . prev ) , l . dontIndentStatements ) for ( ; "statement" == n . type && l . dontIndentStatements . test ( n . info ) ; ) n = n . prev ; if ( C . indent ) { var o = C . indent ( t , n , r ) ; if ( "number" == typeof o ) return o } var a = i == n . type , s = n . prev && "switch" == n . prev . info ; if ( l . allmanIndentation && /[{(]/ . test ( i ) ) { for ( ; "top" != n . type && "}" != n . type ; ) n = n . prev ; return n . indented } return "statement" == n . type ? n . indented + ( "{" == i ? 0 : g ) : ! n . align || v && ")" == n . type ? ")" != n . type || a ? n . indented + ( a ? 0 : m ) + ( a || ! s || /^(?:case|default)\b/ . test ( r ) ? 0 : m ) : n . indented + g : n . column + ( a ? 0 : 1 ) } , electricInput : L ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/ , blockCommentStart : "/*" , blockCommentEnd : "*/" , lineComment : "//" , fold : "brace" } } ) ; var b = "auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile" , k = "int long char short double float unsigned signed void size_t ptrdiff_t" ; m ( [ "text/x-csrc" , "text/x-c" , "text/x-chdr" ] , { name : "clike" , keywords : a ( b ) , types : a ( k + " bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t" ) , blockKeywords : a ( "case do else for if switch while struct" ) , defKeywords : a ( "struct" ) , typeFirstDefinitions : ! 0 , atoms : a ( "null true false" ) , hooks : { "#" : l , "*" : c } , modeProps : { fold : [ "brace" , "include" ] } } ) , m ( [ "text/x-c++src" , "text/x-c++hdr" ] , { name : "clike" , keywords : a ( b + " asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override" ) , types : a ( k + " bool wchar_t" ) , blockKeywords : a ( "catch class do else finally for if struct switch try while" ) , defKeywords : a ( "class namespace struct enum union" ) , typeFirstDefinitions : ! 0 , atoms : a ( "true false null" ) , dontIndentStatements : /^template$/ , hooks : { "#" : l , "*" : c , u : f , U : f , L : f , R : f , 0 : u , 1 : u , 2 : u , 3 : u , 4 : u , 5 : u , 6 : u , 7 : u , 8 : u , 9 : u , token : function ( e , t , r ) { if ( "variable" == r && "(" == e . peek ( ) && ( ";" == t . prevToken || null == t . prevToken || "}" == t . prevToken ) && d ( e . current ( ) ) ) return "def" } } , namespaceSeparator : "::" , modeProps : { fold : [ "brace" , "include" ] } } ) , m ( "text/x-java" , { name : "clike" , keywords : a ( "abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while" ) , types : a ( "byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void" ) , blockKeywords : a ( "catch class do else finally for if switch try while" ) , defKeywords : a ( "class interface package enum" ) , typeFirstDefinitions : ! 0 , atoms : a ( "true false null" ) , endStatement : /^[;:]$/ , number : /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i , hooks : { "@" : function ( e ) { return e . eatWhile ( /[\w\$_]/ ) , "meta" } } , modeProps : { fold : [ "brace" , "import" ] } } ) , m ( "text/x-csharp" , { name : "clike" , keywords : a ( " abstract as async await base break case catch
var _ = s . version && 3 == parseInt ( s . version , 10 ) ; if ( _ ) { var C = s . singleOperators || /^[\+\-\*\/%&|\^~<>!@]/ , S = s . identifiers || /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/ ; x = x . concat ( [ "nonlocal" , "False" , "True" , "None" , "async" , "await" ] ) , w = w . concat ( [ "ascii" , "bytes" , "exec" , "print" ] ) ; var M = new RegExp ( "^(([rbuf]|(br))?('{3}|\"{3}|['\"]))" , "i" ) } else { var C = s . singleOperators || /^[\+\-\*\/%&|\^~<>!]/ , S = s . identifiers || /^[_A-Za-z][_A-Za-z0-9]*/ ; x = x . concat ( [ "exec" , "print" ] ) , w = w . concat ( [ "apply" , "basestring" , "buffer" , "cmp" , "coerce" , "execfile" , "file" , "intern" , "long" , "raw_input" , "reduce" , "reload" , "unichr" , "unicode" , "xrange" , "False" , "True" , "None" ] ) ; var M = new RegExp ( "^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))" , "i" ) } var L = t ( x ) , T = t ( w ) , A = { startState : function ( e ) { return { tokenize : l , scopes : [ { offset : e || 0 , type : "py" , align : null } ] , indent : e || 0 , lastToken : null , lambda : ! 1 , dedent : 0 } } , token : function ( e , t ) { var r = t . errorToken ; r && ( t . errorToken = ! 1 ) ; var n = h ( e , t ) ; return n && "comment" != n && ( t . lastToken = "keyword" == n || "punctuation" == n ? e . current ( ) : n ) , "punctuation" == n && ( n = null ) , e . eol ( ) && t . lambda && ( t . lambda = ! 1 ) , r ? n + " " + m : n } , indent : function ( t , n ) { if ( t . tokenize != l ) return t . tokenize . isString ? e . Pass : 0 ; var i = r ( t ) , o = i . type == n . charAt ( 0 ) ; return null != i . align ? i . align - ( o ? 1 : 0 ) : i . offset - ( o ? k : 0 ) } , electricInput : /^\s*[\}\]\)]$/ , closeBrackets : { triples : "'\"" } , lineComment : "#" , fold : "indent" } ; return A } ) , e . defineMIME ( "text/x-python" , "python" ) ; var a = function ( e ) { return e . split ( " " ) } ; e . defineMIME ( "text/x-cython" , { name : "python" , extra _keywords : a ( "by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE" ) } ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { "use strict" ; e . defineMode ( "shell" , function ( ) { function e ( e , t ) { for ( var r = t . split ( " " ) , n = 0 ; n < r . length ; n ++ ) i [ r [ n ] ] = e } function t ( e , t ) { if ( e . eatSpace ( ) ) return null ; var a = e . sol ( ) , s = e . next ( ) ; if ( "\\" === s ) return e . next ( ) , null ; if ( "'" === s || '"' === s || "`" === s ) return t . tokens . unshift ( r ( s ) ) , n ( e , t ) ; if ( "#" === s ) return a && e . eat ( "!" ) ? ( e . skipToEnd ( ) , "meta" ) : ( e . skipToEnd ( ) , "comment" ) ; if ( "$" === s ) return t . tokens . unshift ( o ) , n ( e , t ) ; if ( "+" === s || "=" === s ) return "operator" ; if ( "-" === s ) return e . eat ( "-" ) , e . eatWhile ( /\w/ ) , "attribute" ; if ( /\d/ . test ( s ) && ( e . eatWhile ( /\d/ ) , e . eol ( ) || ! /\w/ . test ( e . peek ( ) ) ) ) return "number" ; e . eatWhile ( /[\w-]/ ) ; var l = e . current ( ) ; return "=" === e . peek ( ) && /\w+/ . test ( l ) ? "def" : i . hasOwnProperty ( l ) ? i [ l ] : null } function r ( e ) { return function ( t , r ) { for ( var n , i = ! 1 , a = ! 1 ; null != ( n = t . next ( ) ) ; ) { if ( n === e && ! a ) { i = ! 0 ; break } if ( "$" === n && ! a && "'" !== e ) { a = ! 0 , t . backUp ( 1 ) , r . tokens . unshift ( o ) ; break } a = ! a && "\\" === n } return ! i && a || r . tokens . shift ( ) , "`" === e || ")" === e ? "quote" : "string" } } function n ( e , r ) { return ( r . tokens [ 0 ] || t ) ( e , r ) } var i = { } ; e ( "atom" , "true false" ) , e ( "keyword" , "if then do else elif while until for in esac fi fin fil done exit set unset export function" ) , e ( "builtin" , "ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh" ) ; var o = function ( e , t ) { t . tokens . length > 1 && e . eat ( "$" ) ; var i = e . next ( ) , o = /\w/ ; return "{" === i && ( o = /[^}]/ ) , "(" === i ? ( t . tokens [ 0 ] = r ( ")" ) , n ( e , t ) ) : ( /\d/ . test ( i ) || ( e . eatWhile ( o ) , e . eat ( "}" ) ) , t . tokens . shift ( ) , "def" ) } ; return { startState : function ( ) { return { tokens : [ ] } } , token : function ( e , t ) { return n ( e , t ) } , lineComment : "#" , fold : "brace" } } ) , e . defineMIME ( "text/x-sh" , "shell" ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) , require ( "../htmlmixed/htmlmixed" ) , require ( "../clike/clike" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" , "../htmlmixed/htmlmixed" , "../clike/clike" ] , e ) : e ( CodeMirror ) } ( function ( e ) { "use strict" ; function t ( e ) { for ( var t = { } , r = e . split ( " " ) , n = 0 ; n < r . length ; ++ n ) t [ r [ n ] ] = ! 0 ; return t } function r ( e , t , i ) { return 0 == e . length ? n ( t ) : function ( o , a ) { for ( var s = e [ 0 ] , l = 0 ; l < s . length ; l ++ ) if ( o . m
builtin : i ( "abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml" ) , operatorChars : /^[*+\-%<>!=~]/ , dateSQL : i ( "date time timestamp" ) , support : i ( "doubleQuote nCharCast zerolessFloat binaryNumber hexNumber" ) } ) , e . defineMIME ( "text/x-hive" , { name : "sql" , keywords : i ( "select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with" ) , builtin : i ( "bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype" ) , atoms : i ( "false true null unknown" ) , operatorChars : /^[*+\-%<>!=]/ , dateSQL : i ( "date timestamp" ) , support : i ( "ODBCdotTable doubleQuote binaryNumber hexNumber" ) } ) , e . defineMIME ( "text/x-pgsql" , { name : "sql" , client : i ( "source" ) , keywords : i ( o + " a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array _agg array _max _cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin _frame begin _partition bernoulli binary bit _length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog _name ceil ceiling chain characteristics characters character _length character _set _catalog character _set _name character _set _schema char _length check checkpoint class class _origin clob close cluster coalesce cobol collate collation collation _catalog collation _name collation _schema collect column columns column _name command _function command _function _code comment comments commit committed concurrently condition condition _number configuration conflict connect connection connection _name constraint constraints constraint _catalog constraint _name constraint _schema constructor contains content continue control conversion convert copy corr corresponding cost covar _pop cova
return { startState : function ( e ) { return { tokenize : n , baseIndent : e || 0 , stack : [ ] } } , token : function ( e , t ) { if ( e . eatSpace ( ) ) return null ; s = null ; var r = t . tokenize ( e , t ) , n = t . stack [ t . stack . length - 1 ] ; return "hash" == s && "rule" == n ? r = "atom" : "variable" == r && ( "rule" == n ? r = "number" : n && "@media{" != n || ( r = "tag" ) ) , "rule" == n && /^[\{\};]$/ . test ( s ) && t . stack . pop ( ) , "{" == s ? "@media" == n ? t . stack [ t . stack . length - 1 ] = "@media{" : t . stack . push ( "{" ) : "}" == s ? t . stack . pop ( ) : "@media" == s ? t . stack . push ( "@media" ) : "{" == n && "comment" != s && t . stack . push ( "rule" ) , r } , indent : function ( e , t ) { var r = e . stack . length ; return /^\}/ . test ( t ) && ( r -= "rule" == e . stack [ e . stack . length - 1 ] ? 2 : 1 ) , e . baseIndent + r * f } , electricChars : "}" } } ) , e . defineMIME ( "text/x-nginx-conf" , "nginx" ) } ) , function ( e ) { "object" == typeof exports && "object" == typeof module ? e ( require ( "../../lib/codemirror" ) ) : "function" == typeof define && define . amd ? define ( [ "../../lib/codemirror" ] , e ) : e ( CodeMirror ) } ( function ( e ) { "use strict" ; function t ( e , t ) { return e . string . charAt ( e . pos + ( t || 0 ) ) } function r ( e , t ) { if ( t ) { var r = e . pos - t ; return e . string . substr ( r >= 0 ? r : 0 , t ) } return e . string . substr ( 0 , e . pos - 1 ) } function n ( e , t ) { var r = e . string . length , n = r - e . pos + 1 ; return e . string . substr ( e . pos , t && t < r ? t : n ) } function i ( e , t ) { var r , n = e . pos + t ; n <= 0 ? e . pos = 0 : n >= ( r = e . string . length - 1 ) ? e . pos = r : e . pos = n } e . defineMode ( "perl" , function ( ) { function e ( e , t , r , n , i ) { return t . chain = null , t . style = null , t . tail = null , t . tokenize = function ( e , t ) { for ( var o , s = ! 1 , l = 0 ; o = e . next ( ) ; ) { if ( o === r [ l ] && ! s ) return void 0 !== r [ ++ l ] ? ( t . chain = r [ l ] , t . style = n , t . tail = i ) : i && e . eatWhile ( i ) , t . tokenize = a , n ; s = ! s && "\\" == o } return n } , t . tokenize ( e , t ) } function o ( e , t , r ) { return t . tokenize = function ( e , t ) { return e . string == r && ( t . tokenize = a ) , e . skipToEnd ( ) , "string" } , t . tokenize ( e , t ) } function a ( a , u ) { if ( a . eatSpace ( ) ) return null ; if ( u . chain ) return e ( a , u , u . chain , u . style , u . tail ) ; if ( a . match ( /^\-?[\d\.]/ , ! 1 ) && a . match ( /^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/ ) ) return "number" ; if ( a . match ( /^<<(?=\w)/ ) ) return a . eatWhile ( /\w/ ) , o ( a , u , a . current ( ) . substr ( 2 ) ) ; if ( a . sol ( ) && a . match ( /^\=item(?!\w)/ ) ) return o ( a , u , "=cut" ) ; var f = a . next ( ) ; if ( '"' == f || "'" == f ) { if ( r ( a , 3 ) == "<<" + f ) { var d = a . pos ; a . eatWhile ( /\w/ ) ; var p = a . current ( ) . substr ( 1 ) ; if ( p && a . eat ( f ) ) return o ( a , u , p ) ; a . pos = d } return e ( a , u , [ f ] , "string" ) } if ( "q" == f ) { var h = t ( a , - 2 ) ; if ( ! h || ! /\w/ . test ( h ) ) if ( h = t ( a , 0 ) , "x" == h ) { if ( h = t ( a , 1 ) , "(" == h ) return i ( a , 2 ) , e ( a , u , [ ")" ] , l , c ) ; if ( "[" == h ) return i ( a , 2 ) , e ( a , u , [ "]" ] , l , c ) ; if ( "{" == h ) return i ( a , 2 ) , e ( a , u , [ "}" ] , l , c ) ; if ( "<" == h ) return i ( a , 2 ) , e ( a , u , [ ">" ] , l , c ) ; if ( /[\^'"!~\/]/ . test ( h ) ) return i ( a , 1 ) , e ( a , u , [ a . eat ( h ) ] , l , c ) } else if ( "q" == h ) { if ( h = t ( a , 1 ) , "(" == h ) return i ( a , 2 ) , e ( a , u , [ ")" ] , "string" ) ; if ( "[" == h ) return i ( a , 2 ) , e ( a , u , [ "]" ] , "string" ) ; if ( "{" == h ) return i ( a , 2 ) , e ( a , u , [ "}" ] , "string" ) ; if ( "<" == h ) return i ( a , 2 ) , e ( a , u , [ ">" ] , "string" ) ; if ( /[\^'"!~\/]/ . test ( h ) ) return i ( a , 1 ) , e ( a , u , [ a . eat ( h ) ] , "string" ) } else if ( "w" == h ) { if ( h = t ( a , 1 ) , "(" == h ) return i ( a , 2 ) , e ( a , u , [ ")" ] , "bracket" ) ; if ( "[" == h ) return i ( a , 2 ) , e ( a , u , [ "]" ] , "bracket" ) ; if ( "{" == h ) return i ( a , 2 ) , e ( a , u , [ "}" ] , "bracket" ) ; if ( "<" == h ) return i ( a , 2 ) , e ( a , u , [ ">" ] , "bracket" ) ; if ( /[\^'"!~\/]/ . test ( h ) ) return i ( a , 1 ) , e ( a , u , [ a . eat ( h ) ] , "bracket" ) } else if ( "r" == h ) { if ( h = t ( a , 1 ) , "(" == h ) return i ( a , 2 ) , e ( a , u , [ ")" ] , l , c ) ; if ( "[" == h ) return i ( a , 2 ) , e ( a , u , [ "]" ] , l , c ) ; if ( "{" == h ) return i ( a , 2 ) , e ( a , u , [ "}" ] , l , c ) ; if ( "<" == h ) return i ( a , 2 ) , e ( a , u , [ ">" ] , l , c ) ; if ( /[\^'"!~\/]/ . test ( h ) ) return i ( a , 1 ) , e ( a , u , [ a . eat ( h ) ] , l , c ) } else if ( /[\^'"!~\/(\[{<]/ . test ( h ) ) { if ( "(" == h ) return i ( a , 1 ) , e ( a , u , [ ")" ] , "string" ) ; if ( "[" == h ) return i ( a , 1 ) , e ( a , u , [ "]" ] , "string" ) ; if ( "{" == h ) return i ( a , 1 ) , e ( a , u , [ "}" ] , "string" ) ; if ( "<" == h ) return i ( a , 1 ) , e ( a , u , [ ">" ] , "string" ) ; if ( /[\^'"!~\/]/ . test ( h ) ) return e ( a , u , [ a . eat ( h ) ] , "string" ) } } if ( "m" == f ) { var h = t ( a , - 2 ) ; if ( ( ! h || ! /\w/ . test ( h ) ) && ( h = a . eat ( /[(\[{<\^'"!~\/]/ ) ) ) { if ( /[\^'"!~\/]/ . test ( h ) ) return e ( a , u , [ h ] , l , c ) ; if ( "(" == h ) return e ( a , u , [ ")" ] , l , c ) ; if ( "[" == h ) return e ( a , u , [ "]" ] , l , c ) ; if ( "{" == h ) return e ( a , u , [ "}" ] , l , c ) ; if ( "<" == h ) return e ( a , u , [ ">" ] , l , c ) } } if ( "s" == f ) { var h = /[\/>\]})\w]/ . test ( t ( a , - 2 ) ) ; if ( ! h && ( h = a . eat ( /[(\[{<\^'"!~\/]/ ) ) ) return "[" == h ? e ( a , u , [ "]" , "]" ] , l , c ) : "{" == h ? e ( a , u , [ "}" , "}" ] , l , c ) : "<" == h ? e ( a , u , [ ">" , ">" ] , l , c ) : "(" == h ? e ( a , u , [ ")" , ")" ] , l , c ) : e ( a , u , [ h , h ] , l , c ) } if ( "y" == f ) { var h = /[\/>\]})\w]/ . test ( t ( a , - 2 )
var a = r [ o ] , s = a . to ( ) . line + 1 , l = a . from ( ) . line ; 0 != a . to ( ) . ch || a . empty ( ) || s -- , s < i ? n . push ( s , l ) : n . length && ( n [ n . length - 1 ] = l ) , i = l } t . operation ( function ( ) { for ( var e = n . length - 2 ; e >= 0 ; e -= 2 ) { var r = n [ e ] , i = n [ e + 1 ] , o = t . getLine ( r ) ; r == t . lastLine ( ) ? t . replaceRange ( "" , d ( r - 1 ) , d ( r ) , "+swapLine" ) : t . replaceRange ( "" , d ( r , 0 ) , d ( r + 1 , 0 ) , "+swapLine" ) , t . replaceRange ( o + "\n" , d ( i , 0 ) , null , "+swapLine" ) } t . scrollIntoView ( ) } ) } , f [ u [ h + "/" ] = "toggleCommentIndented" ] = function ( e ) { e . toggleComment ( { indent : ! 0 } ) } , f [ u [ h + "J" ] = "joinLines" ] = function ( e ) { for ( var t = e . listSelections ( ) , r = [ ] , n = 0 ; n < t . length ; n ++ ) { for ( var i = t [ n ] , o = i . from ( ) , a = o . line , s = i . to ( ) . line ; n < t . length - 1 && t [ n + 1 ] . from ( ) . line == s ; ) s = t [ ++ n ] . to ( ) . line ; r . push ( { start : a , end : s , anchor : ! i . empty ( ) && o } ) } e . operation ( function ( ) { for ( var t = 0 , n = [ ] , i = 0 ; i < r . length ; i ++ ) { for ( var o , a = r [ i ] , s = a . anchor && d ( a . anchor . line - t , a . anchor . ch ) , l = a . start ; l <= a . end ; l ++ ) { var c = l - t ; l == a . end && ( o = d ( c , e . getLine ( c ) . length + 1 ) ) , c < e . lastLine ( ) && ( e . replaceRange ( " " , d ( c ) , d ( c + 1 , /^\s*/ . exec ( e . getLine ( c + 1 ) ) [ 0 ] . length ) ) , ++ t ) } n . push ( { anchor : s || o , head : o } ) } e . setSelections ( n , 0 ) } ) } , f [ u [ "Shift-" + h + "D" ] = "duplicateLine" ] = function ( e ) { e . operation ( function ( ) { for ( var t = e . listSelections ( ) . length , r = 0 ; r < t ; r ++ ) { var n = e . listSelections ( ) [ r ] ; n . empty ( ) ? e . replaceRange ( e . getLine ( n . head . line ) + "\n" , d ( n . head . line , 0 ) ) : e . replaceRange ( e . getRange ( n . from ( ) , n . to ( ) ) , n . from ( ) ) } e . scrollIntoView ( ) } ) } , u [ h + "T" ] = "transposeChars" , f [ u . F9 = "sortLines" ] = function ( e ) { a ( e , ! 0 ) } , f [ u [ h + "F9" ] = "sortLinesInsensitive" ] = function ( e ) { a ( e , ! 1 ) } , f [ u . F2 = "nextBookmark" ] = function ( e ) { var t = e . state . sublimeBookmarks ; if ( t ) for ( ; t . length ; ) { var r = t . shift ( ) , n = r . find ( ) ; if ( n ) return t . push ( r ) , e . setSelection ( n . from , n . to ) } } , f [ u [ "Shift-F2" ] = "prevBookmark" ] = function ( e ) { var t = e . state . sublimeBookmarks ; if ( t ) for ( ; t . length ; ) { t . unshift ( t . pop ( ) ) ; var r = t [ t . length - 1 ] . find ( ) ; if ( r ) return e . setSelection ( r . from , r . to ) ; t . pop ( ) } } , f [ u [ h + "F2" ] = "toggleBookmark" ] = function ( e ) { for ( var t = e . listSelections ( ) , r = e . state . sublimeBookmarks || ( e . state . sublimeBookmarks = [ ] ) , n = 0 ; n < t . length ; n ++ ) { for ( var i = t [ n ] . from ( ) , o = t [ n ] . to ( ) , a = e . findMarks ( i , o ) , s = 0 ; s < a . length ; s ++ ) if ( a [ s ] . sublimeBookmark ) { a [ s ] . clear ( ) ; for ( var l = 0 ; l < r . length ; l ++ ) r [ l ] == a [ s ] && r . splice ( l -- , 1 ) ; break } s == a . length && r . push ( e . markText ( i , o , { sublimeBookmark : ! 0 , clearWhenEmpty : ! 1 } ) ) } } , f [ u [ "Shift-" + h + "F2" ] = "clearBookmarks" ] = function ( e ) { var t = e . state . sublimeBookmarks ; if ( t ) for ( var r = 0 ; r < t . length ; r ++ ) t [ r ] . clear ( ) ; t . length = 0 } , f [ u [ "Alt-F2" ] = "selectBookmarks" ] = function ( e ) { var t = e . state . sublimeBookmarks , r = [ ] ; if ( t ) for ( var n = 0 ; n < t . length ; n ++ ) { var i = t [ n ] . find ( ) ; i ? r . push ( { anchor : i . from , head : i . to } ) : t . splice ( n -- , 0 ) } r . length && e . setSelections ( r , 0 ) } , u [ "Alt-Q" ] = "wrapLines" ; var b = h + "K " ; u [ b + h + "Backspace" ] = "delLineLeft" , f [ u . Backspace = "smartBackspace" ] = function ( t ) { return t . somethingSelected ( ) ? e . Pass : void t . operation ( function ( ) { for ( var r = t . listSelections ( ) , n = t . getOption ( "indentUnit" ) , i = r . length - 1 ; i >= 0 ; i -- ) { var o = r [ i ] . head , a = t . getRange ( { line : o . line , ch : 0 } , o ) , s = e . countColumn ( a , null , t . getOption ( "tabSize" ) ) , l = t . findPosH ( o , - 1 , "char" , ! 1 ) ; if ( a && ! /\S/ . test ( a ) && s % n == 0 ) { var c = new d ( o . line , e . findColumn ( a , s - n , n ) ) ; c . ch != o . ch && ( l = c ) } t . replaceRange ( "" , l , o , "+delete" ) } } ) } , f [ u [ b + h + "K" ] = "delLineRight" ] = function ( e ) { e . operation ( function ( ) { for ( var t = e . listSelections ( ) , r = t . length - 1 ; r >= 0 ; r -- ) e . replaceRange ( "" , t [ r ] . anchor , d ( t [ r ] . to ( ) . line ) , "+delete" ) ; e . scrollIntoView ( ) } ) } , f [ u [ b + h + "U" ] = "upcaseAtCursor" ] = function ( e ) { s ( e , function ( e ) { return e . toUpperCase ( ) } ) } , f [ u [ b + h + "L" ] = "downcaseAtCursor" ] = function ( e ) { s ( e , function ( e ) { return e . toLowerCase ( ) } ) } , f [ u [ b + h + "Space" ] = "setSublimeMark" ] = function ( e ) { e . state . sublimeMark && e . state . sublimeMark . clear ( ) , e . state . sublimeMark = e . setBookmark ( e . getCursor ( ) ) } , f [ u [ b + h + "A" ] = "selectToSublimeMark" ] = function ( e ) { var t = e . state . sublimeMark && e . state . sublimeMark . find ( ) ; t && e . setSelection ( e . getCursor ( ) , t ) } , f [ u [ b + h + "W" ] = "deleteToSublimeMark" ] = function ( t ) { var r = t . state . sublimeMark && t . state . sublimeMark . find ( ) ; if ( r ) { var n = t . getCursor ( ) , i = r ; if ( e . cmpPos ( n , i ) > 0 ) { var o = i ; i = n , n = o } t . state . sublimeKilled = t . getRange ( n , i ) , t . replaceRange ( "" , n , i ) } } , f [ u [ b + h + "X" ] = "swapWithSublimeMark" ] = function ( e ) { var t = e . state . sublimeMark && e . state . sublimeMark . find ( ) ; t && ( e . state . sublimeMark . cle
return r } } function Ae ( e ) { for ( var t = ! 1 , r = [ ] , n = 0 ; n < e . length ; n ++ ) { var i = e . charAt ( n ) ; t || "/" != i || r . push ( n ) , t = ! t && "\\" == i } return r } function Ee ( e ) { for ( var t = "|(){" , r = "}" , n = ! 1 , i = [ ] , o = - 1 ; o < e . length ; o ++ ) { var a = e . charAt ( o ) || "" , s = e . charAt ( o + 1 ) || "" , l = s && t . indexOf ( s ) != - 1 ; n ? ( "\\" === a && l || i . push ( a ) , n = ! 1 ) : "\\" === a ? ( n = ! 0 , s && r . indexOf ( s ) != - 1 && ( l = ! 0 ) , l && "\\" !== s || i . push ( a ) ) : ( i . push ( a ) , l && "\\" !== s && i . push ( "\\" ) ) } return i . join ( "" ) } function Oe ( e ) { for ( var t = ! 1 , r = [ ] , n = - 1 ; n < e . length ; n ++ ) { var i = e . charAt ( n ) || "" , o = e . charAt ( n + 1 ) || "" ; At [ i + o ] ? ( r . push ( At [ i + o ] ) , n ++ ) : t ? ( r . push ( i ) , t = ! 1 ) : "\\" === i ? ( t = ! 0 , m ( o ) || "$" === o ? r . push ( "$" ) : "/" !== o && "\\" !== o && r . push ( "\\" ) ) : ( "$" === i && r . push ( "$" ) , r . push ( i ) , "/" === o && r . push ( "\\" ) ) } return r . join ( "" ) } function ze ( t ) { for ( var r = new e . StringStream ( t ) , n = [ ] ; ! r . eol ( ) ; ) { for ( ; r . peek ( ) && "\\" != r . peek ( ) ; ) n . push ( r . next ( ) ) ; var i = ! 1 ; for ( var o in Et ) if ( r . match ( o , ! 0 ) ) { i = ! 0 , n . push ( Et [ o ] ) ; break } i || n . push ( r . next ( ) ) } return n . join ( "" ) } function Ie ( e , t , r ) { var n = kt . registerController . getRegister ( "/" ) ; if ( n . setText ( e ) , e instanceof RegExp ) return e ; var i , o , a = Ae ( e ) ; if ( a . length ) { i = e . substring ( 0 , a [ 0 ] ) ; var s = e . substring ( a [ 0 ] ) ; o = s . indexOf ( "i" ) != - 1 } else i = e ; if ( ! i ) return null ; x ( "pcre" ) || ( i = Ee ( i ) ) , r && ( t = /^[^A-Z]*$/ . test ( i ) ) ; var l = new RegExp ( i , t || o ? "i" : void 0 ) ; return l } function Ne ( e , t ) { e . openNotification ? e . openNotification ( '<span style="color: red">' + t + "</span>" , { bottom : ! 0 , duration : 5e3 } ) : alert ( t ) } function qe ( e , t ) { var r = '<span style="font-family: monospace; white-space: pre">' + ( e || "" ) + '<input type="text"></span>' ; return t && ( r += ' <span style="color: #888">' + t + "</span>" ) , r } function Pe ( e , t ) { var r = ( t . prefix || "" ) + " " + ( t . desc || "" ) , n = qe ( t . prefix , t . desc ) ; Le ( e , n , r , t . onClose , t ) } function Re ( e , t ) { if ( e instanceof RegExp && t instanceof RegExp ) { for ( var r = [ "global" , "multiline" , "ignoreCase" , "source" ] , n = 0 ; n < r . length ; n ++ ) { var i = r [ n ] ; if ( e [ i ] !== t [ i ] ) return ! 1 } return ! 0 } return ! 1 } function je ( e , t , r , n ) { if ( t ) { var i = Me ( e ) , o = Ie ( t , ! ! r , ! ! n ) ; if ( o ) return Be ( e , o ) , Re ( o , i . getQuery ( ) ) ? o : ( i . setQuery ( o ) , o ) } } function De ( e ) { if ( "^" == e . source . charAt ( 0 ) ) var t = ! 0 ; return { token : function ( r ) { if ( t && ! r . sol ( ) ) return void r . skipToEnd ( ) ; var n = r . match ( e , ! 1 ) ; if ( n ) return 0 == n [ 0 ] . length ? ( r . next ( ) , "searching" ) : r . sol ( ) || ( r . backUp ( 1 ) , e . exec ( r . next ( ) + n [ 0 ] ) ) ? ( r . match ( e ) , "searching" ) : ( r . next ( ) , null ) ; for ( ; ! r . eol ( ) && ( r . next ( ) , ! r . match ( e , ! 1 ) ) ; ) ; } , query : e } } function Be ( e , t ) { var r = Me ( e ) , n = r . getOverlay ( ) ; n && t == n . query || ( n && e . removeOverlay ( n ) , n = De ( t ) , e . addOverlay ( n ) , e . showMatchesOnScrollbar && ( r . getScrollbarAnnotate ( ) && r . getScrollbarAnnotate ( ) . clear ( ) , r . setScrollbarAnnotate ( e . showMatchesOnScrollbar ( t ) ) ) , r . setOverlay ( n ) ) } function Fe ( e , t , r , i ) { return void 0 === i && ( i = 1 ) , e . operation ( function ( ) { for ( var o = e . getCursor ( ) , a = e . getSearchCursor ( r , o ) , s = 0 ; s < i ; s ++ ) { var l = a . find ( t ) ; if ( 0 == s && l && $ ( a . from ( ) , o ) && ( l = a . find ( t ) ) , ! l && ( a = e . getSearchCursor ( r , t ? n ( e . lastLine ( ) ) : n ( e . firstLine ( ) , 0 ) ) , ! a . find ( t ) ) ) return } return a . from ( ) } ) } function We ( e ) { var t = Me ( e ) ; e . removeOverlay ( Me ( e ) . getOverlay ( ) ) , t . setOverlay ( null ) , t . getScrollbarAnnotate ( ) && ( t . getScrollbarAnnotate ( ) . clear ( ) , t . setScrollbarAnnotate ( null ) ) } function He ( e , t , r ) { return "number" != typeof e && ( e = e . line ) , t instanceof Array ? y ( e , t ) : r ? e >= t && e <= r : e == t } function $e ( e ) { var t = e . getScrollInfo ( ) , r = 6 , n = 10 , i = e . coordsChar ( { left : 0 , top : r + t . top } , "local" ) , o = t . clientHeight - n + t . top , a = e . coordsChar ( { left : 0 , top : o } , "local" ) ; return { top : i . line , bottom : a . line } } function Ue ( t , r , n , i , o , a , s , l , c ) { function u ( ) { t . operation ( function ( ) { for ( ; ! m ; ) f ( ) , d ( ) ; p ( ) } ) } function f ( ) { var e = t . getRange ( a . from ( ) , a . to ( ) ) , r = e . replace ( s , l ) ; a . replace ( r ) } function d ( ) { for ( ; a . findNext ( ) && He ( a . from ( ) , i , o ) ; ) if ( n || ! g || a . from ( ) . line != g . line ) return t . scrollIntoView ( a . from ( ) , 30 ) , t . setSelection ( a . from ( ) , a . to ( ) ) , g = a . from ( ) , void ( m = ! 1 ) ; m = ! 0 } function p ( e ) { if ( e && e ( ) , t . focus ( ) , g ) { t . setCursor ( g ) ; var r = t . state . vim ; r . exMode = ! 1 , r . lastHPos = r . lastHSPos = g . ch } c && c ( ) } function h ( r , n , i ) { e . e _stop ( r ) ; var o = e . keyName ( r ) ; switch ( o ) { case "Y" : f ( ) , d ( ) ; break ; case "N" : d ( ) ; break ; case "A" : var a = c ; c = void 0 , t . operation ( u ) , c = a ; break ; case "L" : f ( ) ; case "Q" : case "Esc" : case "Ctrl-C" : case "Ctrl-[" : p ( i ) } return m && p ( i ) , ! 0 } t . state . vim . exMode = ! 0 ; var m = ! 1 , g = a . from ( ) ; return d ( ) , m ? void Ne ( t , "No matches for " + s . source ) : r ? void Pe ( t
o = e . getCursor ( "head" ) , U ( o , i ) ) { var a = o ; o = i , i = a } o . ch = X ( e , o . line ) - 1 } else { var s = Math . max ( t . repeat , 2 ) ; i = e . getCursor ( ) , o = q ( e , n ( i . line + s - 1 , 1 / 0 ) ) } for ( var l = 0 , c = i . line ; c < o . line ; c ++ ) { l = X ( e , i . line ) ; var a = n ( i . line + 1 , X ( e , i . line + 1 ) ) , u = e . getRange ( i , a ) ; u = u . replace ( /\n\s*/g , " " ) , e . replaceRange ( u , i , a ) } var f = n ( i . line , l ) ; r . visualMode && le ( e , ! 1 ) , e . setCursor ( f ) } , newLineAndEnterInsertMode : function ( t , r , i ) { i . insertMode = ! 0 ; var o = H ( t . getCursor ( ) ) ; if ( o . line !== t . firstLine ( ) || r . after ) { o . line = r . after ? o . line : o . line - 1 , o . ch = X ( t , o . line ) , t . setCursor ( o ) ; var a = e . commands . newlineAndIndentContinueComment || e . commands . newlineAndIndent ; a ( t ) } else t . replaceRange ( "\n" , n ( t . firstLine ( ) , 0 ) ) , t . setCursor ( t . firstLine ( ) , 0 ) ; this . enterInsertMode ( t , { repeat : r . repeat } , i ) } , paste : function ( e , t , r ) { var i = H ( e . getCursor ( ) ) , o = kt . registerController . getRegister ( t . registerName ) , a = o . toString ( ) ; if ( a ) { if ( t . matchIndent ) { var s = e . getOption ( "tabSize" ) , l = function ( e ) { var t = e . split ( "\t" ) . length - 1 , r = e . split ( " " ) . length - 1 ; return t * s + 1 * r } , c = e . getLine ( e . getCursor ( ) . line ) , u = l ( c . match ( /^\s*/ ) [ 0 ] ) , f = a . replace ( /\n$/ , "" ) , d = a !== f , p = l ( a . match ( /^\s*/ ) [ 0 ] ) , a = f . replace ( /^\s*/gm , function ( t ) { var r = u + ( l ( t ) - p ) ; if ( r < 0 ) return "" ; if ( e . getOption ( "indentWithTabs" ) ) { var n = Math . floor ( r / s ) ; return Array ( n + 1 ) . join ( "\t" ) } return Array ( r + 1 ) . join ( " " ) } ) ; a += d ? "\n" : "" } if ( t . repeat > 1 ) var a = Array ( t . repeat + 1 ) . join ( a ) ; var h = o . linewise , m = o . blockwise ; if ( h ) r . visualMode ? a = r . visualLine ? a . slice ( 0 , - 1 ) : "\n" + a . slice ( 0 , a . length - 1 ) + "\n" : t . after ? ( a = "\n" + a . slice ( 0 , a . length - 1 ) , i . ch = X ( e , i . line ) ) : i . ch = 0 ; else { if ( m ) { a = a . split ( "\n" ) ; for ( var g = 0 ; g < a . length ; g ++ ) a [ g ] = "" == a [ g ] ? " " : a [ g ] } i . ch += t . after ? 1 : 0 } var v , y ; if ( r . visualMode ) { r . lastPastedText = a ; var b , k = re ( e , r ) , x = k [ 0 ] , w = k [ 1 ] , _ = e . getSelection ( ) , C = e . listSelections ( ) , S = new Array ( C . length ) . join ( "1" ) . split ( "1" ) ; r . lastSelection && ( b = r . lastSelection . headMark . find ( ) ) , kt . registerController . unnamedRegister . setText ( _ ) , m ? ( e . replaceSelections ( S ) , w = n ( x . line + a . length - 1 , x . ch ) , e . setCursor ( x ) , J ( e , w ) , e . replaceSelections ( a ) , v = x ) : r . visualBlock ? ( e . replaceSelections ( S ) , e . setCursor ( x ) , e . replaceRange ( a , x , x ) , v = x ) : ( e . replaceRange ( a , x , w ) , v = e . posFromIndex ( e . indexFromPos ( x ) + a . length - 1 ) ) , b && ( r . lastSelection . headMark = e . setBookmark ( b ) ) , h && ( v . ch = 0 ) } else if ( m ) { e . setCursor ( i ) ; for ( var g = 0 ; g < a . length ; g ++ ) { var M = i . line + g ; M > e . lastLine ( ) && e . replaceRange ( "\n" , n ( M , 0 ) ) ; var L = X ( e , M ) ; L < i . ch && Q ( e , M , i . ch ) } e . setCursor ( i ) , J ( e , n ( i . line + a . length - 1 , i . ch ) ) , e . replaceSelections ( a ) , v = i } else e . replaceRange ( a , i ) , h && t . after ? v = n ( i . line + 1 , fe ( e . getLine ( i . line + 1 ) ) ) : h && ! t . after ? v = n ( i . line , fe ( e . getLine ( i . line ) ) ) : ! h && t . after ? ( y = e . indexFromPos ( i ) , v = e . posFromIndex ( y + a . length - 1 ) ) : ( y = e . indexFromPos ( i ) , v = e . posFromIndex ( y + a . length ) ) ; r . visualMode && le ( e , ! 1 ) , e . setCursor ( v ) } } , undo : function ( t , r ) { t . operation ( function ( ) { W ( t , e . commands . undo , r . repeat ) ( ) , t . setCursor ( t . getCursor ( "anchor" ) ) } ) } , redo : function ( t , r ) { W ( t , e . commands . redo , r . repeat ) ( ) } , setRegister : function ( e , t , r ) { r . inputState . registerName = t . selectedCharacter } , setMark : function ( e , t , r ) { var n = t . selectedCharacter ; ke ( e , r , n , e . getCursor ( ) ) } , replace : function ( t , r , i ) { var o , a , s = r . selectedCharacter , l = t . getCursor ( ) , c = t . listSelections ( ) ; if ( i . visualMode ) l = t . getCursor ( "start" ) , a = t . getCursor ( "end" ) ; else { var u = t . getLine ( l . line ) ; o = l . ch + r . repeat , o > u . length && ( o = u . length ) , a = n ( l . line , o ) } if ( "\n" == s ) i . visualMode || t . replaceRange ( "" , l , a ) , ( e . commands . newlineAndIndentContinueComment || e . commands . newlineAndIndent ) ( t ) ; else { var f = t . getRange ( l , a ) ; if ( f = f . replace ( /[^\n]/g , s ) , i . visualBlock ) { var d = new Array ( t . getOption ( "tabSize" ) + 1 ) . join ( " " ) ; f = t . getSelection ( ) , f = f . replace ( /\t/g , d ) . replace ( /[^\n]/g , s ) . split ( "\n" ) , t . replaceSelections ( f ) } else t . replaceRange ( f , l , a ) ; i . visualMode ? ( l = U ( c [ 0 ] . anchor , c [ 0 ] . head ) ? c [ 0 ] . anchor : c [ 0 ] . head , t . setCursor ( l ) , le ( t , ! 1 ) ) : t . setCursor ( R ( a , 0 , - 1 ) ) } } , incrementNumberToken : function ( e , t ) { for ( var r , i , o , a , s , l = e . getCursor ( ) , c = e . getLine ( l . line ) , u = /-?\d+/g ; null !== ( r = u . exec ( c ) ) && ( s = r [ 0 ] , i = r . index , o = i + s . length , ! ( l . ch < o ) ) ; ) ; if ( ( t . backtrack || ! ( o <= l . ch ) ) && s ) { var f = t . increase ? 1 : - 1 , d = parseInt ( s ) + f * t . repeat , p = n ( l . line , i ) , h = n ( l . line , o ) ; a = d . toString ( ) , e . replaceRange ( a , p , h ) , e . setCursor ( n ( l . line , i + a . length - 1 ) ) } } , repeatLastEdit : function ( e , t , r ) { var n = r . lastEditInputState ;