2013-01-13 19:30:54 -08:00
window . CodeMirror = function ( ) { "use strict" ; function s ( a , c ) { if ( ! ( this instanceof s ) ) return new s ( a , c ) ; this . options = c = c || { } ; for ( var d in vc ) ! c . hasOwnProperty ( d ) && vc . hasOwnProperty ( d ) && ( c [ d ] = vc [ d ] ) ; D ( c ) ; var e = this . display = t ( a ) ; e . wrapper . CodeMirror = this , A ( this ) , c . autofocus && ! o && sb ( this ) , this . view = u ( new qd ( [ new pd ( [ cd ( "" , null , ib ( e ) ) ] ) ] ) ) , this . nextOpId = 0 , v ( this ) , y ( this ) , c . lineWrapping && ( this . display . wrapper . className += " CodeMirror-wrap" ) , this . setValue ( c . value || "" ) , b && setTimeout ( Wd ( rb , this , ! 0 ) , 20 ) , this . view . history = xd ( ) , ub ( this ) ; var f ; try { f = document . activeElement == e . input } catch ( g ) { } f || c . autofocus && ! o ? setTimeout ( Wd ( Ub , this ) , 20 ) : Vb ( this ) , mb ( this , function ( ) { for ( var a in uc ) uc . propertyIsEnumerable ( a ) && uc [ a ] ( this , c [ a ] , xc ) ; for ( var b = 0 ; Bc . length > b ; ++ b ) Bc [ b ] ( this ) } ) ( ) } function t ( a ) { var b = { } , d = b . input = _d ( "textarea" , null , null , "position: absolute; padding: 0; width: 1px; height: 1em; outline: none;" ) ; d . setAttribute ( "wrap" , "off" ) , d . setAttribute ( "autocorrect" , "off" ) , d . setAttribute ( "autocapitalize" , "off" ) , b . inputDiv = _d ( "div" , [ d ] , null , "overflow: hidden; position: relative; width: 3px; height: 0px;" ) , b . scrollbarH = _d ( "div" , [ _d ( "div" , null , null , "height: 1px" ) ] , "CodeMirror-hscrollbar" ) , b . scrollbarV = _d ( "div" , [ _d ( "div" , null , null , "width: 1px" ) ] , "CodeMirror-vscrollbar" ) , b . scrollbarFiller = _d ( "div" , null , "CodeMirror-scrollbar-filler" ) , b . lineDiv = _d ( "div" ) , b . selectionDiv = _d ( "div" , null , null , "position: relative; z-index: 1" ) , b . cursor = _d ( "pre" , "\u00a0" , "CodeMirror-cursor" ) , b . otherCursor = _d ( "pre" , "\u00a0" , "CodeMirror-cursor CodeMirror-secondarycursor" ) , b . measure = _d ( "div" , null , "CodeMirror-measure" ) , b . lineSpace = _d ( "div" , [ b . measure , b . selectionDiv , b . lineDiv , b . cursor , b . otherCursor ] , null , "position: relative; outline: none" ) , b . mover = _d ( "div" , [ _d ( "div" , [ b . lineSpace ] , "CodeMirror-lines" ) ] , null , "position: relative" ) , b . sizer = _d ( "div" , [ b . mover ] , "CodeMirror-sizer" ) , b . heightForcer = _d ( "div" , "\u00a0" , null , "position: absolute; height: " + Md + "px" ) , b . gutters = _d ( "div" , null , "CodeMirror-gutters" ) , b . lineGutter = null ; var f = _d ( "div" , [ b . sizer , b . heightForcer , b . gutters ] , null , "position: relative; min-height: 100%" ) ; return b . scroller = _d ( "div" , [ f ] , "CodeMirror-scroll" ) , b . scroller . setAttribute ( "tabIndex" , "-1" ) , b . wrapper = _d ( "div" , [ b . inputDiv , b . scrollbarH , b . scrollbarV , b . scrollbarFiller , b . scroller ] , "CodeMirror" ) , c && ( b . gutters . style . zIndex = - 1 , b . scroller . style . paddingRight = 0 ) , a . appendChild ? a . appendChild ( b . wrapper ) : a ( b . wrapper ) , n && ( d . style . width = "0px" ) , e || ( b . scroller . draggable = ! 0 ) , j ? ( b . inputDiv . style . height = "1px" , b . inputDiv . style . position = "absolute" ) : c && ( b . scrollbarH . style . minWidth = b . scrollbarV . style . minWidth = "18px" ) , b . viewOffset = b . showingFrom = b . showingTo = b . lastSizeC = 0 , b . lineNumWidth = b . lineNumInnerWidth = b . lineNumChars = null , b . prevInput = "" , b . alignWidgets = ! 1 , b . pollingFast = ! 1 , b . poll = new Od , b . draggingText = ! 1 , b . cachedCharWidth = b . cachedTextHeight = null , b . measureLineCache = [ ] , b . measureLineCachePos = 0 , b . inaccurateSelection = ! 1 , b . pasteIncoming = ! 1 , b } function u ( a ) { var b = { line : 0 , ch : 0 } ; return { doc : a , frontier : 0 , highlight : new Od , sel : { from : b , to : b , head : b , anchor : b , shift : ! 1 , extend : ! 1 } , scrollTop : 0 , scrollLeft : 0 , overwrite : ! 1 , focused : ! 1 , maxLine : rd ( a , 0 ) , maxLineLength : 0 , maxLineChanged : ! 1 , suppressEdits : ! 1 , goalColumn : null , cantEdit : ! 1 , keyMaps : [ ] } } function v ( a ) { var b = a . view . doc ; a . view . mode = s . getMode ( a . options , a . options . mode ) , b . iter ( 0 , b . size , function ( a ) { a . stateAfter = null } ) , a . view . frontier = 0 , U ( a , 100 ) } function w ( a ) { var b = a . view . doc , c = ib ( a . display ) ; if ( a . options . lineWrapping ) { a . display . wrapper . className += " CodeMirror-wrap" ; var d = a . display . scroller . clientWidth / jb ( a . display ) - 3 ; b . iter ( 0 , b . size , function ( a ) { if ( 0 != a . height ) { var b = Math . ceil ( a . text . length / d ) || 1 ; 1 != b && sd ( a , b * c ) } } ) , a . display . sizer . style . minWidth = "" } else a . display . wrapper . className = a . display . wrapper . className . replace ( " CodeMirror-wrap" , "" ) , C ( a . view ) , b . iter ( 0 , b . size , function ( a ) { 0 != a . height && sd ( a , c ) } ) ; nb ( a , 0 , b . size ) , bb ( a ) , setTimeout ( function ( ) { E ( a . display , a . view . doc . height ) } , 100 ) } function x ( a ) { var b = Fc [ a . options . keyMap ] . style ; a . display . wrapper . className = a . display . wrapper . className . replace ( /\s*cm-keymap-\S+/g , "" ) + ( b ? " cm-keymap-" + b : "" ) } function y ( a ) { a . display . wrapper . className = a . display .
var a = e . input . value = " " + ( bc ( f . from , f . to ) ? "" : e . input . value ) , c = 0 ; e . prevInput = " " , e . input . selectionStart = 1 , e . input . selectionEnd = a . length , Wb = setTimeout ( function g ( ) { " " == e . prevInput && 0 == e . input . selectionStart ? mb ( b , Ec . selectAll ) ( b ) : 10 > c ++ ? Wb = setTimeout ( g , 500 ) : rb ( b ) } , 200 ) } } var e = b . display , f = b . view . sel , g = wb ( b , c ) , i = e . scroller . scrollTop ; if ( g && ! h ) { ( bc ( f . from , f . to ) || cc ( g , f . from ) || ! cc ( g , f . to ) ) && mb ( b , ic ) ( b , g , g ) ; var j = e . input . style . cssText ; e . inputDiv . style . position = "absolute" , e . input . style . cssText = "position: fixed; width: 30px; height: 30px; top: " + ( c . clientY - 5 ) + "px; left: " + ( c . clientX - 5 ) + "px; z-index: 1000; background: white; outline: none;" + "border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);" , sb ( b ) , rb ( b , ! 0 ) , bc ( f . from , f . to ) && ( e . input . value = e . prevInput = " " ) , a ? ( Dd ( c ) , Hd ( window , "mouseup" , function l ( ) { Id ( window , "mouseup" , l ) , setTimeout ( k , 20 ) } ) ) : setTimeout ( k , 50 ) } } function Yb ( a , b , c , d , e , f ) { var g = q && Sc ( a . view . doc , b , c ) ; if ( ! g ) return Zb ( a , b , c , d , e , f ) ; for ( var h = g . length - 1 ; h >= 1 ; -- h ) Zb ( a , g [ h ] . from , g [ h ] . to , [ "" ] , f ) ; return g . length ? Zb ( a , g [ 0 ] . from , g [ 0 ] . to , d , e , f ) : void 0 } function Zb ( a , b , c , d , e , f ) { if ( ! a . view . suppressEdits ) { var g = a . view , h = g . doc , i = [ ] ; h . iter ( b . line , c . line + 1 , function ( a ) { i . push ( _c ( a . text , a . markedSpans ) ) } ) ; var j = g . sel . from , k = g . sel . to , l = Rc ( $c ( i [ 0 ] ) , $c ( Sd ( i ) ) , b . ch , c . ch , d ) , m = _b ( a , b , c , l , e , f ) ; return g . history && yd ( a , b . line , d . length , i , f , j , k , g . sel . from , g . sel . to ) , m } } function $b ( a , b ) { var c = a . view . doc , d = a . view . history , e = ( "undo" == b ? d . done : d . undone ) . pop ( ) ; if ( e ) { for ( var f = { events : [ ] , fromBefore : e . fromAfter , toBefore : e . toAfter , fromAfter : e . fromBefore , toAfter : e . toBefore } , g = e . events . length - 1 ; g >= 0 ; g -= 1 ) { d . dirtyCounter += "undo" == b ? - 1 : 1 ; var h = e . events [ g ] , i = [ ] , j = h . start + h . added ; c . iter ( h . start , j , function ( a ) { i . push ( _c ( a . text , a . markedSpans ) ) } ) , f . events . push ( { start : h . start , added : h . old . length , old : i } ) ; var k = g ? null : { from : e . fromBefore , to : e . toBefore } ; _b ( a , { line : h . start , ch : 0 } , { line : j - 1 , ch : rd ( c , j - 1 ) . text . length } , h . old , k , b ) } ( "undo" == b ? d . undone : d . done ) . push ( f ) } } function _b ( a , b , c , d , e , f ) { var g = a . view , h = g . doc , i = a . display ; if ( ! g . suppressEdits ) { var j = c . line - b . line , k = rd ( h , b . line ) , l = rd ( h , c . line ) , m = ! 1 , n = b . line ; a . options . lineWrapping || ( n = td ( Wc ( h , k ) ) , h . iter ( n , c . line + 1 , function ( a ) { return B ( h , a ) == g . maxLineLength ? ( m = ! 0 , ! 0 ) : void 0 } ) ) ; var o = Sd ( d ) , p = ib ( i ) ; if ( 0 == b . ch && 0 == c . ch && "" == Zc ( o ) ) { for ( var q = [ ] , r = 0 , s = d . length - 1 ; s > r ; ++ r ) q . push ( cd ( Zc ( d [ r ] ) , $c ( d [ r ] ) , p ) ) ; dd ( a , l , l . text , $c ( o ) ) , j && h . remove ( b . line , j , a ) , q . length && h . insert ( b . line , q ) } else if ( k == l ) if ( 1 == d . length ) dd ( a , k , k . text . slice ( 0 , b . ch ) + Zc ( d [ 0 ] ) + k . text . slice ( c . ch ) , $c ( d [ 0 ] ) ) ; else { for ( var q = [ ] , r = 1 , s = d . length - 1 ; s > r ; ++ r ) q . push ( cd ( Zc ( d [ r ] ) , $c ( d [ r ] ) , p ) ) ; q . push ( cd ( Zc ( o ) + k . text . slice ( c . ch ) , $c ( o ) , p ) ) , dd ( a , k , k . text . slice ( 0 , b . ch ) + Zc ( d [ 0 ] ) , $c ( d [ 0 ] ) ) , h . insert ( b . line + 1 , q ) } else if ( 1 == d . length ) dd ( a , k , k . text . slice ( 0 , b . ch ) + Zc ( d [ 0 ] ) + l . text . slice ( c . ch ) , $c ( d [ 0 ] ) ) , h . remove ( b . line + 1 , j , a ) ; else { var q = [ ] ; dd ( a , k , k . text . slice ( 0 , b . ch ) + Zc ( d [ 0 ] ) , $c ( d [ 0 ] ) ) , dd ( a , l , Zc ( o ) + l . text . slice ( c . ch ) , $c ( o ) ) ; for ( var r = 1 , s = d . length - 1 ; s > r ; ++ r ) q . push ( cd ( Zc ( d [ r ] ) , $c ( d [ r ] ) , p ) ) ; j > 1 && h . remove ( b . line + 1 , j - 1 , a ) , h . insert ( b . line + 1 , q ) } if ( a . options . lineWrapping ) { var t = Math . max ( 5 , i . scroller . clientWidth / jb ( i ) - 3 ) ; h . iter ( b . line , b . line + d . length , function ( a ) { if ( 0 != a . height ) { var b = ( Math . ceil ( a . text . length / t ) || 1 ) * p ; b != a . height && sd ( a , b ) } } ) } else h . iter ( n , b . line + d . length , function ( a ) { var b = B ( h , a ) ; b > g . maxLineLength && ( g . maxLine = a , g . maxLineLength = b , g . maxLineChanged = ! 0 , m = ! 1 ) } ) , m && ( a . curOp . updateMaxLine = ! 0 ) ; g . frontier = Math . min ( g . frontier , b . line ) , U ( a , 400 ) ; var u = d . length - j - 1 ; if ( nb ( a , b . line , c . line + 1 , u ) , Ld ( a , "change" ) ) { for ( var r = 0 ; d . length > r ; ++ r ) "string" != typeof d [ r ] && ( d [ r ] = d [ r ] . text ) ; var v = { from : b , to : c , text : d , origin : f } ; if ( a . curOp . textChanged ) { for ( var w = a . curOp . textChanged ; w . next ; w = w . next ) ; w . next = v } else a . curOp . textChanged = v } var x , y , z = { line : b . line + d . length - 1 , ch : Zc ( o ) . length + ( 1 == d . length ? b . ch : 0 ) } ; if ( e && "string" != typeof e ) e . from ? ( x = e . from , y = e . to ) : x = y = e ; else if ( "end" == e ) x = y = z ; else if ( "start" == e ) x = y = b ; else if ( "around" == e ) x = b , y = z ; else { var A = function ( a ) { if ( cc ( a , b ) ) return a ; if ( ! cc ( c , a ) ) return z ; var d = a . line + u , e = a . ch ; return a . line == c . line && ( e += Zc ( o ) . length - ( c . ch - ( c . line == b . line ? b . ch : 0 ) ) ) , { line : d , ch : e } } ;
} ) , g . push ( rd ( d , f ) . text . slice ( 0 , b . ch ) ) , g . join ( c || "\n" ) } , triggerOnKeyDown : mb ( null , Sb ) , execCommand : function ( a ) { return Ec [ a ] ( this ) } , moveH : mb ( null , function ( a , b ) { var c = this . view . sel , d = 0 > a ? c . from : c . to ; ( c . shift || c . extend || bc ( c . from , c . to ) ) && ( d = rc ( this , a , b , ! 0 ) ) , hc ( this , d , d , a ) } ) , deleteH : mb ( null , function ( a , b ) { var c = this . view . sel ; bc ( c . from , c . to ) ? ac ( this , "" , c . from , rc ( this , a , b , ! 1 ) , "delete" ) : ac ( this , "" , c . from , c . to , "delete" ) , this . curOp . userSelChange = ! 0 } ) , moveV : mb ( null , function ( a , b ) { var i , c = this . view , d = c . doc , e = this . display , f = c . sel . head , g = eb ( this , f , "div" ) , h = g . left ; if ( null != c . goalColumn && ( h = c . goalColumn ) , "page" == b ) { var j = Math . min ( e . wrapper . clientHeight , window . innerHeight || document . documentElement . clientHeight ) ; i = g . top + a * j } else "line" == b && ( i = a > 0 ? g . bottom + 3 : g . top - 3 ) ; do { var k = fb ( this , h , i ) ; i += 5 * a } while ( k . outside && ( 0 > a ? i > 0 : d . height > i ) ) ; "page" == b && ( e . scrollbarV . scrollTop += db ( this , k , "div" ) . top - g . top ) , hc ( this , k , k , a ) , c . goalColumn = h } ) , toggleOverwrite : function ( ) { ( this . view . overwrite = ! this . view . overwrite ) ? this . display . cursor . className += " CodeMirror-overwrite" : this . display . cursor . className = this . display . cursor . className . replace ( " CodeMirror-overwrite" , "" ) } , posFromIndex : function ( a ) { var c , b = 0 , d = this . view . doc ; return d . iter ( 0 , d . size , function ( d ) { var e = d . text . length + 1 ; return e > a ? ( c = a , ! 0 ) : ( a -= e , ++ b , void 0 ) } ) , fc ( d , { line : b , ch : c } ) } , indexFromPos : function ( a ) { if ( 0 > a . line || 0 > a . ch ) return 0 ; var b = a . ch ; return this . view . doc . iter ( 0 , a . line , function ( a ) { b += a . text . length + 1 } ) , b } , scrollTo : function ( a , b ) { null != a && ( this . display . scrollbarH . scrollLeft = this . display . scroller . scrollLeft = a ) , null != b && ( this . display . scrollbarV . scrollTop = this . display . scroller . scrollTop = b ) , K ( this , [ ] ) } , getScrollInfo : function ( ) { var a = this . display . scroller , b = Md ; return { left : a . scrollLeft , top : a . scrollTop , height : a . scrollHeight - b , width : a . scrollWidth - b , clientHeight : a . clientHeight - b , clientWidth : a . clientWidth - b } } , scrollIntoView : function ( a ) { "number" == typeof a && ( a = { line : a , ch : 0 } ) , a = a ? fc ( this . view . doc , a ) : this . view . sel . head , mc ( this , a ) } , setSize : function ( a , b ) { function c ( a ) { return "number" == typeof a || /^\d+$/ . test ( a + "" ) ? a + "px" : a } null != a && ( this . display . wrapper . style . width = c ( a ) ) , null != b && ( this . display . wrapper . style . height = c ( b ) ) , this . refresh ( ) } , on : function ( a , b ) { Hd ( this , a , b ) } , off : function ( a , b ) { Id ( this , a , b ) } , operation : function ( a ) { return mb ( this , a ) ( ) } , refresh : function ( ) { bb ( this ) , this . display . scroller . scrollHeight > this . view . scrollTop && ( this . display . scrollbarV . scrollTop = this . display . scroller . scrollTop = this . view . scrollTop ) , K ( this , ! 0 ) } , getInputField : function ( ) { return this . display . input } , getWrapperElement : function ( ) { return this . display . wrapper } , getScrollerElement : function ( ) { return this . display . scroller } , getGutterElement : function ( ) { return this . display . gutters } } ; var uc = s . optionHandlers = { } , vc = s . defaults = { } , xc = s . Init = { toString : function ( ) { return "CodeMirror.Init" } } ; wc ( "value" , "" , function ( a , b ) { a . setValue ( b ) } , ! 0 ) , wc ( "mode" , null , v , ! 0 ) , wc ( "indentUnit" , 2 , v , ! 0 ) , wc ( "indentWithTabs" , ! 1 ) , wc ( "smartIndent" , ! 0 ) , wc ( "tabSize" , 4 , function ( a ) { v ( a ) , bb ( a ) , K ( a , ! 0 ) } , ! 0 ) , wc ( "electricChars" , ! 0 ) , wc ( "theme" , "default" , function ( a ) { y ( a ) , z ( a ) } , ! 0 ) , wc ( "keyMap" , "default" , x ) , wc ( "extraKeys" , null ) , wc ( "onKeyEvent" , null ) , wc ( "onDragEvent" , null ) , wc ( "lineWrapping" , ! 1 , w , ! 0 ) , wc ( "gutters" , [ ] , function ( a ) { D ( a . options ) , z ( a ) } , ! 0 ) , wc ( "lineNumbers" , ! 1 , function ( a ) { D ( a . options ) , z ( a ) } , ! 0 ) , wc ( "firstLineNumber" , 1 , z , ! 0 ) , wc ( "lineNumberFormatter" , function ( a ) { return a } , z , ! 0 ) , wc ( "showCursorWhenSelecting" , ! 1 , Q , ! 0 ) , wc ( "readOnly" , ! 1 , function ( a , b ) { "nocursor" == b ? ( Vb ( a ) , a . display . input . blur ( ) ) : b || rb ( a , ! 0 ) } ) , wc ( "dragDrop" , ! 0 ) , wc ( "cursorBlinkRate" , 530 ) , wc ( "cursorHeight" , 1 ) , wc ( "workTime" , 100 ) , wc ( "workDelay" , 100 ) , wc ( "flattenSpans" , ! 0 ) , wc ( "pollInterval" , 100 ) , wc ( "undoDepth" , 40 ) , wc ( "viewportMargin" , 10 , function ( a ) { a . refresh ( ) } , ! 0 ) , wc ( "tabindex" , null , function ( a , b ) { a . display . input . tabIndex = b || "" } ) , wc ( "autofocus" , null ) ; var yc = s . modes = { } , zc = s . mimeModes = { } ; s . defineMode = function ( a , b ) { if ( s . defaults . mode || "null" == a || ( s . defaults . mode = a ) , arguments . length > 2 ) { b . dependencies = [ ] ; for ( var c = 2 ; arguments . length > c ; ++ c ) b . dependencies . push ( arguments [ c ] ) } yc [ a ] = b } , s . defineMIME = function ( a , b ) { zc [ a ] = b } , s . resolveMode = function ( a ) { if ( "string" == t
} s = c ; break ; default : var v = i . next ( ) ; if ( '"' == v ) o . mode = "string" , s = c ; else if ( "'" != v || n . digit _or _colon . test ( i . peek ( ) ) ) if ( ";" == v ) i . skipToEnd ( ) , s = b ; else if ( r ( v , i ) ) s = e ; else if ( "(" == v || "[" == v ) { var y , w = "" , x = i . column ( ) ; if ( "(" == v ) for ( ; null != ( y = i . eat ( n . keyword _char ) ) ; ) w += y ; w . length > 0 && ( m . propertyIsEnumerable ( w ) || /^(?:def|with)/ . test ( w ) ) ? p ( o , x + h , v ) : ( i . eatSpace ( ) , i . eol ( ) || ";" == i . peek ( ) ? p ( o , x + 1 , v ) : p ( o , x + i . current ( ) . length , v ) ) , i . backUp ( i . current ( ) . length - 1 ) , s = f } else if ( ")" == v || "]" == v ) s = f , null != o . indentStack && o . indentStack . type == ( ")" == v ? "(" : "[" ) && q ( o ) ; else { if ( ":" == v ) return i . eatWhile ( n . lang _keyword ) , d ; i . eatWhile ( n . basic ) , s = k && k . propertyIsEnumerable ( i . current ( ) ) ? g : l && l . propertyIsEnumerable ( i . current ( ) ) ? a : j && j . propertyIsEnumerable ( i . current ( ) ) ? d : null } else s = d } return s } , indent : function ( a ) { return null == a . indentStack ? a . indentation : a . indentStack . indent } } } ) , CodeMirror . defineMIME ( "text/x-clojure" , "clojure" ) , CodeMirror . defineMode ( "coffeescript" , function ( a ) { function c ( a ) { return RegExp ( "^((" + a . join ( ")|(" ) + "))\\b" ) } function s ( a , c ) { if ( a . sol ( ) ) { var l = c . scopes [ 0 ] . offset ; if ( a . eatSpace ( ) ) { var m = a . indentation ( ) ; return m > l ? "indent" : l > m ? "dedent" : null } l > 0 && w ( a , c ) } if ( a . eatSpace ( ) ) return null ; var q = a . peek ( ) ; if ( a . match ( "####" ) ) return a . skipToEnd ( ) , "comment" ; if ( a . match ( "###" ) ) return c . tokenize = u , c . tokenize ( a , c ) ; if ( "#" === q ) return a . skipToEnd ( ) , "comment" ; if ( a . match ( /^-?[0-9\.]/ , ! 1 ) ) { var s = ! 1 ; if ( a . match ( /^-?\d*\.\d+(e[\+\-]?\d+)?/i ) && ( s = ! 0 ) , a . match ( /^-?\d+\.\d*/ ) && ( s = ! 0 ) , a . match ( /^-?\.\d+/ ) && ( s = ! 0 ) , s ) return "." == a . peek ( ) && a . backUp ( 1 ) , "number" ; var v = ! 1 ; if ( a . match ( /^-?0x[0-9a-f]+/i ) && ( v = ! 0 ) , a . match ( /^-?[1-9]\d*(e[\+\-]?\d+)?/ ) && ( v = ! 0 ) , a . match ( /^-?0(?![\dx])/i ) && ( v = ! 0 ) , v ) return "number" } if ( a . match ( o ) ) return c . tokenize = t ( a . current ( ) , "string" ) , c . tokenize ( a , c ) ; if ( a . match ( p ) ) { if ( "/" != a . current ( ) || a . match ( /^.*\// , ! 1 ) ) return c . tokenize = t ( a . current ( ) , "string-2" ) , c . tokenize ( a , c ) ; a . backUp ( 1 ) } return a . match ( h ) || a . match ( g ) ? "punctuation" : a . match ( f ) || a . match ( d ) || a . match ( k ) ? "operator" : a . match ( e ) ? "punctuation" : a . match ( r ) ? "atom" : a . match ( n ) ? "keyword" : a . match ( i ) ? "variable" : a . match ( j ) ? "property" : ( a . next ( ) , b ) } function t ( c , d ) { var e = 1 == c . length ; return function ( f , g ) { for ( ; ! f . eol ( ) ; ) if ( f . eatWhile ( /[^'"\/\\]/ ) , f . eat ( "\\" ) ) { if ( f . next ( ) , e && f . eol ( ) ) return d } else { if ( f . match ( c ) ) return g . tokenize = s , d ; f . eat ( /['"\/]/ ) } return e && ( a . mode . singleLineStringErrors ? d = b : g . tokenize = s ) , d } } function u ( a , b ) { for ( ; ! a . eol ( ) ; ) { if ( a . eatWhile ( /[^#]/ ) , a . match ( "###" ) ) { b . tokenize = s ; break } a . eatWhile ( "#" ) } return "comment" } function v ( b , c , d ) { d = d || "coffee" ; var e = 0 ; if ( "coffee" === d ) { for ( var f = 0 ; c . scopes . length > f ; f ++ ) if ( "coffee" === c . scopes [ f ] . type ) { e = c . scopes [ f ] . offset + a . indentUnit ; break } } else e = b . column ( ) + b . current ( ) . length ; c . scopes . unshift ( { offset : e , type : d } ) } function w ( a , b ) { if ( 1 != b . scopes . length ) { if ( "coffee" === b . scopes [ 0 ] . type ) { for ( var c = a . indentation ( ) , d = - 1 , e = 0 ; b . scopes . length > e ; ++ e ) if ( c === b . scopes [ e ] . offset ) { d = e ; break } if ( - 1 === d ) return ! 0 ; for ( ; b . scopes [ 0 ] . offset !== c ; ) b . scopes . shift ( ) ; return ! 1 } return b . scopes . shift ( ) , ! 1 } } function x ( a , c ) { var d = c . tokenize ( a , c ) , e = a . current ( ) ; if ( "." === e ) return d = c . tokenize ( a , c ) , e = a . current ( ) , "variable" === d ? "variable" : b ; "return" === e && ( c . dedent += 1 ) , ( "->" !== e && "=>" !== e || c . lambda || "coffee" != c . scopes [ 0 ] . type || "" !== a . peek ( ) ) && "indent" !== d || v ( a , c ) ; var f = "[({" . indexOf ( e ) ; return - 1 !== f && v ( a , c , "])}" . slice ( f , f + 1 ) ) , l . exec ( e ) && v ( a , c ) , "then" == e && w ( a , c ) , "dedent" === d && w ( a , c ) ? b : ( f = "])}" . indexOf ( e ) , - 1 !== f && w ( a , c ) ? b : ( c . dedent > 0 && a . eol ( ) && "coffee" == c . scopes [ 0 ] . type && ( c . scopes . length > 1 && c . scopes . shift ( ) , c . dedent -= 1 ) , d ) ) } var b = "error" , d = RegExp ( "^[\\+\\-\\*/%&|\\^~<>!?]" ) , e = RegExp ( "^[\\(\\)\\[\\]\\{\\},:`=;\\.]" ) , f = RegExp ( "^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))" ) , g = RegExp ( "^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))" ) , h = RegExp ( "^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))" ) , i = RegExp ( "^[_A-Za-z$][_A-Za-z$0-9]*" ) , j = RegExp ( "^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*" ) , k = c ( [ "and" , "or" , "not" , "is" , "isnt" , "in" , "instanceof" , "typeof" ] ) , l = [ "for" , "while" , "loop" , "if" , "unless" , "else" , "switch" , "try" , "catch" , "finally" , "class" ] , m = [ "break" , "by" , " contin
return { startState : function ( ) { return { tokenStack : [ ] , context : ! 1 , lastToken : null } } , token : function ( a , b ) { return x ( a , b ) } , indent : function ( a , b ) { return E ( a , b ) } } } ) , CodeMirror . defineMode ( "gfm" , function ( a ) { function c ( a ) { return a . code = ! 1 , null } var b = 0 , d = { startState : function ( ) { return { code : ! 1 , codeBlock : ! 1 , ateSpace : ! 1 } } , copyState : function ( a ) { return { code : a . code , codeBlock : a . codeBlock , ateSpace : a . ateSpace } } , token : function ( a , c ) { if ( c . codeBlock ) return a . match ( /^```/ ) ? ( c . codeBlock = ! 1 , null ) : ( a . skipToEnd ( ) , null ) ; if ( a . sol ( ) && ( c . code = ! 1 ) , a . sol ( ) && a . match ( /^```/ ) ) return a . skipToEnd ( ) , c . codeBlock = ! 0 , null ; if ( "`" === a . peek ( ) ) { a . next ( ) ; var d = a . pos ; a . eatWhile ( "`" ) ; var e = 1 + a . pos - d ; return c . code ? e === b && ( c . code = ! 1 ) : ( b = e , c . code = ! 0 ) , null } if ( c . code ) return a . next ( ) , null ; if ( a . eatSpace ( ) ) return c . ateSpace = ! 0 , null ; if ( a . sol ( ) || c . ateSpace ) { if ( c . ateSpace = ! 1 , a . match ( /^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/ ) ) return "link" ; if ( a . match ( /^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/ ) ) return "link" } return a . match ( /^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i ) ? "link" : ( a . next ( ) , null ) } , blankLine : c } ; return CodeMirror . defineMIME ( "gfmBase" , { name : "markdown" , underscoresBreakWords : ! 1 , fencedCodeBlocks : ! 0 } ) , CodeMirror . overlayMode ( CodeMirror . getMode ( a , "gfmBase" ) , d ) } , "markdown" ) , CodeMirror . defineMode ( "go" , function ( a ) { function g ( a , b ) { var g = a . next ( ) ; if ( '"' == g || "'" == g || "`" == g ) return b . tokenize = h ( g ) , b . tokenize ( a , b ) ; if ( /[\d\.]/ . test ( g ) ) return "." == g ? a . match ( /^[0-9]+([eE][\-+]?[0-9]+)?/ ) : "0" == g ? a . match ( /^[xX][0-9a-fA-F]+/ ) || a . match ( /^0[0-7]+/ ) : a . match ( /^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/ ) , "number" ; if ( /[\[\]{}\(\),;\:\.]/ . test ( g ) ) return f = g , null ; if ( "/" == g ) { if ( a . eat ( "*" ) ) return b . tokenize = i , i ( a , b ) ; if ( a . eat ( "/" ) ) return a . skipToEnd ( ) , "comment" } if ( e . test ( g ) ) return a . eatWhile ( e ) , "operator" ; a . eatWhile ( /[\w\$_]/ ) ; var j = a . current ( ) ; return c . propertyIsEnumerable ( j ) ? ( ( "case" == j || "default" == j ) && ( f = "case" ) , "keyword" ) : d . propertyIsEnumerable ( j ) ? "atom" : "variable" } function h ( a ) { return function ( b , c ) { for ( var e , d = ! 1 , f = ! 1 ; null != ( e = b . next ( ) ) ; ) { if ( e == a && ! d ) { f = ! 0 ; break } d = ! d && "\\" == e } return ( f || ! d && "`" != a ) && ( c . tokenize = g ) , "string" } } function i ( a , b ) { for ( var d , c = ! 1 ; d = a . next ( ) ; ) { if ( "/" == d && c ) { b . tokenize = g ; break } c = "*" == d } return "comment" } function j ( a , b , c , d , e ) { this . indented = a , this . column = b , this . type = c , this . align = d , this . prev = e } function k ( a , b , c ) { return a . context = new j ( a . indented , b , c , null , a . context ) } function l ( a ) { var b = a . context . type ; return ( ")" == b || "]" == b || "}" == b ) && ( a . indented = a . context . indented ) , a . context = a . context . prev } var f , b = a . indentUnit , c = { "break" : ! 0 , "case" : ! 0 , chan : ! 0 , "const" : ! 0 , "continue" : ! 0 , "default" : ! 0 , defer : ! 0 , "else" : ! 0 , fallthrough : ! 0 , "for" : ! 0 , func : ! 0 , go : ! 0 , "goto" : ! 0 , "if" : ! 0 , "import" : ! 0 , "interface" : ! 0 , map : ! 0 , "package" : ! 0 , range : ! 0 , "return" : ! 0 , select : ! 0 , struct : ! 0 , "switch" : ! 0 , type : ! 0 , "var" : ! 0 , bool : ! 0 , "byte" : ! 0 , complex64 : ! 0 , complex128 : ! 0 , float32 : ! 0 , float64 : ! 0 , int8 : ! 0 , int16 : ! 0 , int32 : ! 0 , int64 : ! 0 , string : ! 0 , uint8 : ! 0 , uint16 : ! 0 , uint32 : ! 0 , uint64 : ! 0 , "int" : ! 0 , uint : ! 0 , uintptr : ! 0 } , d = { "true" : ! 0 , "false" : ! 0 , iota : ! 0 , nil : ! 0 , append : ! 0 , cap : ! 0 , close : ! 0 , complex : ! 0 , copy : ! 0 , imag : ! 0 , len : ! 0 , make : ! 0 , "new" : ! 0 , panic : ! 0 , print : ! 0 , println : ! 0 , real : ! 0 , recover : ! 0 } , e = /[+\-*&^%:=<>!|\/]/ ; return { startState : function ( a ) { return { tokenize : null , context : new j ( ( a || 0 ) - b , 0 , "top" , ! 1 ) , indented : 0 , startOfLine : ! 0 } } , token : function ( a , b ) { var c = b . context ; if ( a . sol ( ) && ( null == c . align && ( c . align = ! 1 ) , b . indented = a . indentation ( ) , b . startOfLine = ! 0 , "case" == c . type && ( c . type = "}" ) ) , a . eatSpace ( ) ) return null ; f = null ; var d = ( b . tokenize || g ) ( a , b ) ; return "comment" == d ? d : ( null == c . align && ( c . align = ! 0 ) , "{" == f ? k ( b , a . column ( ) , "}" ) : "[" == f ? k ( b , a . column ( ) , "]" ) : "(" == f ? k ( b , a . column ( ) , ")" ) : "case" == f ? c . type = "case" : "}" == f && "}" == c . type ? c = l ( b ) : f == c . type && l ( b ) , b . startOfLine = ! 1 , d ) } , indent : function ( a , c ) { if ( a . tokenize != g && null != a . tokenize ) return 0 ; var d = a . context , e = c && c . charAt ( 0 ) ; if ( "case" == d . type && /^(?:case|default)\b/ . test ( c ) ) return a . context . type = "}" , d . indented ; var f = e == d . type ; return d . align ? d . column + ( f ?
if ( "&" == e ) return a . eatWhile ( /[\w\-]/ ) , d ( null , e ) ; if ( a . eatWhile ( /[\w\\\-_%.{]/ ) , "string" == c ) return d ( "string" , "string" ) ; if ( null != a . current ( ) . match ( /(^http$|^https$)/ ) ) return a . eatWhile ( /[\w\\\-_%.{:\/]/ ) , d ( "string" , "string" ) ; if ( "<" == a . peek ( ) || ">" == a . peek ( ) ) return d ( "tag" , "tag" ) ; if ( /\(/ . test ( a . peek ( ) ) ) return d ( null , e ) ; if ( "/" == a . peek ( ) && void 0 != b . stack [ b . stack . length - 1 ] ) return d ( "string" , "string" ) ; if ( a . current ( ) . match ( /\-\d|\-.\d/ ) ) return d ( "number" , "unit" ) ; if ( f ( a . current ( ) . toLowerCase ( ) ) ) return d ( "tag" , "tag" ) ; if ( /\/|[\s\)]/ . test ( a . peek ( ) || a . eol ( ) || a . eatSpace ( ) && "/" == a . peek ( ) ) && - 1 !== a . current ( ) . indexOf ( "." ) ) return "{" == a . current ( ) . substring ( a . current ( ) . length - 1 , a . current ( ) . length ) ? ( a . backUp ( 1 ) , d ( "tag" , "tag" ) ) : ( a . eatSpace ( ) , /[{<>.a-zA-Z\/]/ . test ( a . peek ( ) ) || a . eol ( ) ? d ( "tag" , "tag" ) : d ( "string" , "string" ) ) ; if ( a . eol ( ) || "[" == a . peek ( ) || "#" == a . peek ( ) || "tag" == c ) return "{" == a . current ( ) . substring ( a . current ( ) . length - 1 , a . current ( ) . length ) && a . backUp ( 1 ) , d ( "tag" , "tag" ) ; if ( "compare" == c || "a" == c || "(" == c ) return d ( "string" , "string" ) ; if ( "|" == c || "-" == a . current ( ) || "[" == c ) return d ( null , e ) ; if ( ":" == a . peek ( ) ) { a . next ( ) ; var h = ":" == a . peek ( ) ? ! 0 : ! 1 ; if ( h ) a . backUp ( 1 ) ; else { var m = a . pos , n = a . current ( ) . length ; a . eatWhile ( /[a-z\\\-]/ ) ; var o = a . pos ; if ( null != a . current ( ) . substring ( n - 1 ) . match ( g ) ) return a . backUp ( o - ( m - 1 ) ) , d ( "tag" , "tag" ) ; a . backUp ( o - ( m - 1 ) ) } return h ? d ( "tag" , "tag" ) : d ( "variable" , "variable" ) } return d ( "variable" , "variable" ) } if ( ":" == e ) return a . eatWhile ( /[a-z\\\-]/ ) , g . test ( a . current ( ) ) ? d ( "tag" , "tag" ) : ":" == a . peek ( ) ? ( a . next ( ) , a . eatWhile ( /[a-z\\\-]/ ) , a . current ( ) . match ( /\:\:\-(o|ms|moz|webkit)\-/ ) ? d ( "string" , "string" ) : g . test ( a . current ( ) . substring ( 1 ) ) ? d ( "tag" , "tag" ) : d ( null , e ) ) : d ( null , e ) ; if ( "~" != e ) return d ( null , e ) ; if ( "r" == c ) return d ( "string" , "string" ) } } } function i ( a , b ) { return a . skipToEnd ( ) , b . tokenize = h , d ( "comment" , "comment" ) } function j ( a , b ) { for ( var e , c = ! 1 ; null != ( e = a . next ( ) ) ; ) { if ( c && "/" == e ) { b . tokenize = h ; break } c = "*" == e } return d ( "comment" , "comment" ) } function k ( a , b ) { for ( var e , c = 0 ; null != ( e = a . next ( ) ) ; ) { if ( c >= 2 && ">" == e ) { b . tokenize = h ; break } c = "-" == e ? c + 1 : 0 } return d ( "comment" , "comment" ) } function l ( a ) { return function ( b , c ) { for ( var f , e = ! 1 ; null != ( f = b . next ( ) ) && ( f != a || e ) ; ) e = ! e && "\\" == f ; return e || ( c . tokenize = h ) , d ( "string" , "string" ) } } var c , b = a . indentUnit , e = "a abbr acronym address applet area article aside audio b base basefont bdi bdo big blockquote body br button canvas caption cite code col colgroup command datalist dd del details dfn dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins keygen kbd label legend li link map mark menu meta meter nav noframes noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small source span strike strong style sub summary sup table tbody td textarea tfoot th thead time title tr track tt u ul var video wbr" . split ( " " ) , g = /(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/ ; return { startState : function ( a ) { return { tokenize : h , baseIndent : a || 0 , stack : [ ] } } , token : function ( a , b ) { if ( a . eatSpace ( ) ) return null ; var d = b . tokenize ( a , b ) , e = b . stack [ b . stack . length - 1 ] ; return "hash" == c && "rule" == e ? d = "atom" : "variable" == d && ( "rule" == e ? d = null : e && "@media{" != e || ( d = "when" == a . current ( ) ? "variable" : /[\s,|\s\)|\s]/ . test ( a . peek ( ) ) ? "tag" : c ) ) , "rule" == e && /^[\{\};]$/ . test ( c ) && b . stack . pop ( ) , "{" == c ? "@media" == e ? b . stack [ b . stack . length - 1 ] = "@media{" : b . stack . push ( "{" ) : "}" == c ? b . stack . pop ( ) : "@media" == c ? b . stack . push ( "@media" ) : "{" == e && "comment" != c && b . stack . push ( "rule" ) , d } , indent : function ( a , c ) { var d = a . stack . length ; return /^\}/ . test ( c ) && ( d -= "rule" == a . stack [ a . stack . length - 1 ] ? 2 : 1 ) , a . baseIndent + d * b } , electricChars : "}" } } ) , CodeMirror . defineMIME ( "text/x-less" , "less" ) , CodeMirror . mimeModes . hasOwnProperty ( "text/css" ) || CodeMirror . defineMIM
return { startState : function ( ) { return { tokenize : f , chain : null , style : null , tail : null } } , token : function ( a , b ) { return ( b . tokenize || f ) ( a , b ) } , electricChars : "{}" } } ) , CodeMirror . defineMIME ( "text/x-perl" , "perl" ) , CodeMirror . StringStream . prototype . look = function ( a ) { return this . string . charAt ( this . pos + ( a || 0 ) ) } , CodeMirror . StringStream . prototype . prefix = function ( a ) { if ( a ) { var b = this . pos - a ; return this . string . substr ( b >= 0 ? b : 0 , a ) } return this . string . substr ( 0 , this . pos - 1 ) } , CodeMirror . StringStream . prototype . suffix = function ( a ) { var b = this . string . length , c = b - this . pos + 1 ; return this . string . substr ( this . pos , a && b > a ? a : c ) } , CodeMirror . StringStream . prototype . nsuffix = function ( a ) { var b = this . pos , c = a || this . string . length - this . pos + 1 ; return this . pos += c , this . string . substr ( b , c ) } , CodeMirror . StringStream . prototype . eatSuffix = function ( a ) { var c , b = this . pos + a ; this . pos = 0 >= b ? 0 : b >= ( c = this . string . length - 1 ) ? c : b } , function ( ) { function a ( a ) { for ( var b = { } , c = a . split ( " " ) , d = 0 ; c . length > d ; ++ d ) b [ c [ d ] ] = ! 0 ; return b } function b ( a ) { return function ( b , c ) { return b . match ( a ) ? c . tokenize = null : b . skipToEnd ( ) , "string" } } var c = { name : "clike" , keywords : a ( "abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent" ) , blockKeywords : a ( "catch do else elseif for foreach if switch try while" ) , atoms : a ( "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__" ) , builtin : a ( " func _num _args func _get _arg func _get _args strlen strcmp strncmp strcasecmp strncasecmp each error _reporting define defined trigger _error user _error set _error _handler restore _error _handler get _declared _classes get _loaded _extensions extension _loaded get _extension _funcs debug _backtrace constant bin2hex sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html _entity _decode md5 md5 _file crc32 getimagesize image _type _to _mime _type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr _count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str _shuffle str _word _count strcoll substr substr _replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str _replace str _repeat count _chars chunk _split trim ltrim strip _tags similar _text explode implode setlocale localeconv parse _str str _pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse _url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell _exec proc _open proc _close rand srand getrandmax mt _rand mt _srand mt _getrandmax base64 _decode base64 _encode abs ceil floor round is _finite is _nan is _infinite bindec hexdec octdec decbin decoct dechex base _convert number _format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted _printable _decode set _time _limit get _cfg _var magic _quotes _runtime set _magic _quotes _runtime get _magic _quotes _gpc get _magic _quotes _runtime import _request _variables error _log serialize unserialize memory _get _usage var _dump var _export debug _zval _dump print _r highlight _file show _source highlight _string ini _get ini _get _all ini _set ini _alter ini _restore get _include _path set _include _path restore _include _path setcookie header headers _sent connection _aborted connection _status ignore _user _abort parse _ini _file is _uploaded _file move _uploaded _file intval floatval doubleval strval gettype settype is _null is _resource is _bool is _long is _float is _int is _integer is _double is _real is _numeric is _string is _array is _object is _scalar ereg ereg _replace eregi eregi _replace split spliti join sql _regcase dl pclose popen readfile rewind rmdir umask fclose
} return ":" == c ? a . eat ( "'" ) ? h ( k ( "'" , "atom" , ! 1 ) , a , b ) : a . eat ( '"' ) ? h ( k ( '"' , "atom" , ! 0 ) , a , b ) : ( a . eatWhile ( /[\w\?]/ ) , "atom" ) : "@" == c ? ( a . eat ( "@" ) , a . eatWhile ( /[\w\?]/ ) , "variable-2" ) : "$" == c ? ( a . next ( ) , a . eatWhile ( /[\w\?]/ ) , "variable-3" ) : /\w/ . test ( c ) ? ( a . eatWhile ( /[\w\?]/ ) , a . eat ( ":" ) ? "atom" : "ident" ) : "|" != c || ! b . varList && "{" != b . lastTok && "do" != b . lastTok ? /[\(\)\[\]{}\\;]/ . test ( c ) ? ( g = c , null ) : "-" == c && a . eat ( ">" ) ? "arrow" : /[=+\-\/*:\.^%<>~|]/ . test ( c ) ? ( a . eatWhile ( /[=+\-\/*:\.^%<>~|]/ ) , "operator" ) : null : ( g = "|" , null ) } function j ( ) { var a = 1 ; return function ( b , c ) { if ( "}" == b . peek ( ) ) { if ( a -- , 0 == a ) return c . tokenize . pop ( ) , c . tokenize [ c . tokenize . length - 1 ] ( b , c ) } else "{" == b . peek ( ) && a ++ ; return i ( b , c ) } } function k ( a , b , c , d ) { return function ( e , f ) { for ( var h , g = ! 1 ; null != ( h = e . next ( ) ) ; ) { if ( h == a && ( d || ! g ) ) { f . tokenize . pop ( ) ; break } if ( c && "#" == h && ! g && e . eat ( "{" ) ) { f . tokenize . push ( j ( arguments . callee ) ) ; break } g = ! g && "\\" == h } return b } } function l ( a ) { return function ( b , c ) { return b . match ( a ) ? c . tokenize . pop ( ) : b . skipToEnd ( ) , "string" } } function m ( a , b ) { return a . sol ( ) && a . match ( "=end" ) && a . eol ( ) && b . tokenize . pop ( ) , a . skipToEnd ( ) , "comment" } var g , c = b ( [ "alias" , "and" , "BEGIN" , "begin" , "break" , "case" , "class" , "def" , "defined?" , "do" , "else" , "elsif" , "END" , "end" , "ensure" , "false" , "for" , "if" , "in" , "module" , "next" , "not" , "or" , "redo" , "rescue" , "retry" , "return" , "self" , "super" , "then" , "true" , "undef" , "unless" , "until" , "when" , "while" , "yield" , "nil" , "raise" , "throw" , "catch" , "fail" , "loop" , "callcc" , "caller" , "lambda" , "proc" , "public" , "protected" , "private" , "require" , "load" , "require_relative" , "extend" , "autoload" ] ) , d = b ( [ "def" , "class" , "case" , "for" , "while" , "do" , "module" , "then" , "catch" , "loop" , "proc" , "begin" ] ) , e = b ( [ "end" , "until" ] ) , f = { "[" : "]" , "{" : "}" , "(" : ")" } ; return { startState : function ( ) { return { tokenize : [ i ] , indented : 0 , context : { type : "top" , indented : - a . indentUnit } , continuedLine : ! 1 , lastTok : null , varList : ! 1 } } , token : function ( a , b ) { a . sol ( ) && ( b . indented = a . indentation ( ) ) ; var h , f = b . tokenize [ b . tokenize . length - 1 ] ( a , b ) ; if ( "ident" == f ) { var i = a . current ( ) ; f = c . propertyIsEnumerable ( a . current ( ) ) ? "keyword" : /^[A-Z]/ . test ( i ) ? "tag" : "def" == b . lastTok || "class" == b . lastTok || b . varList ? "def" : "variable" , d . propertyIsEnumerable ( i ) ? h = "indent" : e . propertyIsEnumerable ( i ) ? h = "dedent" : "if" != i && "unless" != i || a . column ( ) != a . indentation ( ) || ( h = "indent" ) } return ( g || f && "comment" != f ) && ( b . lastTok = i || g || f ) , "|" == g && ( b . varList = ! b . varList ) , "indent" == h || /[\(\[\{]/ . test ( g ) ? b . context = { prev : b . context , type : g || f , indented : b . indented } : ( "dedent" == h || /[\)\]\}]/ . test ( g ) ) && b . context . prev && ( b . context = b . context . prev ) , a . eol ( ) && ( b . continuedLine = "\\" == g || "operator" == f ) , f } , indent : function ( b , c ) { if ( b . tokenize [ b . tokenize . length - 1 ] != i ) return 0 ; var d = c && c . charAt ( 0 ) , e = b . context , g = e . type == f [ d ] || "keyword" == e . type && /^(?:end|until|else|elsif|when|rescue)\b/ . test ( c ) ; return e . indented + ( g ? 0 : a . indentUnit ) + ( b . continuedLine ? a . indentUnit : 0 ) } , electricChars : "}de" } } ) , CodeMirror . defineMIME ( "text/x-ruby" , "ruby" ) , CodeMirror . defineMode ( "rust" , function ( ) { function h ( a , b ) { return f = a , b } function i ( a , b ) { var c = a . next ( ) ; if ( '"' == c ) return b . tokenize = j , b . tokenize ( a , b ) ; if ( "'" == c ) return f = "atom" , a . eat ( "\\" ) ? a . skipTo ( "'" ) ? ( a . next ( ) , "string" ) : "error" : ( a . next ( ) , a . eat ( "'" ) ? "string" : "error" ) ; if ( "/" == c ) { if ( a . eat ( "/" ) ) return a . skipToEnd ( ) , "comment" ; if ( a . eat ( "*" ) ) return b . tokenize = k ( 1 ) , b . tokenize ( a , b ) } if ( "#" == c ) return a . eat ( "[" ) ? ( f = "open-attr" , null ) : ( a . eatWhile ( /\w/ ) , h ( "macro" , "meta" ) ) ; if ( ":" == c && a . match ( ":<" ) ) return h ( "op" , null ) ; if ( c . match ( /\d/ ) || "." == c && a . eat ( /\d/ ) ) { var d = ! 1 ; return a . match ( /^x[\da-f]+/i ) || a . match ( /^b[01]+/ ) || ( a . eatWhile ( /\d/ ) , a . eat ( "." ) && ( d = ! 0 , a . eatWhile ( /\d/ ) ) , a . match ( /^e[+\-]?\d+/i ) && ( d = ! 0 ) ) , d ? a . match ( /^f(?:32|64)/ ) : a . match ( /^[ui](?:8|16|32|64)/ ) , h ( "atom" , "number" ) } return c . match ( /[()\[\]{}:;,]/ ) ? h ( c , null ) : "-" == c && a . eat ( ">" ) ? h ( "->" , null ) : c . match ( e ) ? ( a . eatWhile ( e ) , h ( "op" , null ) ) : ( a . eatWhile ( /\w/ ) , g = a . current ( ) , a . match ( /^::\w/ ) ? ( a . backUp ( 1 ) , h ( "prefix" , "variable-2" ) ) : b . keywords . propertyIsEnumerable ( g ) ? h ( b . keywords [ g ] , g . match ( /true|false/ ) ? "atom" : "keyword" ) : h ( "name" , "variable" ) ) } function j ( a , b ) { for ( var c , d = ! 1 ; c = a . next ( ) ; ) { if ( '"' == c && ! d ) return b . tokenize = i , h ( "atom" , "string" ) ; d = ! d && "\\" == c } return h ( "op" , "string" ) } function k ( a ) { return function ( b , c ) { fo
} function i ( a ) { return function ( b , c ) { for ( ; ! b . eol ( ) ; ) if ( b . next ( ) == a ) { c . tokenize = h ; break } return "string" } } function j ( ) { return function ( a , b ) { for ( ; ! a . eol ( ) ; ) { var c = a . next ( ) , d = a . peek ( ) ; if ( " " == c || "," == c || /[ )}]/ . test ( d ) ) { b . tokenize = h ; break } } return "string" } } function m ( ) { for ( var a = arguments . length - 1 ; a >= 0 ; a -- ) k . cc . push ( arguments [ a ] ) } function n ( ) { return m . apply ( null , arguments ) , ! 0 } function o ( a , b ) { var c = k . context && k . context . noIndent ; k . context = { prev : k . context , pluginName : a , indent : k . indented , startOfLine : b , noIndent : c } } function p ( ) { k . context && ( k . context = k . context . prev ) } function q ( a ) { if ( "openPlugin" == a ) return k . pluginName = f , n ( t , r ( k . startOfLine ) ) ; if ( "closePlugin" == a ) { var b = ! 1 ; return k . context ? ( b = k . context . pluginName != f , p ( ) ) : b = ! 0 , b && ( l = "error" ) , n ( s ( b ) ) } return "string" == a ? ( k . context && "!cdata" == k . context . name || o ( "!cdata" ) , k . tokenize == d && p ( ) , n ( ) ) : n ( ) } function r ( a ) { return function ( b ) { return "selfclosePlugin" == b || "endPlugin" == b ? n ( ) : "endPlugin" == b ? ( o ( k . pluginName , a ) , n ( ) ) : n ( ) } } function s ( a ) { return function ( b ) { return a && ( l = "error" ) , "endPlugin" == b ? n ( ) : m ( ) } } function t ( a ) { return "keyword" == a ? ( l = "attribute" , n ( t ) ) : "equals" == a ? n ( u , t ) : m ( ) } function u ( a ) { return "keyword" == a ? ( l = "string" , n ( ) ) : "string" == a ? n ( v ) : m ( ) } function v ( a ) { return "string" == a ? n ( v ) : m ( ) } var f , g , k , l , e = a . indentUnit ; return { startState : function ( ) { return { tokenize : d , cc : [ ] , indented : 0 , startOfLine : ! 0 , pluginName : null , context : null } } , token : function ( a , b ) { if ( a . sol ( ) && ( b . startOfLine = ! 0 , b . indented = a . indentation ( ) ) , a . eatSpace ( ) ) return null ; l = g = f = null ; var c = b . tokenize ( a , b ) ; if ( ( c || g ) && "comment" != c ) for ( k = b ; ; ) { var d = b . cc . pop ( ) || q ; if ( d ( g || c ) ) break } return b . startOfLine = ! 1 , l || c } , indent : function ( a , b ) { var c = a . context ; if ( c && c . noIndent ) return 0 ; for ( c && /^{\// . test ( b ) && ( c = c . prev ) ; c && ! c . startOfLine ; ) c = c . prev ; return c ? c . indent + e : 0 } , electricChars : "/" } } ) , CodeMirror . defineMIME ( "text/tiki" , "tiki" ) , CodeMirror . defineMode ( "vb" , function ( a , b ) { function d ( a ) { return RegExp ( "^((" + a . join ( ")|(" ) + "))\\b" , "i" ) } function z ( a , b ) { b . currentIndent ++ } function A ( a , b ) { b . currentIndent -- } function B ( a , b ) { if ( a . eatSpace ( ) ) return null ; var d = a . peek ( ) ; if ( "'" === d ) return a . skipToEnd ( ) , "comment" ; if ( a . match ( /^((&H)|(&O))?[0-9\.a-f]/i , ! 1 ) ) { var k = ! 1 ; if ( a . match ( /^\d*\.\d+F?/i ) ? k = ! 0 : a . match ( /^\d+\.\d*F?/ ) ? k = ! 0 : a . match ( /^\.\d+F?/ ) && ( k = ! 0 ) , k ) return a . eat ( /J/i ) , "number" ; var l = ! 1 ; if ( a . match ( /^&H[0-9a-f]+/i ) ? l = ! 0 : a . match ( /^&O[0-7]+/i ) ? l = ! 0 : a . match ( /^[1-9]\d*F?/ ) ? ( a . eat ( /J/i ) , l = ! 0 ) : a . match ( /^0(?![\dx])/i ) && ( l = ! 0 ) , l ) return a . eat ( /L/i ) , "number" } return a . match ( s ) ? ( b . tokenize = C ( a . current ( ) ) , b . tokenize ( a , b ) ) : a . match ( i ) || a . match ( h ) ? null : a . match ( g ) || a . match ( e ) || a . match ( n ) ? "operator" : a . match ( f ) ? null : a . match ( x ) ? ( z ( a , b ) , b . doInCurrentLine = ! 0 , "keyword" ) : a . match ( t ) ? ( b . doInCurrentLine ? b . doInCurrentLine = ! 1 : z ( a , b ) , "keyword" ) : a . match ( u ) ? "keyword" : a . match ( w ) ? ( A ( a , b ) , A ( a , b ) , "keyword" ) : a . match ( v ) ? ( A ( a , b ) , "keyword" ) : a . match ( r ) ? "keyword" : a . match ( q ) ? "keyword" : a . match ( j ) ? "variable" : ( a . next ( ) , c ) } function C ( a ) { var d = 1 == a . length , e = "string" ; return function ( f , g ) { for ( ; ! f . eol ( ) ; ) { if ( f . eatWhile ( /[^'"]/ ) , f . match ( a ) ) return g . tokenize = B , e ; f . eat ( /['"]/ ) } if ( d ) { if ( b . singleLineStringErrors ) return c ; g . tokenize = B } return e } } function D ( a , b ) { var d = b . tokenize ( a , b ) , e = a . current ( ) ; if ( "." === e ) return d = b . tokenize ( a , b ) , e = a . current ( ) , "variable" === d ? "variable" : c ; var f = "[({" . indexOf ( e ) ; return - 1 !== f && z ( a , b ) , "dedent" === y && A ( a , b ) ? c : ( f = "])}" . indexOf ( e ) , - 1 !== f && A ( a , b ) ? c : d ) } var c = "error" , e = RegExp ( "^[\\+\\-\\*/%&\\\\|\\^~<>!]" ) , f = RegExp ( "^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]" ) , g = RegExp ( "^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))" ) , h = RegExp ( "^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))" ) , i = RegExp ( "^((//=)|(>>=)|(<<=)|(\\*\\*=))" ) , j = RegExp ( "^[_A-Za-z][_A-Za-z0-9]*" ) , k = [ "class" , "module" , "sub" , "enum" , "select" , "while" , "if" , "function" , "get" , "set" , "property" , "try" ] , l = [ "else" , "elseif" , "case" , "catch" ] , m = [ "next" , "loop" ] , n = d ( [ "and" , "or" , "not" , "xor" , "in" ] ) , o = [ "as" , "dim" , "break" , "continue" , "optional" , "then" , "until" , "goto" , "byval" , "byref" , "new" , "handles" , "property" , "return" , "const" , "private" , "protected" , "friend" , "public" , "shared" , "static" , "true" , "false" ] , p = [ "integer" , "string" , "double" , "decimal" , "boolean" , "short" , "char" , "float" , "single" ] , q =
} function F ( ) { this . reset ( ) } function G ( a , b ) { this . clear ( ) , a && this . set ( a , b ) } function H ( a ) { this . registers = a , this . unamedRegister = a [ '"' ] = new G } function N ( a , b , c ) { var d = Math . min ( Math . max ( 0 , b . line ) , a . lineCount ( ) - 1 ) , e = Y ( a , d ) - 1 ; e = c ? e + 1 : e ; var f = Math . min ( Math . max ( 0 , b . ch ) , e ) ; return { line : d , ch : f } } function P ( a ) { var b = { } ; for ( var c in a ) a . hasOwnProperty ( c ) && ( b [ c ] = a [ c ] ) ; return b } function Q ( a , b , c ) { return { line : a . line + b , ch : a . ch + c } } function S ( a , b ) { for ( var c = 0 ; a . length > c ; c ++ ) if ( a [ c ] != b [ c ] && "character" != b [ c ] ) return ! 1 ; return ! 0 } function U ( a , b , c ) { return function ( ) { for ( var d = 0 ; c > d ; d ++ ) b ( a ) } } function V ( a ) { return { line : a . line , ch : a . ch } } function W ( a , b ) { return a . ch == b . ch && a . line == b . line } function X ( a , b ) { return a . line < b . line ? ! 0 : a . line == b . line && a . ch < b . ch ? ! 0 : ! 1 } function Y ( a , b ) { return a . getLine ( b ) . length } function Z ( a ) { return a . split ( "" ) . reverse ( ) . join ( "" ) } function $ ( a ) { return a . trim ? a . trim ( ) : a . replace ( /^\s+|\s+$/g , "" ) } function _ ( a ) { return a . replace ( /([.?*+$\[\]\/\\(){}|\-])/g , "\\$1" ) } function ab ( a , b ) { b . visualMode = ! 1 , b . visualLine = ! 1 ; var c = a . getCursor ( "anchor" ) , d = a . getCursor ( "head" ) ; W ( c , d ) || a . setCursor ( N ( a , d ) ) } function bb ( a , b , c ) { var d = a . getRange ( b , c ) , e = d . split ( "\n" ) ; e . length > 1 && y ( e . pop ( ) ) && ( c . line -- , c . ch = Y ( a , c . line ) ) } function cb ( a , b , c ) { b . ch = 0 , c . ch = 0 , c . line ++ } function db ( a ) { if ( ! a ) return 0 ; var b = a . search ( /\S/ ) ; return - 1 == b ? a . length : b } function eb ( a , b , c , d , e ) { var j , f = a . getCursor ( ) , g = a . getLine ( f . line ) , h = f . ch , i = g . substring ( h ) ; if ( j = e ? i . search ( /\w/ ) : i . search ( /\S/ ) , - 1 == j ) return null ; h += j , i = g . substring ( h ) ; var l , k = g . substring ( 0 , h ) ; l = d ? /^\S+/ : /\w/ . test ( g . charAt ( h ) ) ? /^\w+/ : /^[^\w\s]+/ ; var m = l . exec ( i ) , n = h , o = h + m [ 0 ] . length - 1 , p = l . exec ( Z ( k ) ) ; return p && ( n -= p [ 0 ] . length ) , b && o ++ , { start : { line : f . line , ch : n } , end : { line : f . line , ch : o } } } function fb ( a , b , c , d ) { for ( var e = b . line , h = b . ch , i = a . getLine ( e ) , j = c ? 1 : - 1 , k = d ? g : f ; ; ) { for ( var l = j > 0 ? i . length : - 1 , m = l , n = l ; h != l ; ) { for ( var o = ! 1 , p = 0 ; k . length > p && ! o ; ++ p ) if ( k [ p ] . test ( i . charAt ( h ) ) ) { for ( m = h ; h != l && k [ p ] . test ( i . charAt ( h ) ) ; ) h += j ; if ( n = h , o = m != n , m == b . ch && e == b . line && n == m + j ) continue ; return { from : Math . min ( m , n + 1 ) , to : Math . max ( m , n ) , line : e } } o || ( h += j ) } if ( e += j , ! r ( a , e ) ) return null ; i = a . getLine ( e ) , h = j > 0 ? 0 : i . length } throw "The impossible happened." } function gb ( a , b , c , d , e ) { for ( var f = a . getCursor ( ) , g = 0 ; b > g ; g ++ ) for ( var j , i = ( f . ch , f . line ) , k = ! 1 ; ! k ; ) { if ( j = fb ( a , f , c , e ) , k = ! 0 , ! j ) return c ? { line : f . line , ch : Y ( a , f . line ) } : { line : f . line , ch : 0 } ; f . line = j . line , c && d ? f . ch = j . to - 1 : c && ! d ? z ( f . ch , j . from , j . to ) && j . line == i ? ( k = ! 1 , f . ch = j . to - 1 ) : f . ch = j . from : ! c && d ? z ( f . ch , j . from , j . to ) && j . line == i ? ( k = ! 1 , f . ch = j . from ) : f . ch = j . to : c || d || ( f . ch = j . from ) } return f } function hb ( a , b , c , d ) { for ( var g , e = a . getCursor ( ) , f = e . ch , h = 0 ; b > h ; h ++ ) { var i = a . getLine ( e . line ) ; if ( g = jb ( f , i , d , c , ! 0 ) , - 1 == g ) return e ; f = g } return { line : a . getCursor ( ) . line , ch : g } } function ib ( a , b ) { var c = a . getCursor ( ) . line ; return N ( a , { line : c , ch : b - 1 } ) } function jb ( a , b , c , d , e ) { var f ; return d ? ( f = b . indexOf ( c , a + 1 ) , - 1 == f || e || ( f -= 1 ) ) : ( f = b . lastIndexOf ( c , a - 1 ) , - 1 == f || e || ( f += 1 ) ) , f } function kb ( a , b , c ) { var d = b . line ; c = c ? c : a . getLine ( d ) . charAt ( b . ch ) , A ( c , [ "(" , "[" , "{" ] ) ; var f = { "(" : ")" , ")" : "(" , "[" : "]" , "]" : "[" , "{" : "}" , "}" : "{" } [ c ] ; if ( ! f ) return b ; for ( var g = { "(" : 1 , "{" : 1 , "[" : 1 } [ c ] || - 1 , h = 1 , i = c , j = b . ch , k = a . getLine ( d ) ; i && h > 0 ; ) j += g , i = k . charAt ( j ) , i || ( d += g , j = 0 , k = a . getLine ( d ) || "" , i = k . charAt ( j ) ) , i === c ? h ++ : i === f && h -- ; return i ? { line : d , ch : j } : b } function lb ( a , b , c ) { var d = a . getCursor ( ) , e = kb ( a , d , b ) , f = kb ( a , e ) ; return f . ch += c ? 1 : 0 , e . ch += c ? 0 : 1 , { start : f , end : e } } function nb ( a , b , c ) { var g , h , i , j , d = a . getCursor ( ) , e = a . getLine ( d . line ) , f = e . split ( "" ) , k = f . indexOf ( b ) ; if ( k > d . ch ? d . ch = k : d . ch > k && f [ d . ch ] == b && ( h = d . ch , -- d . ch ) , f [ d . ch ] != b || h ) for ( i = d . ch ; i > - 1 && ! g ; i -- ) f [ i ] == b && ( g = i + 1 ) ; else g = d . ch + 1 ; if ( g && ! h ) for ( i = g , j = f . length ; j > i && ! h ; i ++ ) f [ i ] == b && ( h = i ) ; return g && h ? ( c && ( -- g , ++ h ) , { start : { line : d . line , ch : g } , end : { line : d . line , ch : h } } ) : { start : d , end : d } } function ob ( ) { this . marked = null } function pb ( a ) { var b = D ( a ) ; return b . searchState _ || ( b . searchState _ = new ob ) } function qb ( a , b , c , d ) { a . openDialog ? a . openDialog ( b , d , { bottom : ! 0 } ) : d ( prompt ( c , "" ) ) } function rb ( a ) { for ( var b = ! 1 , c = [ ] , d = 0 ; a . length > d ; d ++ ) { var e = a . charAt ( d ) ; b || "/" != e || c . push ( d ) , b = "\\" == e } return c } function sb ( a , b , c , d ) { var f , g , e = rb ( b ) ; if ( e . length ) { f = b . substring ( 0 , e [ 0 ] ) ; var h = b . substring ( e [ 0 ] ) ; g = - 1 != h . indexOf ( "i" ) } else f = b ; if ( ! f