rich 1.4.5 → 1.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. data/lib/rich/version.rb +1 -1
  2. data/vendor/assets/ckeditor/ckeditor-contrib/plugins/MediaEmbed/icons/mediaembed.png +0 -0
  3. data/vendor/assets/ckeditor/ckeditor/build-config.js +1 -3
  4. data/vendor/assets/ckeditor/ckeditor/ckeditor.js +16 -12
  5. data/vendor/assets/ckeditor/ckeditor/lang/en.js +1 -1
  6. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +74 -0
  7. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/css/codemirror.css +6 -1
  8. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -0
  9. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +3 -0
  10. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +2 -0
  11. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +3 -3
  12. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +4 -4
  13. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/{util → addon/foldcode}/foldcode.js +4 -4
  14. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +2 -0
  15. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/format/formatting.js +5 -5
  16. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +2 -0
  17. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/search/search.js +5 -0
  18. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +5 -0
  19. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +25 -0
  20. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/codemirror.js +188 -168
  21. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/codemirror.min.js +187 -0
  22. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/codemirror.modes.min.js +25 -0
  23. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/codemirror.search-addons.min.js +13 -0
  24. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/{css.js → mode/css.js} +0 -0
  25. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/mode/htmlmixed.js +5 -0
  26. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/{javascript.js → mode/javascript.js} +7 -7
  27. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/{xml.js → mode/xml.js} +0 -0
  28. data/vendor/assets/ckeditor/ckeditor/plugins/icons.png +0 -0
  29. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/af.js +11 -0
  30. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ar.js +11 -0
  31. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/bg.js +11 -0
  32. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/bn.js +11 -0
  33. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/bs.js +11 -0
  34. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ca.js +11 -0
  35. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/cs.js +11 -0
  36. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/cy.js +11 -0
  37. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/da.js +11 -0
  38. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/de.js +11 -0
  39. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/el.js +11 -0
  40. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/en-au.js +11 -0
  41. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/en-ca.js +11 -0
  42. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/en-gb.js +11 -0
  43. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/en.js +11 -0
  44. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/eo.js +11 -0
  45. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/es.js +11 -0
  46. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/et.js +11 -0
  47. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/eu.js +11 -0
  48. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/fa.js +11 -0
  49. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/fi.js +11 -0
  50. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/fo.js +11 -0
  51. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/fr-ca.js +11 -0
  52. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/fr.js +11 -0
  53. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/gl.js +11 -0
  54. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/gu.js +11 -0
  55. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/he.js +11 -0
  56. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/hi.js +11 -0
  57. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/hr.js +11 -0
  58. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/hu.js +11 -0
  59. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/is.js +11 -0
  60. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/it.js +11 -0
  61. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ja.js +11 -0
  62. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ka.js +11 -0
  63. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/km.js +11 -0
  64. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ko.js +11 -0
  65. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ku.js +11 -0
  66. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/lt.js +11 -0
  67. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/lv.js +11 -0
  68. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/mk.js +11 -0
  69. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/mn.js +11 -0
  70. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ms.js +11 -0
  71. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/nb.js +11 -0
  72. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/nl.js +11 -0
  73. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/no.js +11 -0
  74. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/pl.js +11 -0
  75. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/pt-br.js +11 -0
  76. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/pt.js +11 -0
  77. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ro.js +11 -0
  78. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ru.js +11 -0
  79. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/sk.js +11 -0
  80. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/sl.js +11 -0
  81. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/sr-latn.js +11 -0
  82. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/sr.js +11 -0
  83. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/sv.js +11 -0
  84. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/th.js +11 -0
  85. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/tr.js +11 -0
  86. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/ug.js +11 -0
  87. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/uk.js +11 -0
  88. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/vi.js +11 -0
  89. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/zh-cn.js +11 -0
  90. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/lang/zh.js +11 -0
  91. data/vendor/assets/ckeditor/ckeditor/plugins/stylescombo/plugin.js +186 -0
  92. data/vendor/assets/ckeditor/ckeditor/samples/index.html +0 -6
  93. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor.css +1 -1
  94. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor_gecko.css +1 -1
  95. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor_ie.css +1 -1
  96. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor_ie7.css +1 -1
  97. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor_ie8.css +1 -1
  98. data/vendor/assets/ckeditor/ckeditor/skins/moono/editor_iequirks.css +1 -1
  99. data/vendor/assets/ckeditor/ckeditor/skins/moono/icons.png +0 -0
  100. metadata +83 -31
  101. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/addon/edit/continuecomment.js +0 -2
  102. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/htmlmixed.js +0 -4
  103. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/closetag.js +0 -3
  104. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/colorize.js +0 -1
  105. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/continuecomment.js +0 -2
  106. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/continuelist.js +0 -1
  107. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.css +0 -32
  108. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/dialog.js +0 -3
  109. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/formatting.js +0 -4
  110. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/javascript-hint.js +0 -5
  111. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/loadmode.js +0 -3
  112. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/match-highlighter.js +0 -2
  113. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/matchbrackets.js +0 -4
  114. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/multiplex.js +0 -4
  115. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/overlay.js +0 -2
  116. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/pig-hint.js +0 -6
  117. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/runmode-standalone.js +0 -5
  118. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/runmode.js +0 -2
  119. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/search.js +0 -5
  120. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/searchcursor.js +0 -5
  121. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/simple-hint.css +0 -16
  122. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/simple-hint.js +0 -4
  123. data/vendor/assets/ckeditor/ckeditor/plugins/codemirror/js/util/xml-hint.js +0 -3
  124. data/vendor/assets/ckeditor/ckeditor/samples/plugins/autogrow/autogrow.html +0 -99
  125. data/vendor/assets/ckeditor/ckeditor/samples/plugins/divarea/divarea.html +0 -62
@@ -0,0 +1,187 @@
1
+ window.CodeMirror=function(){function m(a,b){var c,d,e;if(!(this instanceof m))return new m(a,b);this.options=b=b||{};for(c in cb)!b.hasOwnProperty(c)&&cb.hasOwnProperty(c)&&(b[c]=cb[c]);Qb(b);c=this.display=Id(a,"string"==typeof b.value?0:b.value.first);c.wrapper.CodeMirror=this;yc(this);b.autofocus&&!Rb&&G(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,draggingText:!1,highlight:new Sb};zc(this);b.lineWrapping&&(this.display.wrapper.className+=
2
+ " CodeMirror-wrap");d=b.value;"string"==typeof d&&(d=new H(b.value,b.mode));x(this,Ac)(this,d);K&&setTimeout(O(ba,this,!0),20);Jd(this);try{e=document.activeElement==c.input}catch(f){}e||b.autofocus&&!Rb?setTimeout(O(ca,this),20):Tb(this);x(this,function(){for(var a in da)da.propertyIsEnumerable(a)&&da[a](this,b[a],Ub);for(a=0;a<db.length;++a)db[a](this)})()}function Id(a,b){var c={},d=c.input=s("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none;"),e;return T?
3
+ d.style.width="1000px":d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),c.inputDiv=s("div",[d],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),c.scrollbarH=s("div",[s("div",null,null,"height: 1px")],"CodeMirror-hscrollbar"),c.scrollbarV=s("div",[s("div",null,null,"width: 1px")],"CodeMirror-vscrollbar"),c.scrollbarFiller=s("div",null,"CodeMirror-scrollbar-filler"),c.lineDiv=s("div"),c.selectionDiv=s("div",null,null,"position: relative; z-index: 1"),
4
+ c.cursor=s("div"," ","CodeMirror-cursor"),c.otherCursor=s("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"),c.measure=s("div",null,"CodeMirror-measure"),c.lineSpace=s("div",[c.measure,c.selectionDiv,c.lineDiv,c.cursor,c.otherCursor],null,"position: relative; outline: none"),c.mover=s("div",[s("div",[c.lineSpace],"CodeMirror-lines")],null,"position: relative"),c.sizer=s("div",[c.mover],"CodeMirror-sizer"),c.heightForcer=s("div"," ",null,"position: absolute; height: "+na+"px"),c.gutters=s("div",
5
+ null,"CodeMirror-gutters"),c.lineGutter=null,e=s("div",[c.sizer,c.heightForcer,c.gutters],null,"position: relative; min-height: 100%"),c.scroller=s("div",[e],"CodeMirror-scroll"),c.scroller.setAttribute("tabIndex","-1"),c.wrapper=s("div",[c.inputDiv,c.scrollbarH,c.scrollbarV,c.scrollbarFiller,c.scroller],"CodeMirror"),oa&&(c.gutters.style.zIndex=-1,c.scroller.style.paddingRight=0),a.appendChild?a.appendChild(c.wrapper):a(c.wrapper),eb&&(d.style.width="0px"),T||(c.scroller.draggable=!0),Vb?(c.inputDiv.style.height=
6
+ "1px",c.inputDiv.style.position="absolute"):oa&&(c.scrollbarH.style.minWidth=c.scrollbarV.style.minWidth="18px"),c.viewOffset=c.lastSizeC=0,c.showingFrom=c.showingTo=b,c.lineNumWidth=c.lineNumInnerWidth=c.lineNumChars=null,c.prevInput="",c.alignWidgets=!1,c.pollingFast=!1,c.poll=new Sb,c.draggingText=!1,c.cachedCharWidth=c.cachedTextHeight=null,c.measureLineCache=[],c.measureLineCachePos=0,c.inaccurateSelection=!1,c.maxLine=null,c.maxLineLength=0,c.maxLineChanged=!1,c.wheelDX=c.wheelDY=c.wheelStartX=
7
+ c.wheelStartY=null,c}function fb(a){a.doc.mode=m.getMode(a.options,a.doc.modeOption);a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null)});a.doc.frontier=a.doc.first;gb(a,100);a.state.modeGen++;a.curOp&&y(a)}function Bc(a){var b=hb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/Kd(a.display)-3);return function(e){return ea(a.doc,e)?0:c?(Math.ceil(e.text.length/d)||1)*b:b}}function Cc(a){var b=a.doc,c=Bc(a);b.iter(function(a){var b=
8
+ c(a);b!=a.height&&P(a,b)})}function zc(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-");pa(a)}function Ea(a){yc(a);y(a)}function yc(a){var b=a.display.gutters,c=a.options.gutters,d,e,f;ib(b);for(d=0;d<c.length;++d)e=c[d],f=b.appendChild(s("div",null,"CodeMirror-gutter "+e)),"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px");b.style.display=d?"":"none"}function jb(a,
9
+ b){var c,d,e;if(0==b.height)return 0;c=b.text.length;for(e=b;d=fa(e,-1);)d=d.find(),e=r(a,d.from.line),c+=d.from.ch-d.to.ch;for(e=b;d=Fa(e);)d=d.find(),c-=e.text.length-d.from.ch,e=r(a,d.to.line),c+=e.text.length-d.to.ch;return c}function Wb(a){var b=a.display,c=a.doc;b.maxLine=r(c,c.first);b.maxLineLength=jb(c,b.maxLine);b.maxLineChanged=!0;c.iter(function(a){var e=jb(c,a);e>b.maxLineLength&&(b.maxLineLength=e,b.maxLine=a)})}function Qb(a){for(var b=!1,c=0;c<a.gutters.length;++c)"CodeMirror-linenumbers"==
10
+ a.gutters[c]&&(a.lineNumbers?b=!0:a.gutters.splice(c--,1));!b&&a.lineNumbers&&a.gutters.push("CodeMirror-linenumbers")}function Dc(a,b){var c=b+2*a.lineSpace.offsetTop;a.sizer.style.minHeight=a.heightForcer.style.top=c+"px";var c=Math.max(c,a.scroller.scrollHeight),d=a.scroller.scrollWidth>a.scroller.clientWidth,e=c>a.scroller.clientHeight;e?(a.scrollbarV.style.display="block",a.scrollbarV.style.bottom=d?kb(a.measure)+"px":"0",a.scrollbarV.firstChild.style.height=c-a.scroller.clientHeight+a.scrollbarV.clientHeight+
11
+ "px"):a.scrollbarV.style.display="";d?(a.scrollbarH.style.display="block",a.scrollbarH.style.right=e?kb(a.measure)+"px":"0",a.scrollbarH.firstChild.style.width=a.scroller.scrollWidth-a.scroller.clientWidth+a.scrollbarH.clientWidth+"px"):a.scrollbarH.style.display="";d&&e?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=a.scrollbarFiller.style.width=kb(a.measure)+"px"):a.scrollbarFiller.style.display="";Ld&&0===kb(a.measure)&&(a.scrollbarV.style.minWidth=a.scrollbarH.style.minHeight=
12
+ Md?"18px":"12px")}function Xb(a,b,c){var d=a.scroller.scrollTop,e=a.wrapper.clientHeight,f;return"number"==typeof c?d=c:c&&(d=c.top,e=c.bottom-c.top),d=Math.floor(d-a.lineSpace.offsetTop),f=Math.ceil(d+e),{from:lb(b,d),to:lb(b,f)}}function Ec(a){var b=a.display,c,d,e;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){var f=Yb(b)-b.scroller.scrollLeft+a.doc.scrollLeft,g=b.gutters.offsetWidth,h=f+"px";for(c=b.lineDiv.firstChild;c;c=c.nextSibling)if(c.alignable){d=0;for(e=c.alignable;d<
13
+ e.length;++d)e[d].style.left=h}a.options.fixedGutter&&(b.gutters.style.left=f+g+"px")}}function Nd(a){if(!a.options.lineNumbers)return!1;var b=a.doc,b=""+a.options.lineNumberFormatter(b.first+b.size-1+a.options.firstLineNumber),a=a.display;if(b.length!=a.lineNumChars){var c=a.measure.appendChild(s("div",[s("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),d=c.firstChild.offsetWidth,c=c.offsetWidth-d;return a.lineGutter.style.width="",a.lineNumInnerWidth=Math.max(d,a.lineGutter.offsetWidth-
14
+ c),a.lineNumWidth=a.lineNumInnerWidth+c,a.lineNumChars=a.lineNumInnerWidth?b.length:-1,a.lineGutter.style.width=a.lineNumWidth+"px",!0}return!1}function Yb(a){return C(a.scroller).left-C(a.sizer).left}function mb(a,b,c){var d=a.display.showingFrom,e=a.display.showingTo,b=Fc(a,b,c);return b&&(Q(a,"update",a),(a.display.showingFrom!=d||a.display.showingTo!=e)&&Q(a,"viewportChange",a,a.display.showingFrom,a.display.showingTo)),Zb(a),Dc(a.display,a.doc.height),b}function Fc(a,b,c){var d=a.display,e=a.doc,
15
+ f,g,h,i,l,j,k,q,p,J,$b,n;if(d.wrapper.clientWidth){if(f=Xb(d,e,c),0!=b.length||!(f.from>d.showingFrom)||!(f.to<d.showingTo)){if(Nd(a)&&(b=[{from:e.first,to:e.first+e.size}]),g=d.sizer.style.marginLeft=d.gutters.offsetWidth+"px",d.scrollbarH.style.left=a.options.fixedGutter?g:"0",h=Infinity,a.options.lineNumbers)for(k=0;k<b.length;++k)if(b[k].diff){h=b[k].from;break}k=e.first+e.size;g=Math.max(f.from-a.options.viewportMargin,e.first);f=Math.min(k,f.to+a.options.viewportMargin);if(d.showingFrom<g&&
16
+ 20>g-d.showingFrom&&(g=Math.max(e.first,d.showingFrom)),d.showingTo>f&&20>d.showingTo-f&&(f=Math.min(k,d.showingTo)),Ga)for(g=L(qa(e,r(e,g)));f<k&&ea(e,r(e,f));)++f;if(i=[{from:Math.max(d.showingFrom,e.first),to:Math.min(d.showingTo,k)}],i=i[0].from>=i[0].to?[]:Od(i,b),Ga)for(k=0;k<i.length;++k)for(b=i[k];l=Fa(r(e,b.to-1));)if(j=l.find().from.line,j>b.from)b.to=j;else{i.splice(k--,1);break}for(k=j=0;k<i.length;++k)b=i[k],b.from<g&&(b.from=g),b.to>f&&(b.to=f),b.from>=b.to?i.splice(k--,1):j+=b.to-b.from;
17
+ if(j==f-g&&g==d.showingFrom&&f==d.showingTo)Gc(a);else{i.sort(function(a,b){return a.from-b.from});k=document.activeElement;j<0.7*(f-g)&&(d.lineDiv.style.display="none");Pd(a,g,f,i,h);d.lineDiv.style.display="";document.activeElement!=k&&k.offsetHeight&&k.focus();(h=g!=d.showingFrom||f!=d.showingTo||d.lastSizeC!=d.wrapper.clientHeight)&&(d.lastSizeC=d.wrapper.clientHeight);d.showingFrom=g;d.showingTo=f;gb(a,100);h=d.lineDiv.offsetTop;for(i=d.lineDiv.firstChild;i;i=i.nextSibling)if(i.lineObj&&(oa?
18
+ (p=i.offsetTop+i.offsetHeight,q=p-h,h=p):(J=C(i),q=J.bottom-J.top),$b=i.lineObj.height-q,2>q&&(q=hb(d)),(0.001<$b||-0.001>$b)&&(P(i.lineObj,q),n=i.lineObj.widgets,n)))for(k=0;k<n.length;++k)n[k].height=n[k].node.offsetHeight;return Gc(a),Xb(d,e,c).to>f&&Fc(a,[],c),!0}}}else d.showingFrom=d.showingTo=e.first,d.viewOffset=0}function Gc(a){var b=a.display.viewOffset=ra(a,r(a.doc,a.display.showingFrom));a.display.mover.style.top=b+"px"}function Od(a,b){for(var c,d,e,f=0,g=b.length||0;f<g;++f){var h=b[f],
19
+ i=[],l=h.diff||0;c=0;for(d=a.length;c<d;++c)e=a[c],h.to<=e.from&&h.diff?i.push({from:e.from+l,to:e.to+l}):h.to<=e.from||h.from>=e.to?i.push(e):(h.from>e.from&&i.push({from:e.from,to:h.from}),h.to<e.to&&i.push({from:h.to+l,to:e.to+l}));a=i}return a}function Qd(a){for(var b=a.display,c={},d={},e=b.gutters.firstChild,f=0;e;e=e.nextSibling,++f)c[a.options.gutters[f]]=e.offsetLeft,d[a.options.gutters[f]]=e.offsetWidth;return{fixedPos:Yb(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,
20
+ wrapperWidth:b.wrapper.clientWidth}}function Pd(a,b,c,d,e){function f(b){var c=b.nextSibling;return T&&sa&&a.display.currentWheelTarget==b?(b.style.display="none",b.lineObj=null):b.parentNode.removeChild(b),c}var g=Qd(a),h=a.display,i=a.options.lineNumbers,l,j,k,q;d.length||T&&a.display.currentWheelTarget||ib(h.lineDiv);l=h.lineDiv;j=l.firstChild;k=d.shift();q=b;for(a.doc.iter(b,c,function(b){var c,h,n,m,o;if(k&&k.to==q&&(k=d.shift()),ea(a.doc,b)){if(0!=b.height&&P(b,0),b.widgets&&j.previousSibling)for(c=
21
+ 0;c<b.widgets.length;++c)b.widgets[c].showIfHidden&&(h=j.previousSibling,/pre/i.test(h.nodeName)&&(n=s("div",null,null,"position: relative"),h.parentNode.replaceChild(n,h),n.appendChild(h),h=n),m=h.appendChild(s("div",[b.widgets[c].node],"CodeMirror-linewidget")),ac(b.widgets[c],m,h,g))}else if(k&&k.from<=q&&k.to>q){for(;j.lineObj!=b;)j=f(j);i&&e<=q&&j.lineNumber&&Hc(j.lineNumber,""+a.options.lineNumberFormatter(q+a.options.firstLineNumber));j=j.nextSibling}else{if(b.widgets){h=0;for(n=j;n&&20>h;++h,
22
+ n=n.nextSibling)if(n.lineObj==b&&/div/i.test(n.nodeName)){c=n;break}}var v;h=a;var I=q;m=c;n=Ic(h,b);var r=b.gutterMarkers,t=h.display,x,w,u,A,B,y,C,D,z;if(!h.options.lineNumbers&&!r&&!b.bgClass&&!b.wrapClass&&!b.widgets)v=n;else{if(m){m.alignable=null;x=!0;w=0;for(u=m.firstChild;u;u=A)if(A=u.nextSibling,/\bCodeMirror-linewidget\b/.test(u.className)){z=0;for(B=!0;z<b.widgets.length;++z)if(D=b.widgets[z],y=!1,D.above||(y=B,B=!1),D.node==u.firstChild){ac(D,u,m,g);++w;y&&m.insertBefore(n,u);break}if(z==
23
+ b.widgets.length){x=!1;break}}else m.removeChild(u);x&&w==b.widgets.length&&(v=m,m.className=b.wrapClass||"")}if(v||(v=s("div",null,b.wrapClass,"position: relative"),v.appendChild(n)),b.bgClass&&v.insertBefore(s("div"," ",b.bgClass+" CodeMirror-linebackground"),v.firstChild),(h.options.lineNumbers||r)&&(C=v.insertBefore(s("div",null,null,"position: absolute; left: "+(h.options.fixedGutter?g.fixedPos:-g.gutterTotalWidth)+"px"),v.firstChild),h.options.fixedGutter&&(v.alignable||(v.alignable=[])).push(C),
24
+ !h.options.lineNumbers||r&&r["CodeMirror-linenumbers"]||(v.lineNumber=C.appendChild(s("div",""+h.options.lineNumberFormatter(I+h.options.firstLineNumber),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+g.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.lineNumInnerWidth+"px"))),r))for(D=0;D<h.options.gutters.length;++D)z=h.options.gutters[D],(I=r.hasOwnProperty(z)&&r[z])&&C.appendChild(s("div",[I],"CodeMirror-gutter-elt","left: "+g.gutterLeft[z]+"px; width: "+g.gutterWidth[z]+"px"));if(oa&&
25
+ (v.style.zIndex=2),b.widgets&&v!=m){z=0;for(m=b.widgets;z<m.length;++z)D=m[z],r=s("div",[D.node],"CodeMirror-linewidget"),ac(D,r,v,g),D.above?v.insertBefore(r,h.options.lineNumbers&&0!=b.height?C:n):v.appendChild(r),Q(D,"redraw")}}if(o=v,o!=c)l.insertBefore(o,j);else{for(;j!=c;)j=f(j);j=j.nextSibling}o.lineObj=b}++q});j;)j=f(j)}function ac(a,b,c,d){a.noHScroll&&((c.alignable||(c.alignable=[])).push(b),c=d.wrapperWidth,b.style.left=d.fixedPos+"px",a.coverGutter||(c-=d.gutterTotalWidth,b.style.paddingLeft=
26
+ d.gutterTotalWidth+"px"),b.style.width=c+"px");a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function Zb(a){var b=a.display,c=A(a.doc.sel.from,a.doc.sel.to);if(c||a.options.showCursorWhenSelecting){var d=a.display,e=U(a,a.doc.sel.head,"div");d.cursor.style.left=e.left+"px";d.cursor.style.top=e.top+"px";d.cursor.style.height=Math.max(0,e.bottom-e.top)*a.options.cursorHeight+"px";d.cursor.style.display="";e.other?(d.otherCursor.style.display=
27
+ "",d.otherCursor.style.left=e.other.left+"px",d.otherCursor.style.top=e.other.top+"px",d.otherCursor.style.height=0.85*(e.other.bottom-e.other.top)+"px"):d.otherCursor.style.display="none"}else b.cursor.style.display=b.otherCursor.style.display="none";c?b.selectionDiv.style.display="none":Rd(a);a=U(a,a.doc.sel.head,"div");c=C(b.wrapper);d=C(b.lineDiv);b.inputDiv.style.top=Math.max(0,Math.min(b.wrapper.clientHeight-10,a.top+d.top-c.top))+"px";b.inputDiv.style.left=Math.max(0,Math.min(b.wrapper.clientWidth-
28
+ 10,a.left+d.left-c.left))+"px"}function Rd(a){function b(a,b,c,d){0>b&&(b=0);g.appendChild(s("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?h-a:c)+"px; height: "+(d-b)+"px"))}function c(c,d,f,g){var j=r(e,c),k=j.text.length,l=g?Infinity:-Infinity;return Sd(R(j),d||0,null==f?k:f,function(e,q,p){var m=nb(a,o(c,"rtl"==p?q-1:e),"div",j),p=nb(a,o(c,"rtl"==p?e:q-1),"div",j),r=m.left,s=p.right;3<p.top-m.top&&(b(r,m.top,null,m.bottom),r=i,m.bottom<p.top&&
29
+ b(r,m.bottom,null,p.top));null==f&&q==k&&(s=h);null==d&&0==e&&(r=i);l=g?Math.min(p.top,l):Math.max(p.bottom,l);r<i+1&&(r=i);b(r,p.top,s-r,p.bottom)}),l}var d=a.display,e=a.doc,f=a.doc.sel,g=document.createDocumentFragment(),h=d.lineSpace.offsetWidth,i=V(a.display.measure,s("pre",null,null,"text-align: left")).appendChild(s("span","x")).offsetLeft,l,j,k;if(f.from.line==f.to.line)c(f.from.line,f.from.ch,f.to.ch);else{var q=j=r(e,f.from.line);k=[f.from.line,f.from.ch];for(var p;q=Fa(q);){if(l=q.find(),
30
+ k.push(l.from.ch,l.to.line,l.to.ch),l.to.line==f.to.line){k.push(f.to.ch);p=!0;break}q=r(e,l.to.line)}if(p)for(f=0;f<k.length;f+=3)c(k[f],k[f+1],k[f+2]);else k=r(e,f.to.line),j=f.from.ch?c(f.from.line,f.from.ch,null,!1):ra(a,j)-d.viewOffset,f=f.to.ch?c(f.to.line,fa(k,-1)?null:0,f.to.ch,!0):ra(a,k)-d.viewOffset,j<f&&b(i,j,null,f)}V(d.selectionDiv,g);d.selectionDiv.style.display=""}function ob(a){var b=a.display,c;clearInterval(b.blinker);c=!0;b.cursor.style.visibility=b.otherCursor.style.visibility=
31
+ "";b.blinker=setInterval(function(){b.cursor.offsetHeight&&(b.cursor.style.visibility=b.otherCursor.style.visibility=(c=!c)?"":"hidden")},a.options.cursorBlinkRate)}function gb(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.showingTo&&a.state.highlight.set(b,O(Td,a))}function Td(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.showingTo)){var c=+new Date+a.options.workTime,d=ta(b.mode,Ha(a,b.frontier)),e=[],f;b.iter(b.frontier,Math.min(b.first+b.size,a.display.showingTo+
32
+ 500),function(g){var h,i,l;if(b.frontier>=a.display.showingFrom){h=g.styles;g.styles=Jc(a,g,d);i=!h||h.length!=g.styles.length;for(l=0;!i&&l<h.length;++l)i=h[l]!=g.styles[l];i&&(f&&f.end==b.frontier?f.end++:e.push(f={start:b.frontier,end:b.frontier+1}));g.stateAfter=ta(b.mode,d)}else Kc(a,g,d),g.stateAfter=0==b.frontier%5?ta(b.mode,d):null;return++b.frontier,+new Date>c?(gb(a,a.options.workDelay),!0):void 0});e.length&&x(a,function(){for(var a=0;a<e.length;++a)y(this,e[a].start,e[a].end)})()}}function Ud(a,
33
+ b){for(var c,d,e=a.doc,f,g,h=b,i=b-100;h>i;--h){if(h<=e.first)return e.first;if(f=r(e,h-1),f.stateAfter)return h;g=ua(f.text,null,a.options.tabSize);(null==d||c>g)&&(d=h-1,c=g)}return d}function Ha(a,b){var c=a.doc,d=a.display,e,f;return c.mode.startState?(e=Ud(a,b),f=e>c.first&&r(c,e-1).stateAfter,f=f?ta(c.mode,f):Lc(c.mode),c.iter(e,b,function(g){Kc(a,g,f);g.stateAfter=e==b-1||0==e%5||e>=d.showingFrom&&e<d.showingTo?ta(c.mode,f):null;++e}),f):!0}function Mc(a,b,c,d){for(var e=-1,f,d=d||pb(a,b),
34
+ a=c;!(f=d[a],f);a+=e)0>e&&0==a&&(e=1);return{left:a<c?f.right:f.left,right:a>c?f.left:f.right,top:f.top,bottom:f.bottom}}function pb(a,b){for(var c=a.display,d=a.display.measureLineCache,e,f,g=0;g<d.length;++g)if(f=d[g],f.text==b.text&&f.markedSpans==b.markedSpans&&c.scroller.clientWidth==f.width&&f.classes==b.textClass+"|"+b.bgClass+"|"+b.wrapClass)return f.measure;var h=a.display,g=Nc(b.text.length),i=Ic(a,b,g),l,j,k,q,p,J,m,n,r,o;if(K&&!oa&&!a.options.lineWrapping&&100<i.childNodes.length){var v=
35
+ document.createDocumentFragment(),I=i.childNodes.length;m=0;for(l=Math.ceil(I/10);m<l;++m){j=s("div",null,null,"display: inline-block");for(k=0;10>k&&I;++k)j.appendChild(i.firstChild),--I;v.appendChild(j)}i.appendChild(v)}V(h.measure,i);l=C(h.lineDiv);j=[];v=Nc(b.text.length);I=i.offsetHeight;ga&&h.measure.first!=i&&V(h.measure,i);for(m=0;m<g.length;++m)if(n=g[m]){h=C(n);J=Math.max(0,h.top-l.top);var t=Math.min(h.bottom-l.top,I);for(k=0;k<j.length;k+=2)if((q=j[k],p=j[k+1],!(q>t)&&!(p<J))&&(q<=J&&
36
+ p>=t||J<=q&&t>=p||Math.min(t,p)-Math.max(J,q)>=t-J>>1)){j[k]=Math.min(J,q);j[k+1]=Math.max(t,p);break}k==j.length&&j.push(J,t);J=h.right;n.measureRight&&(J=C(n.measureRight).left);v[m]={left:h.left-l.left,right:J-l.left,top:k}}for(m=0;m<v.length;++m)(n=v[m])&&(r=n.top,n.top=j[r],n.bottom=j[r+1]);return e=(a.options.lineWrapping||(o=i.lastChild,3==o.nodeType&&(o=i.appendChild(s("span","​"))),v.width=C(o).right-l.left),v),f={text:b.text,width:c.scroller.clientWidth,markedSpans:b.markedSpans,measure:e,
37
+ classes:b.textClass+"|"+b.bgClass+"|"+b.wrapClass},16==d.length?d[++c.measureLineCachePos%16]=f:d.push(f),e}function pa(a){a.display.measureLineCache.length=a.display.measureLineCachePos=0;a.display.cachedCharWidth=a.display.cachedTextHeight=null;a.display.maxLineChanged=!0;a.display.lineNumChars=null}function Oc(a,b,c,d){var e,f,g,h,i;if(b.widgets)for(e=0;e<b.widgets.length;++e)b.widgets[e].above&&(f=qb(b.widgets[e]),c.top+=f,c.bottom+=f);return"line"==d?c:(d||(d="local"),g=ra(a,b),"local"!=d&&(g-=
38
+ a.display.viewOffset),"page"==d&&(h=C(a.display.lineSpace),g+=h.top+(window.pageYOffset||(document.documentElement||document.body).scrollTop),i=h.left+(window.pageXOffset||(document.documentElement||document.body).scrollLeft),c.left+=i,c.right+=i),c.top+=g,c.bottom+=g,c)}function nb(a,b,c,d){return d||(d=r(a.doc,b.line)),Oc(a,d,Mc(a,d,b.ch),c)}function U(a,b,c,d,e){function f(b,f){var g=Mc(a,d,b,e);return f?g.left=g.right:g.right=g.left,Oc(a,d,g,c)}var g,h,i,l,j,k,q,p,m,o;if(d=d||r(a.doc,b.line),
39
+ e||(e=pb(a,d)),g=R(d),b=b.ch,!g)return f(b);l=g[0].level;for(j=0;j<g.length;++j){if(k=g[j],q=k.level%2,k.from<b&&k.to>b)return f(b,q);if(m=q?k.to:k.from,p=q?k.from:k.to,m==b)p=j&&k.level<(o=g[j-1]).level?f(o.level%2?o.from:o.to-1,!0):f(q&&k.from!=k.to?b-1:b),q==l?h=p:i=p;else if(p==b&&!(o=j<g.length-1&&g[j+1],!q&&o&&o.from==o.to))p=o&&k.level<o.level?f(o.level%2?o.to-1:o.from):f(q?b:b-1,!0),q==l?h=p:i=p}return(l&&!b&&(i=f(g[0].to-1)),!h)?i:(i&&(h.other=i),h)}function rb(a,b,c){a=new o(a,b);return c&&
40
+ (a.outside=!0),a}function bc(a,b,c){var d=a.doc,e,f;if(c+=a.display.viewOffset,0>c)return rb(d.first,0,!0);if(e=lb(d,c),f=d.first+d.size-1,e>f)return rb(d.first+d.size-1,r(d,f).text.length,!0);for(0>b&&(b=0);;){f=r(d,e);e=Vd(a,f,e,b,c);var g=(f=Fa(f))&&f.find();if(f&&e.ch>=g.from.ch)e=g.to.line;else return e}}function Vd(a,b,c,d,e){function f(d){d=U(a,o(c,d),"line",b,l);return(h=!0,g>d.bottom)?Math.max(0,d.left-i):g<d.top?d.left+i:(h=!1,d.left)}var g=e-ra(a,b),h=!1,i=a.display.wrapper.clientWidth,
41
+ l=pb(a,b),j=R(b),k=b.text.length,q=sb(b),p=tb(b),m=f(q),e=h,r=f(p),n=h,s,t,v,I;if(d>r)return rb(c,p,n);for(;;){if(j?p==q||p==cc(b,q,1):1>=p-q){for(q=(d=d-m<r-d)?q:p;ub.test(b.text.charAt(q));)++q;return s=rb(c,q,d?e:n),s.after=d,s}if(t=Math.ceil(k/2),v=q+t,j){v=q;for(I=0;I<t;++I)v=cc(b,v,1)}I=f(v);I>d?(p=v,r=I,(n=h)&&(r+=1E3),k-=t):(q=v,m=I,e=h,k=t)}}function hb(a){var b,c;if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==ha){ha=s("pre");for(b=0;49>b;++b)ha.appendChild(document.createTextNode("x")),
42
+ ha.appendChild(s("br"));ha.appendChild(document.createTextNode("x"))}return V(a.measure,ha),c=ha.offsetHeight/50,3<c&&(a.cachedTextHeight=c),ib(a.measure),c||1}function Kd(a){var b,c,d;return null!=a.cachedCharWidth?a.cachedCharWidth:(b=s("span","x"),c=s("pre",[b]),V(a.measure,c),d=b.offsetWidth,2<d&&(a.cachedCharWidth=d),d||10)}function va(a){a.curOp={changes:[],updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,updateMaxLine:!1,updateScrollPos:!1,id:++Pc};Ia++||(Z=[])}function wa(a){var b=
43
+ a.curOp,c=a.doc,d=a.display,e,f,g,h,i,l,j,k;a.curOp=null;b.updateMaxLine&&Wb(a);d.maxLineChanged&&!a.options.lineWrapping&&(e=pb(a,d.maxLine).width,d.sizer.style.minWidth=Math.max(0,e+3+na)+"px",d.maxLineChanged=!1,f=Math.max(0,d.sizer.offsetLeft+d.sizer.offsetWidth-d.scroller.clientWidth),f<c.scrollLeft&&!b.updateScrollPos&&xa(a,Math.min(d.scroller.scrollLeft,f),!0));b.updateScrollPos?g=b.updateScrollPos:b.selectionChanged&&d.scroller.clientHeight&&(i=U(a,c.sel.head),g=dc(a,i.left,i.top,i.left,i.bottom));
44
+ (b.changes.length||g&&null!=g.scrollTop)&&(h=mb(a,b.changes,g&&g.scrollTop));!h&&b.selectionChanged&&Zb(a);b.updateScrollPos?(d.scroller.scrollTop=d.scrollbarV.scrollTop=c.scrollTop=g.scrollTop,d.scroller.scrollLeft=d.scrollbarH.scrollLeft=c.scrollLeft=g.scrollLeft,Ec(a)):g&&(c=Qc(a,a.doc.sel.head),a.state.focused&&(d=a.display,e=C(d.sizer),f=null,0>c.top+e.top?f=!0:c.bottom+e.top>(window.innerHeight||document.documentElement.clientHeight)&&(f=!1),null==f||Wd||(j="none"==d.cursor.style.display,j&&
45
+ (d.cursor.style.display="",d.cursor.style.left=c.left+"px",d.cursor.style.top=c.top-d.viewOffset+"px"),d.cursor.scrollIntoView(f),j&&(d.cursor.style.display="none"))));if(b.selectionChanged&&ob(a),a.state.focused&&b.updateInput&&ba(a,b.userSelChange),l=b.maybeHiddenMarkers,j=b.maybeUnhiddenMarkers,l)for(c=0;c<l.length;++c)l[c].lines.length||M(l[c],"hide");if(j)for(c=0;c<j.length;++c)j[c].lines.length&&M(j[c],"unhide");if(--Ia||(k=Z,Z=null),b.textChanged&&M(a,"change",a,b.textChanged),b.selectionChanged&&
46
+ M(a,"cursorActivity",a),k)for(c=0;c<k.length;++c)k[c]()}function x(a,b){return function(){var c=a||this,d=!c.curOp,e;d&&va(c);try{e=b.apply(c,arguments)}finally{d&&wa(c)}return e}}function Ja(a){return function(){var b=this.cm&&!this.cm.curOp,c;b&&va(this.cm);try{c=a.apply(this,arguments)}finally{b&&wa(this.cm)}return c}}function Rc(a,b){var c=!a.curOp,d;c&&va(a);try{d=b()}finally{c&&wa(a)}return d}function y(a,b,c,d){null==b&&(b=a.doc.first);null==c&&(c=a.doc.first+a.doc.size);a.curOp.changes.push({from:b,
47
+ to:c,diff:d})}function vb(a){a.display.pollingFast||a.display.poll.set(a.options.pollInterval,function(){ec(a);a.state.focused&&vb(a)})}function Ka(a){function b(){ec(a)||c?(a.display.pollingFast=!1,vb(a)):(c=!0,a.display.poll.set(60,b))}var c=!1;a.display.pollingFast=!0;a.display.poll.set(20,b)}function ec(a){var b=a.display.input,c=a.display.prevInput,d=a.doc,e=d.sel,f,g,h,i,l,j,k;if(!a.state.focused||Xd(b)||La(a)||(f=b.value,f==c&&A(e.from,e.to)))return!1;if(K&&f&&0===b.selectionStart)return ba(a,
48
+ !0),!1;(g=!a.curOp)&&va(a);e.shift=!1;h=0;for(i=Math.min(c.length,f.length);h<i&&c[h]==f[h];)++h;return l=e.from,j=e.to,h<c.length?l=o(l.line,l.ch-(c.length-h)):a.state.overwrite&&A(l,j)&&!a.state.pasteIncoming&&(j=o(j.line,Math.min(r(d,j.line).text.length,j.ch+(f.length-h)))),k=a.curOp.updateInput,Ma(a.doc,{from:l,to:j,text:ia(f.slice(h)),origin:a.state.pasteIncoming?"paste":"+input"},"end"),a.curOp.updateInput=k,1E3<f.length?b.value=a.display.prevInput="":a.display.prevInput=f,g&&wa(a),a.state.pasteIncoming=
49
+ !1,!0}function ba(a,b){var c,d,e=a.doc;A(e.sel.from,e.sel.to)?b&&(a.display.prevInput=a.display.input.value=""):(a.display.prevInput="",c=Sc&&(100<e.sel.to.line-e.sel.from.line||1E3<(d=a.getSelection()).length),a.display.input.value=c?"-":d||a.getSelection(),a.state.focused&&Tc(a.display.input));a.display.inaccurateSelection=c}function G(a){"nocursor"==a.options.readOnly||Rb&&document.activeElement==a.display.input||a.display.input.focus()}function La(a){return a.options.readOnly||a.doc.cantEdit}
50
+ function Jd(a){function b(){a.state.focused&&setTimeout(O(G,a),0)}function c(){g.cachedCharWidth=g.cachedTextHeight=null;pa(a);Rc(a,O(y,a))}function d(){for(var a=g.wrapper.parentNode;a&&a!=document.body;a=a.parentNode);a?setTimeout(d,5E3):W(window,"resize",c)}function e(b){a.options.onDragEvent&&a.options.onDragEvent(a,Na(b))||wb(b)}function f(){g.inaccurateSelection&&(g.prevInput="",g.inaccurateSelection=!1,g.input.value=a.getSelection(),Tc(g.input))}var g=a.display;w(g.scroller,"mousedown",x(a,
51
+ Yd));w(g.scroller,"dblclick",x(a,z));w(g.lineSpace,"selectstart",function(a){ya(g,a)||z(a)});fc||w(g.scroller,"contextmenu",function(b){Uc(a,b)});w(g.scroller,"scroll",function(){Oa(a,g.scroller.scrollTop);xa(a,g.scroller.scrollLeft,!0);M(a,"scroll",a)});w(g.scrollbarV,"scroll",function(){Oa(a,g.scrollbarV.scrollTop)});w(g.scrollbarH,"scroll",function(){xa(a,g.scrollbarH.scrollLeft)});w(g.scroller,"mousewheel",function(b){Vc(a,b)});w(g.scroller,"DOMMouseScroll",function(b){Vc(a,b)});w(g.scrollbarH,
52
+ "mousedown",b);w(g.scrollbarV,"mousedown",b);w(g.wrapper,"scroll",function(){g.wrapper.scrollTop=g.wrapper.scrollLeft=0});w(window,"resize",c);setTimeout(d,5E3);w(g.input,"keyup",x(a,function(b){a.options.onKeyEvent&&a.options.onKeyEvent(a,Na(b))||16==b.keyCode&&(a.doc.sel.shift=!1)}));w(g.input,"input",O(Ka,a));w(g.input,"keydown",x(a,Wc));w(g.input,"keypress",x(a,Zd));w(g.input,"focus",O(ca,a));w(g.input,"blur",O(Tb,a));a.options.dragDrop&&(w(g.scroller,"dragstart",function(b){var c=a,d,e;ya(c.display,
53
+ b)||(d=c.getSelection(),b.dataTransfer.setData("Text",d),b.dataTransfer.setDragImage&&!gc&&(e=s("img",null,null,"position: fixed; left: 0; top: 0;"),X&&(e.width=e.height=1,c.display.wrapper.appendChild(e),e._top=e.offsetTop),b.dataTransfer.setDragImage(e,0,0),X&&e.parentNode.removeChild(e)))}),w(g.scroller,"dragenter",e),w(g.scroller,"dragover",e),w(g.scroller,"drop",x(a,$d)));w(g.scroller,"paste",function(b){ya(g,b)||(G(a),Ka(a))});w(g.input,"paste",function(){a.state.pasteIncoming=!0;Ka(a)});w(g.input,
54
+ "cut",f);w(g.input,"copy",f);Vb&&w(g.sizer,"mouseup",function(){document.activeElement==g.input&&g.input.blur();G(a)})}function ya(a,b){for(var c=b.target||b.srcElement;c!=a.wrapper;c=c.parentNode)if(!c||/\bCodeMirror-(?:line)?widget\b/.test(c.className)||c.parentNode==a.sizer&&c!=a.mover)return!0}function Pa(a,b,c){var d=a.display,e,f,g;if(!c&&(e=b.target||b.srcElement,e==d.scrollbarH||e==d.scrollbarH.firstChild||e==d.scrollbarV||e==d.scrollbarV.firstChild||e==d.scrollbarFiller))return null;c=C(d.lineSpace);
55
+ try{f=b.clientX,g=b.clientY}catch(h){return null}return bc(a,f-c.left,g-c.top)}function Yd(a){function b(a){if("single"==j)E(e.doc,t(g,i),a);else if(m=t(g,m),s=t(g,s),"double"==j){var b=Xc(r(g,a.line).text,a);B(a,m)?E(e.doc,b.from,s):E(e.doc,m,b.to)}else"triple"==j&&(B(a,m)?E(e.doc,s,t(g,o(a.line,0))):E(e.doc,m,t(g,o(a.line+1,0))))}function c(a){var d=++u,h=Pa(e,a,!0),i,j;h&&(A(h,q)?(j=a.clientY<n.top?-20:a.clientY>n.bottom?20:0,j&&setTimeout(x(e,function(){u==d&&(f.scroller.scrollTop+=j,c(a))}),
56
+ 50)):(e.state.focused||ca(e),q=h,b(h),i=Xb(f,g),(h.line>=i.to||h.line<i.from)&&setTimeout(x(e,function(){u==d&&c(a)}),150)))}function d(a){u=Infinity;var c=Pa(e,a);c&&b(c);z(a);G(e);W(document,"mousemove",y);W(document,"mouseup",v)}var e=this,f=e.display,g=e.doc,h=g.sel,i,l,j,k,q,p,m,s,n,u,y,v;if(h.shift=a.shiftKey,ya(f,a))T||(f.scroller.draggable=!1,setTimeout(function(){f.scroller.draggable=!0},100));else if(!ae(e,a)){i=Pa(e,a);switch(Yc(a)){case 3:fc&&Uc.call(e,e,a);return;case 2:i&&E(e.doc,i);
57
+ setTimeout(O(G,e),20);z(a);return}i?(e.state.focused||ca(e),l=+new Date,j="single",xb&&xb.time>l-400&&A(xb.pos,i)?(j="triple",z(a),setTimeout(O(G,e),20),be(e,i.line)):yb&&yb.time>l-400&&A(yb.pos,i)?(j="double",xb={time:l,pos:i},z(a),k=Xc(r(g,i.line).text,i),E(e.doc,k.from,k.to)):yb={time:l,pos:i},q=i,e.options.dragDrop&&Zc&&!La(e)&&!A(h.from,h.to)&&!B(i,h.from)&&!B(h.to,i)&&"single"==j)?(p=x(e,function(b){T&&(f.scroller.draggable=!1);e.state.draggingText=!1;W(document,"mouseup",p);W(f.scroller,"drop",
58
+ p);10>Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)&&(z(b),E(e.doc,i),G(e))}),T&&(f.scroller.draggable=!0),e.state.draggingText=p,f.scroller.dragDrop&&f.scroller.dragDrop(),w(document,"mouseup",p),w(f.scroller,"drop",p)):(z(a),"single"==j&&E(e.doc,t(g,i)),m=h.from,s=h.to,n=C(f.wrapper),u=0,y=x(e,function(a){K||Yc(a)?c(a):d(a)}),v=x(e,d),w(document,"mousemove",y),w(document,"mouseup",v)):(a.target||a.srcElement)==f.scroller&&z(a)}}function $d(a){var b=this,c,d,e,f,g;if(!ya(b.display,
59
+ a)&&(!b.options.onDragEvent||!b.options.onDragEvent(b,Na(a)))&&(z(a),c=Pa(b,a,!0),d=a.dataTransfer.files,c&&!La(b)))if(d&&d.length&&window.FileReader&&window.File){var h=d.length;e=Array(h);var i=0;f=function(a,d){var f=new FileReader;f.onload=function(){e[d]=f.result;++i==h&&(c=t(b.doc,c),$(b.doc,e.join(""),c,"around","paste"))};f.readAsText(a)};for(a=0;a<h;++a)f(d[a],a)}else if(b.state.draggingText&&!B(c,b.doc.sel.from)&&!B(b.doc.sel.to,c))b.state.draggingText(a),setTimeout(O(G,b),20);else try{(e=
60
+ a.dataTransfer.getData("Text"))&&(f=b.doc.sel.from,g=b.doc.sel.to,aa(b.doc,c,c),b.state.draggingText&&$(b.doc,"",f,g,"paste"),b.replaceSelection(e,null,"paste"),G(b),ca(b))}catch(l){}}function ae(a,b){var c=a.display,d,e,f,g;try{d=b.clientX,e=b.clientY}catch(h){return!1}if(d>=Math.floor(C(c.gutters).right))return!1;if((z(b),!za(a,"gutterClick"))||(f=C(c.lineDiv),e>f.bottom))return!0;e-=f.top-c.viewOffset;for(f=0;f<a.options.gutters.length;++f)if(g=c.gutters.childNodes[f],g&&C(g).right>=d){c=lb(a.doc,
61
+ e);d=a.options.gutters[f];Q(a,"gutterClick",a,c,d,b);break}return!0}function Oa(a,b){2>Math.abs(a.doc.scrollTop-b)||(a.doc.scrollTop=b,Aa||mb(a,[],b),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbarV.scrollTop!=b&&(a.display.scrollbarV.scrollTop=b),Aa&&mb(a,[]))}function xa(a,b,c){(c?b==a.doc.scrollLeft:2>Math.abs(a.doc.scrollLeft-b))||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,Ec(a),a.display.scroller.scrollLeft!=
62
+ b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function Vc(a,b){var c=b.wheelDeltaX,d=b.wheelDeltaY,e,f,g;if(null==c&&b.detail&&b.axis==b.HORIZONTAL_AXIS&&(c=b.detail),null==d&&b.detail&&b.axis==b.VERTICAL_AXIS?d=b.detail:null==d&&(d=b.wheelDelta),d&&sa&&T)for(e=b.target;e!=g;e=e.parentNode)if(e.lineObj){a.display.currentWheelTarget=e;break}if(f=a.display,g=f.scroller,c&&!Aa&&!X&&null!=N)d&&Oa(a,Math.max(0,Math.min(g.scrollTop+d*N,g.scrollHeight-
63
+ g.clientHeight))),xa(a,Math.max(0,Math.min(g.scrollLeft+c*N,g.scrollWidth-g.clientWidth))),z(b),f.wheelStartX=null;else{if(d&&null!=N){e=d*N;var h=a.doc.scrollTop,i=h+f.wrapper.clientHeight;0>e?h=Math.max(0,h+e-50):i=Math.min(a.doc.height,i+e+50);mb(a,[],{top:h,bottom:i})}20>Qa&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=c,f.wheelDY=d,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,a=b&&f.wheelDY&&
64
+ b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;(f.wheelStartX=f.wheelStartY=null,a)&&(N=(N*Qa+a)/(Qa+1),++Qa)}},200)):(f.wheelDX+=c,f.wheelDY+=d))}}function zb(a,b,c){if("string"==typeof b&&(b=Ab[b],!b))return!1;a.display.pollingFast&&ec(a)&&(a.display.pollingFast=!1);var d=a.doc,e=d.sel.shift,f=!1;try{La(a)&&(a.state.suppressEdits=!0),c&&(d.sel.shift=!1),f=b(a)!=hc}finally{d.sel.shift=e,a.state.suppressEdits=!1}return f}function $c(a){var b=a.state.keyMaps.slice(0);return b.push(a.options.keyMap),a.options.extraKeys&&
65
+ b.unshift(a.options.extraKeys),b}function ad(a,b){var c=ic(a.options.keyMap),d=c.auto,e,f,g;return(clearTimeout(bd),d&&!cd(b)&&(bd=setTimeout(function(){ic(a.options.keyMap)==c&&(a.options.keyMap=d.call?d.call(null,a):d)},50)),e=dd(b,!0),f=!1,!e)?!1:(g=$c(a),f=b.shiftKey?Ra("Shift-"+e,g,function(b){return zb(a,b,true)})||Ra(e,g,function(b){if(typeof b=="string"&&/^go[A-Z]/.test(b))return zb(a,b)}):Ra(e,g,function(b){return zb(a,b)}),"stop"==f&&(f=!1),f&&(z(b),ob(a),ga&&(b.oldKeyCode=b.keyCode,b.keyCode=
66
+ 0)),f)}function ce(a,b,c){c=Ra("'"+c+"'",$c(a),function(b){return zb(a,b,!0)});return c&&(z(b),ob(a)),c}function Wc(a){var b,c;(this.state.focused||ca(this),K&&27==a.keyCode&&(a.returnValue=!1),this.options.onKeyEvent&&this.options.onKeyEvent(this,Na(a)))||(b=a.keyCode,this.doc.sel.shift=16==b||a.shiftKey,c=ad(this,a),X&&(Bb=c?b:null,c||88!=b||Sc||!(sa?a.metaKey:a.ctrlKey)||this.replaceSelection("")))}function Zd(a){var b=this,c,d,e;if(!b.options.onKeyEvent||!b.options.onKeyEvent(b,Na(a)))(c=a.keyCode,
67
+ d=a.charCode,X&&c==Bb)?(Bb=null,z(a)):(X&&(!a.which||10>a.which)||Vb)&&ad(b,a)||(e=String.fromCharCode(null==d?c:d),this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!La(this)&&-1<this.doc.mode.electricChars.indexOf(e)&&setTimeout(x(b,function(){Cb(b,b.doc.sel.to.line,"smart")}),75),ce(b,a,e))||Ka(b)}function ca(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(M(a,"focus",a),a.state.focused=!0,-1==a.display.wrapper.className.search(/\bCodeMirror-focused\b/)&&
68
+ (a.display.wrapper.className+=" CodeMirror-focused"),ba(a,!0)),vb(a),ob(a))}function Tb(a){a.state.focused&&(M(a,"blur",a),a.state.focused=!1,a.display.wrapper.className=a.display.wrapper.className.replace(" CodeMirror-focused",""));clearInterval(a.display.blinker);setTimeout(function(){a.state.focused||(a.doc.sel.shift=!1)},150)}function Uc(a,b){function c(){var b,c,f;d.inputDiv.style.position="relative";d.input.style.cssText=h;ga&&(d.scrollbarV.scrollTop=d.scroller.scrollTop=g);vb(a);null!=d.input.selectionStart&&
69
+ (!K||ga)&&(clearTimeout(jc),b=d.input.value=" "+(A(e.from,e.to)?"":d.input.value),c=0,d.prevInput=" ",d.input.selectionStart=1,d.input.selectionEnd=b.length,f=function(){" "==d.prevInput&&0==d.input.selectionStart?x(a,Ab.selectAll)(a):10>c++?jc=setTimeout(f,500):ba(a)},jc=setTimeout(f,200))}var d=a.display,e=a.doc.sel,f,g,h,i;ya(d,b)||(f=Pa(a,b),g=d.scroller.scrollTop,f&&!X)&&((A(e.from,e.to)||B(f,e.from)||!B(f,e.to))&&x(a,aa)(a.doc,f,f),h=d.input.style.cssText,d.inputDiv.style.position="absolute",
70
+ d.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(b.clientY-5)+"px; left: "+(b.clientX-5)+"px; z-index: 1000; background: white; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",G(a),ba(a,!0),A(e.from,e.to)&&(d.input.value=d.prevInput=" "),fc?(wb(b),i=function(){W(window,"mouseup",i);setTimeout(c,20)},w(window,"mouseup",i)):setTimeout(c,50))}function kc(a){return o(a.from.line+a.text.length-1,F(a.text).length+
71
+ (1==a.text.length?a.from.ch:0))}function ed(a,b,c){var d,e,f,g;return B(b.from,c)?(d=b.text.length-1-(b.to.line-b.from.line),c.line>b.to.line+d)?(e=c.line-d,f=a.first+a.size-1,e>f)?o(f,r(a,f).text.length):Db(c,r(a,e).text.length):c.line==b.to.line+d?Db(c,F(b.text).length+(1==b.text.length?b.from.ch:0)+r(a,b.to.line).text.length-b.to.ch):(g=c.line-b.from.line,Db(c,b.text[g].length+(g?0:b.from.ch))):t(a,c)}function lc(a,b,c){var d,e;return c&&"object"==typeof c?{anchor:ed(a,b,c.anchor),head:ed(a,b,
72
+ c.head)}:"start"==c?{anchor:b.from,head:b.from}:(d=kc(b),"around"==c)?{anchor:b.from,head:d}:"end"==c?{anchor:d,head:d}:(e=function(a){if(B(a,b.from))return a;if(!B(b.to,a))return d;var c=a.line+b.text.length-(b.to.line-b.from.line)-1,e=a.ch;return a.line==b.to.line&&(e+=d.ch-b.to.ch),o(c,e)},{anchor:e(a.sel.anchor),head:e(a.sel.head)})}function de(a,b){var c={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,update:function(b,c,f,g){b&&(this.from=t(a,b));c&&(this.to=t(a,c));f&&(this.text=
73
+ f);void 0!==g&&(this.origin=g)},cancel:function(){this.canceled=!0}};return(M(a,"beforeChange",a,c),a.cm&&M(a.cm,"beforeChange",a.cm,c),c.canceled)?null:{from:c.from,to:c.to,text:c.text,origin:c.origin}}function Ma(a,b,c,d){var e;if(a.cm){if(!a.cm.curOp)return x(a.cm,Ma)(a,b,c,d);if(a.cm.state.suppressEdits)return}if(!za(a,"beforeChange")&&(!a.cm||!za(a.cm,"beforeChange"))||(b=de(a,b),b))if(e=fd&&!d&&ee(a,b.from,b.to),e){for(d=e.length-1;1<=d;--d)mc(a,{from:e[d].from,to:e[d].to,text:[""]});e.length&&
74
+ mc(a,{from:e[0].from,to:e[0].to,text:b.text},c)}else mc(a,b,c)}function mc(a,b,c){var c=lc(a,b,c),d;fe(a,b,c,a.cm?a.cm.curOp.id:NaN);Sa(a,b,c,nc(a,b));d=[];Ba(a,function(a,c){c||-1!=Y(d,a.history)||(gd(a.history,b),d.push(a.history));Sa(a,b,null,nc(a,b))})}function hd(a,b){var c=a.history,d=("undo"==b?c.done:c.undone).pop(),e,f,g,h;if(d){c.dirtyCounter+="undo"==b?-1:1;e={changes:[],anchorBefore:d.anchorAfter,headBefore:d.headAfter,anchorAfter:d.anchorBefore,headAfter:d.headBefore};("undo"==b?c.undone:
75
+ c.done).push(e);for(c=d.changes.length-1;0<=c;--c)f=d.changes[c],f.origin=b,e.changes.push(oc(a,f)),g=c?lc(a,f,null):{anchor:d.anchorBefore,head:d.headBefore},Sa(a,f,g,id(a,f)),h=[],Ba(a,function(a,b){b||-1!=Y(h,a.history)||(gd(a.history,f),h.push(a.history));Sa(a,f,null,id(a,f))})}}function jd(a,b){function c(a){return o(a.line+b,a.ch)}a.first+=b;a.cm&&y(a.cm,a.first,a.first,b);a.sel.head=c(a.sel.head);a.sel.anchor=c(a.sel.anchor);a.sel.from=c(a.sel.from);a.sel.to=c(a.sel.to)}function Sa(a,b,c,d){var e,
76
+ f;if(a.cm&&!a.cm.curOp)return x(a.cm,Sa)(a,b,c,d);b.to.line<a.first?jd(a,b.text.length-1-(b.to.line-b.from.line)):b.from.line>a.lastLine()||(b.from.line<a.first&&(e=b.text.length-1-(a.first-b.from.line),jd(a,e),b={from:o(a.first,0),to:o(b.to.line+e,b.to.ch),text:[F(b.text)],origin:b.origin}),f=a.lastLine(),b.to.line>f&&(b={from:b.from,to:o(f,r(a,f).text.length),text:[b.text[0]],origin:b.origin}),c||(c=lc(a,b,null)),a.cm?ge(a.cm,b,d,c):pc(a,b,d,c))}function ge(a,b,c,d){var e=a.doc,f=a.display,g=b.from,
77
+ h=b.to,i=!1,l=g.line,j;if(a.options.lineWrapping||(l=L(qa(e,r(e,g.line))),e.iter(l,h.line+1,function(a){if(a==f.maxLine)return i=!0,!0})),pc(e,b,c,d,Bc(a)),a.options.lineWrapping||(e.iter(l,g.line+b.text.length,function(a){var b=jb(e,a);b>f.maxLineLength&&(f.maxLine=a,f.maxLineLength=b,f.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),e.frontier=Math.min(e.frontier,g.line),gb(a,400),j=b.text.length-(h.line-g.line)-1,y(a,g.line,h.line+1,j),za(a,"change"))if(b={from:g,to:h,text:b.text,origin:b.origin},
78
+ a.curOp.textChanged){for(a=a.curOp.textChanged;a.next;a=a.next);a.next=b}else a.curOp.textChanged=b}function $(a,b,c,d,e){if(d||(d=c),B(d,c))var f=d,d=c,c=f;"string"==typeof b&&(b=ia(b));Ma(a,{from:c,to:d,text:b,origin:e},null)}function o(a,b){if(!(this instanceof o))return new o(a,b);this.line=a;this.ch=b}function A(a,b){return a.line==b.line&&a.ch==b.ch}function B(a,b){return a.line<b.line||a.line==b.line&&a.ch<b.ch}function ja(a){return o(a.line,a.ch)}function t(a,b){if(b.line<a.first)return o(a.first,
79
+ 0);var c=a.first+a.size-1;return b.line>c?o(c,r(a,c).text.length):Db(b,r(a,b.line).text.length)}function Db(a,b){var c=a.ch;return null==c||c>b?o(a.line,b):0>c?o(a.line,0):a}function ka(a,b){return b>=a.first&&b<a.first+a.size}function E(a,b,c,d){var e,f;a.sel.shift||a.sel.extend?(e=a.sel.anchor,c&&(f=B(b,e),f!=B(c,e)?(e=b,b=c):f!=B(b,c)&&(b=c)),aa(a,e,b,d)):aa(a,b,c||b,d);a.cm&&(a.cm.curOp.userSelChange=!0)}function aa(a,b,c,d,e){var f,g;if(!e&&za(a,"beforeSelectionChange")||a.cm&&za(a.cm,"beforeSelectionChange"))c=
80
+ {anchor:b,head:c},b=(M(a,"beforeSelectionChange",a,c),a.cm&&M(a.cm,"beforeSelectionChange",a.cm,c),c.anchor=t(a,c.anchor),c.head=t(a,c.head),c),c=b.head,b=b.anchor;(f=a.sel,f.goalColumn=null,(e||!A(b,f.anchor))&&(b=Eb(a,b,d,"push"!=e)),(e||!A(c,f.head))&&(c=Eb(a,c,d,"push"!=e)),A(f.anchor,b)&&A(f.head,c))||(f.anchor=b,f.head=c,g=B(c,b),f.from=g?c:b,f.to=g?b:c,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0),Q(a,"cursorActivity",a))}function kd(a){aa(a.doc,a.doc.sel.from,a.doc.sel.to,
81
+ null,"push")}function Eb(a,b,c,d){var e=!1,f=b,g=c||1,h,i,l,j,k,q;a.cantEdit=!1;a:for(;;){if(h=r(a,f.line),h.markedSpans){for(q=0;q<h.markedSpans.length;++q)if(l=h.markedSpans[q],j=l.marker,(null==l.from||(j.inclusiveLeft?l.from<=f.ch:l.from<f.ch))&&(null==l.to||(j.inclusiveRight?l.to>=f.ch:l.to>f.ch)))if(d&&j.clearOnEnter)(i||(i=[])).push(j);else if(j.atomic){if(k=j.find()[0>g?"from":"to"],A(k,f)&&(k.ch+=g,0>k.ch?k=k.line>a.first?t(a,o(k.line-1)):null:k.ch>h.text.length&&(k=k.line<a.first+a.size-
82
+ 1?o(k.line+1,0):null),!k)){if(e)return d?(a.cantEdit=!0,o(a.first,0)):Eb(a,b,c,!0);e=!0;k=b;g=-g}f=k;continue a}if(i)for(q=0;q<i.length;++q)i[q].clear()}return f}}function Qc(a,b){for(;;){var c=!1,d=U(a,b),e=dc(a,d.left,d.top,d.left,d.bottom),f=a.doc.scrollTop,g=a.doc.scrollLeft;if(null!=e.scrollTop&&(Oa(a,e.scrollTop),1<Math.abs(a.doc.scrollTop-f)&&(c=!0)),null!=e.scrollLeft&&(xa(a,e.scrollLeft),1<Math.abs(a.doc.scrollLeft-g)&&(c=!0)),!c)return d}}function ld(a,b,c,d,e){b=dc(a,b,c,d,e);null!=b.scrollTop&&
83
+ Oa(a,b.scrollTop);null!=b.scrollLeft&&xa(a,b.scrollLeft)}function dc(a,b,c,d,e){var f=a.display,g=f.lineSpace.offsetTop,h,i,l,j,c=c+g,e=e+g,k=f.scroller.clientHeight-na,q=f.scroller.scrollTop,p={},a=a.doc.height+2*g,m=e+g>a-10;return c<q?p.scrollTop=c<g+10?0:Math.max(0,c):e>q+k&&(p.scrollTop=(m?a:e)-k),h=f.scroller.clientWidth-na,i=f.scroller.scrollLeft,b+=f.gutters.offsetWidth,d+=f.gutters.offsetWidth,l=f.gutters.offsetWidth,j=b<l+10,b<i+l||j?(j&&(b=0),p.scrollLeft=Math.max(0,b-10-l)):d>h+i-3&&(p.scrollLeft=
84
+ d+10-h),p}function Cb(a,b,c,d){var e=a.doc,f;c||(c="add");"smart"==c&&(a.doc.mode.indent?f=Ha(a,b):c="prev");var g=a.options.tabSize,h=r(e,b),i=ua(h.text,null,g),l=h.text.match(/^\s*/)[0],j;if("smart"==c&&(j=a.doc.mode.indent(f,h.text.slice(l.length),h.text),j==hc)){if(!d)return;c="prev"}if("prev"==c?j=b>e.first?ua(r(e,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c&&(j=i-a.options.indentUnit),j=Math.max(0,j),c="",d=0,a.options.indentWithTabs)for(e=Math.floor(j/g);e;--e)d+=g,c+=
85
+ "\t";d<j&&(c+=md(j-d));c!=l&&$(a.doc,c,o(b,0),o(b,l.length),"+input");h.stateAfter=null}function Fb(a,b,c){var d=b,e=b,f=a.doc;if(!("number"==typeof b?e=r(f,Math.max(f.first,Math.min(b,f.first+f.size-1))):d=L(b),null==d)&&c(e,d))y(a,d,d+1);else return null;return e}function qc(a,b,c,d,e){function f(b){var d=(e?cc:nd)(i,h,c,!0);if(null==d){if(b=!b)b=g+c,b=b<a.first||b>=a.first+a.size?l=!1:(g=b,i=r(a,b));if(b)h=e?(0>c?tb:sb)(i):0>c?i.text.length:0;else return l=!1}else h=d;return!0}var g=b.line,h=b.ch,
86
+ i=r(a,g),l=!0,j;if("char"==d)f();else if("column"==d)f(!0);else if("word"==d)for(b=!1;!(0>c)||f();){if(Gb(i.text.charAt(h)))b=!0;else if(b){0>c&&(c=1,f());break}if(0<c&&!f())break}return j=Eb(a,o(g,h),c,!0),l||(j.hitSide=!0),j}function od(a,b,c,d){var e=a.doc,f=b.left,g,h,i;for("page"==d?(h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),g=b.top+c*h):"line"==d&&(g=0<c?b.bottom+3:b.top-3);!(i=bc(a,f,g),!i.outside);){if(0>c?0>=g:g>=e.height){i.hitSide=
87
+ !0;break}g+=5*c}return i}function Xc(a,b){var c=b.ch,d=b.ch,e;if(a){!1===b.after||d==a.length?--c:++d;e=a.charAt(c);for(e=Gb(e)?Gb:/\s/.test(e)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Gb(a)};0<c&&e(a.charAt(c-1));)--c;for(;d<a.length&&e(a.charAt(d));)++d}return{from:o(b.line,c),to:o(b.line,d)}}function be(a,b){E(a.doc,o(b,0),t(a.doc,o(b+1,0)))}function u(a,b,c,d){m.defaults[a]=b;c&&(da[a]=d?function(a,b,d){d!=Ub&&c(a,b,d)}:c)}function ta(a,b){var c,d,e;if(!0===b)return b;
88
+ if(a.copyState)return a.copyState(b);c={};for(d in b)e=b[d],e instanceof Array&&(e=e.concat([])),c[d]=e;return c}function Lc(a,b,c){return a.startState?a.startState(b,c):!0}function ic(a){return"string"==typeof a?S[a]:a}function Ra(a,b,c){function d(b){var e,f,l;if(b=ic(b),e=b[a],!1===e)return"stop";if(null!=e&&c(e))return!0;if(b.nofallthrough)return"stop";if(f=b.fallthrough,null==f)return!1;if("[object Array]"!=Object.prototype.toString.call(f))return d(f);b=0;for(e=f.length;b<e;++b)if(l=d(f[b]),
89
+ l)return l;return!1}for(var e,f=0;f<b.length;++f)if(e=d(b[f]),e)return e}function cd(a){a=la[a.keyCode];return"Ctrl"==a||"Alt"==a||"Shift"==a||"Mod"==a}function dd(a,b){var c=la[a.keyCode];return null==c||a.altGraphKey?!1:(a.altKey&&(c="Alt-"+c),(pd?a.metaKey:a.ctrlKey)&&(c="Ctrl-"+c),(pd?a.ctrlKey:a.metaKey)&&(c="Cmd-"+c),!b&&a.shiftKey&&(c="Shift-"+c),c)}function Ta(a,b){this.pos=this.start=0;this.string=a;this.tabSize=b||8}function ma(a,b){this.lines=[];this.type=b;this.doc=a}function Ua(a,b,c,
90
+ d,e){var f;if(d&&d.shared)return he(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return x(a.cm,Ua)(a,b,c,d,e);if(f=new ma(a,e),"range"==e&&!B(b,c))return f;d&&Hb(d,f);f.replacedWith&&(f.collapsed=!0,f.replacedWith=s("span",[f.replacedWith],"CodeMirror-widget"));f.collapsed&&(Ga=!0);var g=b.line,h=0,i,l,j=a.cm,k;if(a.iter(g,c.line+1,function(d){j&&f.collapsed&&!j.options.lineWrapping&&qa(a,d)==j.display.maxLine&&(k=!0);var e={from:null,to:null,marker:f};h+=d.text.length;g==b.line&&(e.from=b.ch,h-=b.ch);g==c.line&&
91
+ (e.to=c.ch,h-=d.text.length-c.ch);f.collapsed&&(g==c.line&&(l=fa(d,c.ch)),g==b.line?i=fa(d,b.ch):P(d,0));d.markedSpans=d.markedSpans?d.markedSpans.concat([e]):[e];e.marker.attachLine(d);++g}),f.collapsed&&a.iter(b.line,c.line+1,function(b){ea(a,b)&&P(b,0)}),f.readOnly&&(fd=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed){if(i!=l)throw Error("Inserting collapsed marker overlapping an existing one");f.size=h;f.atomic=!0}return j&&(k&&(j.curOp.updateMaxLine=!0),(f.className||
92
+ f.startStyle||f.endStyle||f.collapsed)&&y(j,b.line,c.line+1),f.atomic&&kd(j)),f}function Va(a,b){this.markers=a;this.primary=b;for(var c=0,d=this;c<a.length;++c)a[c].parent=this,w(a[c],"clear",function(){d.clear()})}function he(a,b,c,d,e){d=Hb(d);d.shared=!1;var f=[Ua(a,b,c,d,e)],g=f[0];return Ba(a,function(a){f.push(Ua(a,t(a,b),t(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=F(f)}),new Va(f,g)}function Wa(a,b){var c,d;if(a)for(c=0;c<a.length;++c)if(d=a[c],d.marker==
93
+ b)return d}function nc(a,b){var c=ka(a,b.from.line)&&r(a,b.from.line).markedSpans,d=ka(a,b.to.line)&&r(a,b.to.line).markedSpans,e,f,g,h;if(!c&&!d)return null;var i=b.from.ch,l=b.to.ch,j=A(b.from,b.to),k,q,p;if(c)for(k=0;k<c.length;++k){var m=c[k],o=m.marker;!(null==m.from||(o.inclusiveLeft?m.from<=i:m.from<i))&&("bookmark"!=o.type||m.from!=i||j&&m.marker.insertLeft)||(p=null==m.to||(o.inclusiveRight?m.to>=i:m.to>i),(q||(q=[])).push({from:m.from,to:p?null:m.to,marker:o}))}var c=q,n;if(d)for(k=0;k<
94
+ d.length;++k)q=d[k],p=q.marker,(null==q.to||(p.inclusiveRight?q.to>=l:q.to>l)||"bookmark"==p.type&&q.from==l&&(!j||q.marker.insertLeft))&&(n=null==q.from||(p.inclusiveLeft?q.from<=l:q.from<l),(e||(e=[])).push({from:n?null:q.from-l,to:null==q.to?null:q.to-l,marker:p}));l=e;j=1==b.text.length;n=F(b.text).length+(j?i:0);if(c)for(d=0;d<c.length;++d)e=c[d],null==e.to&&(f=Wa(l,e.marker),f?j&&(e.to=null==f.to?null:f.to+n):e.to=i);if(l)for(d=0;d<l.length;++d)e=l[d],null!=e.to&&(e.to+=n),null==e.from?(f=Wa(c,
95
+ e.marker),f||(e.from=n,j&&(c||(c=[])).push(e))):(e.from+=n,j&&(c||(c=[])).push(e));if(f=[c],!j){if(g=b.text.length-2,0<g&&c)for(d=0;d<c.length;++d)null==c[d].to&&(h||(h=[])).push({from:null,to:null,marker:c[d].marker});for(d=0;d<g;++d)f.push(h);f.push(l)}return f}function id(a,b){var c;c=b["spans_"+a.id];var d,e;if(c){d=0;for(e=[];d<b.text.length;++d)e.push(ie(c[d]));c=e}else c=null;d=nc(a,b);var f,g,h,i,l;if(!c)return d;if(!d)return c;for(e=0;e<c.length;++e)if(f=c[e],g=d[e],f&&g){h=0;a:for(;h<g.length;++h){i=
96
+ g[h];for(l=0;l<f.length;++l)if(f[l].marker==i.marker)continue a;f.push(i)}}else g&&(c[e]=g);return c}function ee(a,b,c){var d=null,e,f,g,h;if(a.iter(b.line,c.line+1,function(a){var b,c;if(a.markedSpans)for(b=0;b<a.markedSpans.length;++b)c=a.markedSpans[b].marker,c.readOnly&&(!d||-1==Y(d,c))&&(d||(d=[])).push(c)}),!d)return null;a=[{from:b,to:c}];for(b=0;b<d.length;++b){c=d[b];e=c.find();for(f=0;f<a.length;++f)(g=a[f],B(g.to,e.from)||B(e.to,g.from))||(h=[f,1],(B(g.from,e.from)||!c.inclusiveLeft&&A(g.from,
97
+ e.from))&&h.push({from:g.from,to:e.from}),(B(e.to,g.to)||!c.inclusiveRight&&A(g.to,e.to))&&h.push({from:e.to,to:g.to}),a.splice.apply(a,h),f+=h.length-1)}return a}function fa(a,b){var c=Ga&&a.markedSpans,d,e,f;if(c)for(f=0;f<c.length;++f)(e=c[f],e.marker.collapsed)&&(null==e.from||e.from<b)&&(null==e.to||e.to>b)&&(!d||d.width<e.marker.width)&&(d=e.marker);return d}function Fa(a){return fa(a,a.text.length+1)}function qa(a,b){for(var c;c=fa(b,-1);)b=r(a,c.find().from.line);return b}function ea(a,b){var c=
98
+ Ga&&b.markedSpans,d,e;if(c)for(e=0;e<c.length;++e)if((d=c[e],d.marker.collapsed)&&(null==d.from||0==d.from&&d.marker.inclusiveLeft&&rc(a,b,d)))return!0}function rc(a,b,c){var d,e,f;if(null==c.to)return d=c.marker.find().to,e=r(a,d.line),rc(a,e,Wa(e.markedSpans,c.marker));if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(d=0;d<b.markedSpans.length;++d)if(f=b.markedSpans[d],f.marker.collapsed&&f.from==c.to&&(f.marker.inclusiveLeft||c.marker.inclusiveRight)&&rc(a,b,f))return!0}function qd(a){var b=
99
+ a.markedSpans,c;if(b){for(c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function rd(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function sd(a){return function(){var b=!this.cm.curOp,c;b&&va(this.cm);try{c=a.apply(this,arguments)}finally{b&&wa(this.cm)}return c}}function qb(a){return null!=a.height?a.height:(a.node.parentNode&&1==a.node.parentNode.nodeType||V(a.cm.display.measure,s("div",[a.node],null,"position: relative")),a.height=a.node.offsetHeight)}
100
+ function je(a,b,c,d){var e=new Ib(a,c,d);return e.noHScroll&&(a.display.alignWidgets=!0),Fb(a,b,function(b){if((b.widgets||(b.widgets=[])).push(e),e.line=b,!ea(a.doc,b)||e.showIfHidden){var c=ra(a,b)<a.display.scroller.scrollTop;P(b,b.height+qb(e));c&&(a.curOp.updateScrollPos={scrollTop:a.doc.scrollTop+e.height,scrollLeft:a.doc.scrollLeft})}return!0}),e}function Xa(a,b,c){a={text:a};return rd(a,b),a.height=c?c(a):1,a}function Ca(a,b,c,d){a.text=b;a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=
101
+ null);null!=a.order&&(a.order=null);qd(a);rd(a,c);b=d?d(a):1;b!=a.height&&P(a,b);Q(a,"change")}function td(a,b,c,d,e){var f=a.options.flattenSpans,g="",h=null,a=new Ta(b,a.options.tabSize),i,l;for(""==b&&c.blankLine&&c.blankLine(d);!a.eol();)i=c.token(a,d),5E3<a.pos&&(f=!1,a.pos=Math.min(b.length,a.start+5E4),i=null),l=a.current(),a.start=a.pos,f&&h==i?g+=l:(g&&e(g,h),g=l,h=i);g&&e(g,h)}function Jc(a,b,c){var d=[a.state.modeGen],e,f;td(a,b.text,a.doc.mode,c,function(a,b){d.push(a,b)});for(c=0;c<a.state.overlays.length;++c)e=
102
+ a.state.overlays[c],f=1,td(a,b.text,e.mode,!0,function(a,b){for(var c=f,l=a.length,j,k;l;){k=d[f];j=k.length;j<=l?l=l-j:(d.splice(f,1,k.slice(0,l),d[f+1],k.slice(l)),l=0);f=f+2}if(b)if(e.opaque){d.splice(c,f-c,a,b);f=c+2}else for(;c<f;c=c+2){k=d[c+1];d[c+1]=k?k+" "+b:b}});return d}function Kc(a,b,c){var d=a.doc.mode,a=new Ta(b.text,a.options.tabSize);for(""==b.text&&d.blankLine&&d.blankLine(c);!a.eol()&&5E3>=a.pos;)d.token(a,c),a.start=a.pos}function ud(a){return a?sc[a]||(sc[a]="cm-"+a.replace(/ +/g,
103
+ " cm-")):null}function Ic(a,b,c){for(var d,e=b,f,g,h=!0,i,l,j,k,m,p;d=fa(e,-1);)h=!1,e=r(a.doc,d.find().from.line),f||(f=e);d={pre:s("pre"),col:0,pos:0,display:!c,measure:null,addedOne:!1,cm:a};e.textClass&&(d.pre.className=e.textClass);do{d.measure=e==b&&c;d.pos=0;d.addToken=d.measure?ke:vd;c&&g&&e!=b&&!d.addedOne&&(c[0]=d.pre.appendChild(tc(a.display.measure)),d.addedOne=!0);a:{var o=e;g=d;i=(e.styles&&e.styles[0]==a.state.modeGen||(e.styles=Jc(a,e,e.stateAfter=Ha(a,L(e)))),e.styles);var t=o.markedSpans,
104
+ n=void 0,u=void 0,x=void 0,v=void 0,w=void 0,z=u=void 0,A=void 0;if(t)for(var o=o.text.length,y=0,n=1,B="",C=void 0,E=0,F=void 0,G=void 0,H=void 0,D=void 0;;){if(E==y){F=G=H="";D=null;E=Infinity;u=null;for(x=0;x<t.length;++x)v=t[x],w=v.marker,v.from<=y&&(null==v.to||v.to>y)?(null!=v.to&&E>v.to&&(E=v.to,G=""),w.className&&(F+=" "+w.className),w.startStyle&&v.from==y&&(H+=" "+w.startStyle),w.endStyle&&v.to==E&&(G+=" "+w.endStyle),w.collapsed&&(!D||D.marker.width<w.width)&&(D=v)):v.from>y&&E>v.from&&
105
+ (E=v.from),"bookmark"==w.type&&v.from==y&&w.replacedWith&&(u=w.replacedWith);if(D&&(D.from||0)==y&&(wd(g,(null==D.to?o:D.to)-y,null!=D.from&&D.marker.replacedWith),null==D.to)){g=D.marker.find();break a}u&&!D&&wd(g,0,u)}if(y>=o)break;for(u=Math.min(o,E);;){if(B){if(z=y+B.length,D||(A=z>u?B.slice(0,u-y):B,g.addToken(g,A,C?C+F:F,H,y+A.length==E?G:"")),z>=u){B=B.slice(u-y);y=u;break}y=z;H=""}B=i[n++];C=ud(i[n++])}}else for(n=1;n<i.length;n+=2)g.addToken(g,i[n],ud(i[n+1]));g=void 0}i=g;g=e==f;i&&(e=r(a.doc,
106
+ i.to.line),h=!1)}while(i);return c&&!d.addedOne&&(c[0]=d.pre.appendChild(h?s("span"," "):tc(a.display.measure))),d.pre.firstChild||ea(a.doc,b)||d.pre.appendChild(document.createTextNode(" ")),c&&K&&(l=R(e))&&(j=l.length-1,l[j].from==l[j].to&&--j,k=l[j],m=l[j-1],k.from+1==k.to&&m&&k.level<m.level&&(p=c[d.pos-1],p&&p.parentNode.insertBefore(p.measureRight=tc(a.display.measure),p.nextSibling))),d.pre}function vd(a,b,c,d,e){var f,g,h,i,l,j,k,m;if(b){if(Jb.test(b)){f=document.createDocumentFragment();
107
+ for(g=0;!(Jb.lastIndex=g,h=Jb.exec(b),i=h?h.index-g:b.length-g,i&&(f.appendChild(document.createTextNode(b.slice(g,g+i))),a.col+=i),!h);)g+=i+1,"\t"==h[0]?(l=a.cm.options.tabSize,j=l-a.col%l,f.appendChild(s("span",md(j),"cm-tab")),a.col+=j):(k=s("span","•","cm-invalidchar"),k.title="\\u"+h[0].charCodeAt(0).toString(16),f.appendChild(k),a.col+=1)}else a.col+=b.length,f=document.createTextNode(b);if(c||d||e||a.measure)return m=c||"",d&&(m+=d),e&&(m+=e),a.pre.appendChild(s("span",[f],m));a.pre.appendChild(f)}}
108
+ function ke(a,b,c,d,e){for(var f,g,h=0;h<b.length;++h)f=b.charAt(h),g=0==h,"�"<=f&&"�">f&&h<b.length-1?(f=b.slice(h,h+2),++h):h&&a.cm.options.lineWrapping&&Ya.test(b.slice(h-1,h+1))&&a.pre.appendChild(s("wbr")),a.measure[a.pos]=vd(a,f,c,g&&d,h==b.length-1&&e),a.pos+=f.length;b.length&&(a.addedOne=!0)}function wd(a,b,c){c&&(a.display||(c=c.cloneNode(!0)),a.pre.appendChild(c),a.measure&&b&&(a.measure[a.pos]=c,a.addedOne=!0));a.pos+=b}function pc(a,b,c,d,e){function f(a){return c?c[a]:null}var g=b.from,
109
+ h=b.to,i=b.text,l=r(a,g.line),j=r(a,h.line),k=F(i),m=f(i.length-1),p=h.line-g.line;if(0==g.ch&&0==h.ch&&""==k){for(var o=0,s=i.length-1,n=[];o<s;++o)n.push(Xa(i[o],f(o),e));Ca(j,j.text,m,e);p&&a.remove(g.line,p);n.length&&a.insert(g.line,n)}else if(l==j)if(1==i.length)Ca(l,l.text.slice(0,g.ch)+k+l.text.slice(h.ch),m,e);else{n=[];o=1;for(s=i.length-1;o<s;++o)n.push(Xa(i[o],f(o),e));n.push(Xa(k+l.text.slice(h.ch),m,e));Ca(l,l.text.slice(0,g.ch)+i[0],f(0),e);a.insert(g.line+1,n)}else if(1==i.length)Ca(l,
110
+ l.text.slice(0,g.ch)+i[0]+j.text.slice(h.ch),f(0),e),a.remove(g.line+1,p);else{Ca(l,l.text.slice(0,g.ch)+i[0],f(0),e);Ca(j,k+j.text.slice(h.ch),m,e);o=1;s=i.length-1;for(n=[];o<s;++o)n.push(Xa(i[o],f(o),e));1<p&&a.remove(g.line+1,p-1);a.insert(g.line+1,n)}Q(a,"change",a,b);aa(a,d.anchor,d.head,null,!0)}function Kb(a){this.lines=a;this.parent=null;for(var b=0,c=a.length,d=0;b<c;++b)a[b].parent=this,d+=a[b].height;this.height=d}function Za(a){var b,c,d,e,f;this.children=a;d=c=b=0;for(e=a.length;d<e;++d)f=
111
+ a[d],b+=f.chunkSize(),c+=f.height,f.parent=this;this.size=b;this.height=c;this.parent=null}function Ba(a,b,c){function d(a,f,g){var h,i,l;if(a.linked)for(h=0;h<a.linked.length;++h)(i=a.linked[h],i.doc!=f)&&(l=g&&i.sharedHist,!c||l)&&(b(i.doc,l),d(i.doc,a,l))}d(a,null,!0)}function Ac(a,b){if(b.cm)throw Error("This document is already in use.");a.doc=b;b.cm=a;Cc(a);fb(a);a.options.lineWrapping||Wb(a);a.options.mode=b.modeOption;y(a)}function r(a,b){for(var c,d,e,b=b-a.first;!a.lines;)for(c=0;;++c){if(d=
112
+ a.children[c],e=d.chunkSize(),b<e){a=d;break}b-=e}return a.lines[b]}function xd(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){a=a.text;e==c.line&&(a=a.slice(0,c.ch));e==b.line&&(a=a.slice(b.ch));d.push(a);++e}),d}function uc(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function P(a,b){for(var c=b-a.height,d=a;d;d=d.parent)d.height+=c}function L(a){var b,c,d;if(null==a.parent)return null;b=a.parent;a=Y(b.lines,a);for(c=b.parent;c;b=c,c=c.parent)for(d=0;c.children[d]!=
113
+ b;++d)a+=c.children[d].chunkSize();return a+b.first}function lb(a,b){var c=a.first,d,e,f,g,h,i;a:do{f=0;for(g=a.children.length;f<g;++f){if(d=a.children[f],e=d.height,b<e){a=d;continue a}b-=e;c+=d.chunkSize()}return c}while(!a.lines);f=0;for(g=a.lines.length;f<g&&!(h=a.lines[f],i=h.height,b<i);++f)b-=i;return c+f}function ra(a,b){var c,d,e,f,g,b=qa(a.doc,b);c=0;d=b.parent;for(f=0;f<d.lines.length&&!(e=d.lines[f],e==b);++f)c+=e.height;for(e=d.parent;e;d=e,e=d.parent)for(f=0;f<e.children.length&&!(g=
114
+ e.children[f],g==d);++f)c+=g.height;return c}function R(a){var b=a.order;return null==b&&(b=a.order=yd(a.text)),b}function Lb(){return{done:[],undone:[],undoDepth:Infinity,lastTime:0,lastOp:null,lastOrigin:null,dirtyCounter:0}}function zd(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans);++f})}function oc(a,b){var c={from:b.from,to:kc(b),text:xd(a,b.from,b.to)};return zd(a,c,b.from.line,
115
+ b.to.line+1),Ba(a,function(a){zd(a,c,b.from.line,b.to.line+1)},!0),c}function fe(a,b,c,d){var e=a.history,f,g,h;if(e.undone.length=0,f=+new Date,g=F(e.done),g&&(e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&e.lastTime>f-600||"*"==b.origin.charAt(0))))h=F(g.changes),A(b.from,b.to)&&A(b.from,h.to)?h.to=kc(b):g.changes.push(oc(a,b)),g.anchorAfter=c.anchor,g.headAfter=c.head;else{g={changes:[oc(a,b)],anchorBefore:a.sel.anchor,headBefore:a.sel.head,anchorAfter:c.anchor,headAfter:c.head};
116
+ for(e.done.push(g);e.done.length>e.undoDepth;)e.done.shift();0>e.dirtyCounter?e.dirtyCounter=NaN:e.dirtyCounter++}e.lastTime=f;e.lastOp=d;e.lastOrigin=b.origin}function ie(a){if(!a)return null;for(var b=0,c;b<a.length;++b)a[b].marker.explicitlyCleared?c||(c=a.slice(0,b)):c&&c.push(a[b]);return c?c.length?c:null:a}function Mb(a,b){for(var c,d,e,f,g=0,h=[];g<a.length;++g){c=a[g];var i=c.changes,l=[];h.push({changes:l,anchorBefore:c.anchorBefore,headBefore:c.headBefore,anchorAfter:c.anchorAfter,headAfter:c.headAfter});
117
+ for(c=0;c<i.length;++c)if(d=i[c],l.push({from:d.from,to:d.to,text:d.text}),b)for(f in d)(e=f.match(/^spans_(\d+)$/))&&-1<Y(b,Number(e[1]))&&(F(l)[f]=d[f],delete d[f])}return h}function Nb(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function Ad(a,b,c,d){for(var e,f,g,h,i=0;i<a.length;++i){e=a[i];f=!0;for(g=0;g<e.changes.length;++g)if(h=e.changes[g],e.copied||(h.from=ja(h.from),h.to=ja(h.to)),c<h.from.line)h.from.line+=d,h.to.line+=d;else if(b<=h.to.line){f=!1;break}e.copied||(e.anchorBefore=
118
+ ja(e.anchorBefore),e.headBefore=ja(e.headBefore),e.anchorAfter=ja(e.anchorAfter),e.readAfter=ja(e.headAfter),e.copied=!0);f?(Nb(e.anchorBefore),Nb(e.headBefore),Nb(e.anchorAfter),Nb(e.headAfter)):(a.splice(0,i+1),i=0)}}function gd(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;Ad(a.done,c,d,e);Ad(a.undone,c,d,e)}function le(){wb(this)}function Na(a){return a.stop||(a.stop=le),a}function z(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Bd(a){a.stopPropagation?a.stopPropagation():
119
+ a.cancelBubble=!0}function wb(a){z(a);Bd(a)}function Yc(a){var b=a.which;return null==b&&(a.button&1?b=1:a.button&2?b=3:a.button&4&&(b=2)),sa&&a.ctrlKey&&1==b&&(b=3),b}function w(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):(a=a._handlers||(a._handlers={}),(a[b]||(a[b]=[])).push(c))}function W(a,b,c){var d;if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else if(!(d=a._handlers&&a._handlers[b],!d))for(a=
120
+ 0;a<d.length;++a)if(d[a]==c){d.splice(a,1);break}}function M(a,b){var c=a._handlers&&a._handlers[b],d,e;if(c){d=Array.prototype.slice.call(arguments,2);for(e=0;e<c.length;++e)c[e].apply(null,d)}}function Q(a,b){function c(a){return function(){a.apply(null,e)}}var d=a._handlers&&a._handlers[b],e,f;if(d){e=Array.prototype.slice.call(arguments,2);Z||(++Ia,Z=[],setTimeout(me,0));for(f=0;f<d.length;++f)Z.push(c(d[f]))}}function me(){var a,b;--Ia;a=Z;Z=null;for(b=0;b<a.length;++b)a[b]()}function za(a,b){var c=
121
+ a._handlers&&a._handlers[b];return c&&0<c.length}function Sb(){this.id=null}function ua(a,b,c){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var d=0,e=0;d<b;++d)"\t"==a.charAt(d)?e+=c-e%c:++e;return e}function md(a){for(;$a.length<=a;)$a.push(F($a)+" ");return $a[a]}function F(a){return a[a.length-1]}function Tc(a){eb?(a.selectionStart=0,a.selectionEnd=a.value.length):a.select()}function Y(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;c<d;++c)if(a[c]==b)return c;return-1}
122
+ function Hb(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function Nc(a){for(var b=[],c=0;c<a;++c)b.push(void 0);return b}function O(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Gb(a){return/\w/.test(a)||"€"<a&&(a.toUpperCase()!=a.toLowerCase()||Cd.test(a))}function Dd(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function s(a,b,c,d){a=document.createElement(a);if(c&&(a.className=c),d&&(a.style.cssText=
123
+ d),"string"==typeof b)Hc(a,b);else if(b)for(c=0;c<b.length;++c)a.appendChild(b[c]);return a}function ib(a){if(K)for(;a.firstChild;)a.removeChild(a.firstChild);else a.innerHTML="";return a}function V(a,b){return ib(a).appendChild(b)}function Hc(a,b){ga?(a.innerHTML="",a.appendChild(document.createTextNode(b))):a.textContent=b}function C(a){return a.getBoundingClientRect()}function kb(a){if(null!=Ob)return Ob;var b=s("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return V(a,b),b.offsetWidth&&
124
+ (Ob=b.offsetHeight-b.clientHeight),Ob||0}function tc(a){if(null==vc){var b=s("span","​");V(a,s("span",[b,document.createTextNode("x")]));0!=a.firstChild.offsetHeight&&(vc=1>=b.offsetWidth&&2<b.offsetHeight&&!oa)}return vc?s("span","​"):s("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Sd(a,b,c,d){var e,f;if(!a)return d(b,c,"ltr");for(e=0;e<a.length;++e)f=a[e],(f.from<c&&f.to>b||b==c&&f.to==b)&&d(Math.max(f.from,b),Math.min(f.to,c),1==f.level?"rtl":"ltr")}function wc(a){return a.level%
125
+ 2?a.from:a.to}function sb(a){return(a=R(a))?a[0].level%2?a[0].to:a[0].from:0}function tb(a){var b=R(a);return b?wc(F(b)):a.text.length}function Ed(a,b){var c=r(a.doc,b),d=qa(a.doc,c),e,f;return d!=c&&(b=L(d)),e=R(d),f=e?e[0].level%2?tb(d):sb(d):0,o(b,f)}function ne(a,b){for(var c,d,e,f;c=Fa(d=r(a.doc,b));)b=c.find().to.line;return e=R(d),f=e?e[0].level%2?sb(d):tb(d):d.text.length,o(b,f)}function cc(a,b,c,d){var e=R(a),f,g,h,i;if(!e)return nd(a,b,c,d);d=d?function(b,c){do b+=c;while(0<b&&ub.test(a.text.charAt(b)));
126
+ return b}:function(a,b){return a+b};f=e[0].level;for(g=0;g<e.length&&!(h=e[g],i=h.level%2==f,h.from<b&&h.to>b||i&&(h.from==b||h.to==b));++g);for(b=d(b,h.level%2?-c:c);null!=b;)if(h.level%2==f)if(b<h.from||b>h.to)b=(h=e[g+=c])&&(0<c==h.level%2?d(h.to,-1):d(h.from,1));else break;else if(b==(h.level%2?h.to:h.from))b=(h=e[--g])&&wc(h);else if(b==wc(h))b=(h=e[++g])&&(h.level%2?h.to:h.from);else break;return 0>b||b>a.text.length?null:b}function nd(a,b,c,d){b+=c;if(d)for(;0<b&&ub.test(a.text.charAt(b));)b+=
127
+ c;return 0>b||b>a.text.length?null:b}var Aa=/gecko\/\d/i.test(navigator.userAgent),K=/MSIE \d/.test(navigator.userAgent),oa=K&&(null==document.documentMode||8>document.documentMode),ga=K&&(null==document.documentMode||9>document.documentMode),T=/WebKit\//.test(navigator.userAgent),oe=T&&/Qt\/\d+\.\d+/.test(navigator.userAgent),Fd=/Chrome\//.test(navigator.userAgent),X=/Opera\//.test(navigator.userAgent),gc=/Apple Computer/.test(navigator.vendor),Vb=/KHTML\//.test(navigator.userAgent),Ld=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),
128
+ Md=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),Wd=/PhantomJS/.test(navigator.userAgent),eb=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Rb=eb||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),sa=eb||/Mac/.test(navigator.platform),pe=/windows/i.test(navigator.platform),ab=X&&navigator.userAgent.match(/Version\/(\d*\.\d*)/),ha,Pc,yb,xb,Qa,N,bd,Bb,jc,da,cb,Ub,xc,Pb,Da,db,Ab,S,Ib,sc,Jb,Gd,H,Hd,bb,Z,Ia,na,hc,$a,Cd,ub,
129
+ Zc,Ya,Ob,vc,ia,yd;ab&&(ab=Number(ab[1]));var pd=sa&&(oe||X&&(null==ab||12.11>ab)),fc=Aa||K&&!ga,fd=!1,Ga=!1;Qa=Pc=0;N=null;K?N=-0.53:Aa?N=15:Fd?N=-0.7:gc&&(N=-1/3);Bb=null;m.Pos=o;m.prototype={focus:function(){window.focus();G(this);ca(this);Ka(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,da.hasOwnProperty(a)&&x(this,da[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a){this.state.keyMaps.push(a)},
130
+ removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(("string"==typeof a?b[c].name:b[c])==a)return b.splice(c,1),!0},addOverlay:x(null,function(a,b){var c=a.token?a:m.getMode(this.options,a);if(c.startState)throw Error("Overlays may not be stateful.");this.state.overlays.push({mode:c,modeSpec:a,opaque:b&&b.opaque});this.state.modeGen++;y(this)}),removeOverlay:x(null,function(a){for(var b=this.state.overlays,c=0;c<b.length;++c)if(b[c].modeSpec==a){b.splice(c,1);this.state.modeGen++;
131
+ y(this);break}}),indentLine:x(null,function(a,b,c){"string"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract");ka(this.doc,a)&&Cb(this,a,b,c)}),indentSelection:x(null,function(a){var b=this.doc.sel,c;if(A(b.from,b.to))return Cb(this,b.from.line,a);c=b.to.line-(b.to.ch?0:1);for(b=b.from.line;b<=c;++b)Cb(this,b,a)}),getTokenAt:function(a){for(var b=this.doc,c,a=t(b,a),d=Ha(this,a.line),e=this.doc.mode,b=r(b,a.line),b=new Ta(b.text,this.options.tabSize);b.pos<a.ch&&!b.eol();)b.start=
132
+ b.pos,c=e.token(b,d);return{start:b.start,end:b.pos,string:b.current(),className:c||null,type:c||null,state:d}},getStateAfter:function(a){var b=this.doc;return a=Math.max(b.first,Math.min(null==a?b.first+b.size-1:a,b.first+b.size-1)),Ha(this,a+1)},cursorCoords:function(a,b){var c,d=this.doc.sel;return c=null==a?d.head:"object"==typeof a?t(this.doc,a):a?d.from:d.to,U(this,c,b||"page")},charCoords:function(a,b){return nb(this,t(this.doc,a),b||"page")},coordsChar:function(a){var b=C(this.display.lineSpace);
133
+ return bc(this,a.left-b.left-(window.pageXOffset||(document.documentElement||document.body).scrollLeft),a.top-b.top-(window.pageYOffset||(document.documentElement||document.body).scrollTop))},defaultTextHeight:function(){return hb(this.display)},setGutterMarker:x(null,function(a,b,c){return Fb(this,a,function(a){var e=a.gutterMarkers||(a.gutterMarkers={});return e[b]=c,!c&&Dd(e)&&(a.gutterMarkers=null),!0})}),clearGutter:x(null,function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&
134
+ c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,y(b,d,d+1),Dd(c.gutterMarkers)&&(c.gutterMarkers=null));++d})}),addLineClass:x(null,function(a,b,c){return Fb(this,a,function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[e]){if(RegExp("\\b"+c+"\\b").test(a[e]))return!1;a[e]+=" "+c}else a[e]=c;return!0})}),removeLineClass:x(null,function(a,b,c){return Fb(this,a,function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",f=a[e],g;if(f)if(null==c)a[e]=null;else{if(g=
135
+ f.replace(RegExp("^"+c+"\\b\\s*|\\s*\\b"+c+"\\b"),""),g==f)return!1;a[e]=g||null}else return!1;return!0})}),addLineWidget:x(null,function(a,b,c){return je(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){var b;if("number"==typeof a){if(!ka(this.doc,a)||(b=a,a=r(this.doc,a),!a))return null}else if(b=L(a),null==b)return null;return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.showingFrom,
136
+ to:this.display.showingTo}},addWidget:function(a,b,c,d,e){var f=this.display,g,h,i,l,a=U(this,t(this.doc,a));g=a.bottom;h=a.left;b.style.position="absolute";f.sizer.appendChild(b);"over"==d?g=a.top:("above"==d||"near"==d)&&(i=Math.max(f.wrapper.clientHeight,this.doc.height),l=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth),("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>l&&(h=l-b.offsetWidth));b.style.top=
137
+ g+f.lineSpace.offsetTop+"px";b.style.left=b.style.right="";"right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px");c&&ld(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:x(null,Wc),execCommand:function(a){return Ab[a](this)},findPosH:function(a,b,c,d){var e=1,f;0>b&&(e=-1,b=-b);f=0;for(a=t(this.doc,a);f<b&&!(a=qc(this.doc,a,e,c,d),a.hitSide);++f);return a},moveH:x(null,function(a,b){var c=
138
+ this.doc.sel,c=c.shift||c.extend||A(c.from,c.to)?qc(this.doc,c.head,a,b,this.options.rtlMoveVisually):0>a?c.from:c.to;E(this.doc,c,c,a)}),deleteH:x(null,function(a,b){var c=this.doc.sel;A(c.from,c.to)?$(this.doc,"",c.from,qc(this.doc,c.head,a,b,!1),"+delete"):$(this.doc,"",c.from,c.to,"+delete");this.curOp.userSelChange=!0}),findPosV:function(a,b,c,d){var e=1,f,g;0>b&&(e=-1,b=-b);f=0;for(a=t(this.doc,a);f<b&&!(g=U(this,a,"div"),null==d?d=g.left:g.left=d,a=od(this,g,e,c),a.hitSide);++f);return a},
139
+ moveV:x(null,function(a,b){var c=this.doc.sel,d=U(this,c.head,"div"),e;null!=c.goalColumn&&(d.left=c.goalColumn);e=od(this,d,a,b);"page"==b&&(this.display.scrollbarV.scrollTop+=nb(this,e,"div").top-d.top);E(this.doc,e,e,a);c.goalColumn=d.left}),toggleOverwrite:function(){(this.state.overwrite=!this.state.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite","")},scrollTo:x(null,function(a,b){this.curOp.updateScrollPos=
140
+ {scrollLeft:a,scrollTop:b}}),getScrollInfo:function(){var a=this.display.scroller,b=na;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=o(a,0));a&&null==a.line?ld(this,a.left,a.top,a.right,a.bottom):(a=a?t(this.doc,a):this.doc.sel.head,Qc(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=
141
+ c(a));null!=b&&(this.display.wrapper.style.height=c(b));this.refresh()},on:function(a,b){w(this,a,b)},off:function(a,b){W(this,a,b)},operation:function(a){return Rc(this,a)},refresh:x(null,function(){pa(this);this.curOp.updateScrollPos={scrollTop:this.doc.scrollTop,scrollLeft:this.doc.scrollLeft};y(this)}),swapDoc:x(null,function(a){var b=this.doc;return b.cm=null,Ac(this,a),pa(this),this.curOp.updateScrollPos={scrollTop:a.scrollTop,scrollLeft:a.scrollLeft},b}),getInputField:function(){return this.display.input},
142
+ getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};da=m.optionHandlers={};cb=m.defaults={};Ub=m.Init={toString:function(){return"CodeMirror.Init"}};u("value","",function(a,b){a.setValue(b)},!0);u("mode",null,function(a,b){a.doc.modeOption=b;fb(a)},!0);u("indentUnit",2,fb,!0);u("indentWithTabs",!1);u("smartIndent",!0);u("tabSize",4,function(a){fb(a);pa(a);y(a)},!0);u("electricChars",
143
+ !0);u("rtlMoveVisually",!pe);u("theme","default",function(a){zc(a);Ea(a)},!0);u("keyMap","default",function(a){var b=S[a.options.keyMap].style;a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(b?" cm-keymap-"+b:"")});u("extraKeys",null);u("onKeyEvent",null);u("onDragEvent",null);u("lineWrapping",!1,function(a){a.options.lineWrapping?(a.display.wrapper.className=a.display.wrapper.className+" CodeMirror-wrap",a.display.sizer.style.minWidth=""):(a.display.wrapper.className=
144
+ a.display.wrapper.className.replace(" CodeMirror-wrap",""),Wb(a));Cc(a);y(a);pa(a);setTimeout(function(){Dc(a.display,a.doc.height)},100)},!0);u("gutters",[],function(a){Qb(a.options);Ea(a)},!0);u("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?Yb(a.display)+"px":"0";a.refresh()},!0);u("lineNumbers",!1,function(a){Qb(a.options);Ea(a)},!0);u("firstLineNumber",1,Ea,!0);u("lineNumberFormatter",function(a){return a},Ea,!0);u("showCursorWhenSelecting",!1,Zb,!0);u("readOnly",!1,function(a,
145
+ b){b=="nocursor"?(Tb(a),a.display.input.blur()):b||ba(a,true)});u("dragDrop",!0);u("cursorBlinkRate",530);u("cursorHeight",1);u("workTime",100);u("workDelay",100);u("flattenSpans",!0);u("pollInterval",100);u("undoDepth",40,function(a,b){a.doc.history.undoDepth=b});u("viewportMargin",10,function(a){a.refresh()},!0);u("tabindex",null,function(a,b){a.display.input.tabIndex=b||""});u("autofocus",null);xc=m.modes={};Pb=m.mimeModes={};m.defineMode=function(a,b){if(m.defaults.mode||"null"==a||(m.defaults.mode=
146
+ a),2<arguments.length){b.dependencies=[];for(var c=2;c<arguments.length;++c)b.dependencies.push(arguments[c])}xc[a]=b};m.defineMIME=function(a,b){Pb[a]=b};m.resolveMode=function(a){if("string"==typeof a&&Pb.hasOwnProperty(a))a=Pb[a];else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return m.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}};m.getMode=function(a,b){var c,d,e;if(b=m.resolveMode(b),c=xc[b.name],!c)return m.getMode(a,"text/plain");if(c=c(a,
147
+ b),Da.hasOwnProperty(b.name))for(e in d=Da[b.name],d)d.hasOwnProperty(e)&&(c.hasOwnProperty(e)&&(c["_"+e]=c[e]),c[e]=d[e]);return c.name=b.name,c};m.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}});m.defineMIME("text/plain","null");Da=m.modeExtensions={};m.extendMode=function(a,b){var c=Da.hasOwnProperty(a)?Da[a]:Da[a]={};Hb(b,c)};m.defineExtension=function(a,b){m.prototype[a]=b};m.defineOption=u;db=[];m.defineInitHook=function(a){db.push(a)};m.copyState=ta;m.startState=Lc;
148
+ m.innerMode=function(a,b){for(;a.innerMode;)var c=a.innerMode(b),b=c.state,a=c.mode;return c||{mode:a,state:b}};Ab=m.commands={selectAll:function(a){a.setSelection(o(a.firstLine(),0),o(a.lastLine()))},killLine:function(a){var b=a.getCursor(!0),c=a.getCursor(!1),d=!A(b,c);d||a.getLine(b.line).length!=b.ch?a.replaceRange("",b,d?c:o(b.line),"+delete"):a.replaceRange("",b,o(b.line+1,0),"+delete")},deleteLine:function(a){var b=a.getCursor().line;a.replaceRange("",o(b,0),o(b),"+delete")},undo:function(a){a.undo()},
149
+ redo:function(a){a.redo()},goDocStart:function(a){a.extendSelection(o(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(o(a.lastLine()))},goLineStart:function(a){a.extendSelection(Ed(a,a.getCursor().line))},goLineStartSmart:function(a){var b=a.getCursor(),c=Ed(a,b.line),d=a.getLineHandle(c.line),e=R(d),f,g;e&&0!=e[0].level?a.extendSelection(c):(f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch,a.extendSelection(o(c.line,g?0:f)))},goLineEnd:function(a){a.extendSelection(ne(a,
150
+ a.getCursor().line))},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},
151
+ delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("\t","end","+input")},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.replaceSelection("\t","end","+input")},transposeChars:function(a){var b=
152
+ a.getCursor(),c=a.getLine(b.line);0<b.ch&&b.ch<c.length-1&&a.replaceRange(c.charAt(b.ch)+c.charAt(b.ch-1),o(b.line,b.ch-1),o(b.line,b.ch+1))},newlineAndIndent:function(a){x(a,function(){a.replaceSelection("\n","end","+input");a.indentLine(a.getCursor().line,null,!0)})()},toggleOverwrite:function(a){a.toggleOverwrite()}};S=m.keyMap={};S.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",
153
+ Backspace:"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"};S.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordBefore","Ctrl-Delete":"delWordAfter","Ctrl-S":"save","Ctrl-F":"find",
154
+ "Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"};S.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordBefore","Ctrl-Alt-Backspace":"delWordAfter",
155
+ "Alt-Delete":"delWordAfter","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",fallthrough:["basic","emacsy"]};S["default"]=sa?S.macDefault:S.pcDefault;S.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",
156
+ "Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};m.lookupKey=Ra;m.isModifierKey=cd;m.keyName=dd;m.fromTextArea=function(a,b){function c(){a.value=h.getValue()}var d,e,f,g,h;if(b||(b={}),b.value=a.value,!b.tabindex&&a.tabindex&&(b.tabindex=a.tabindex),null==b.autofocus){d=document.body;try{d=document.activeElement}catch(i){}b.autofocus=d==a||null!=a.getAttribute("autofocus")&&d==document.body}if(a.form){w(a.form,
157
+ "submit",c);e=a.form;f=e.submit;try{g=e.submit=function(){c();e.submit=f;e.submit();e.submit=g}}catch(l){}}return a.style.display="none",h=m(function(b){a.parentNode.insertBefore(b,a.nextSibling)},b),h.save=c,h.getTextArea=function(){return a},h.toTextArea=function(){c();a.parentNode.removeChild(h.getWrapperElement());a.style.display="";a.form&&(W(a.form,"submit",c),"function"==typeof a.form.submit&&(a.form.submit=f))},h};Ta.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==
158
+ this.pos},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos),c;return c="string"==typeof a?b==a:b&&(a.test?a.test(b):a(b)),c?(++this.pos,b):void 0},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=
159
+ this.string.length},skipTo:function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0},backUp:function(a){this.pos-=a},column:function(){return ua(this.string,this.start,this.tabSize)},indentation:function(){return ua(this.string,null,this.tabSize)},match:function(a,b,c){var d,e;if("string"==typeof a){if(d=function(a){return c?a.toLowerCase():a},d(this.string).indexOf(d(a),this.pos)==this.pos)return!1!==b&&(this.pos+=a.length),!0}else return(e=this.string.slice(this.pos).match(a),
160
+ e&&0<e.index)?null:(e&&!1!==b&&(this.pos+=e[0].length),e)},current:function(){return this.string.slice(this.start,this.pos)}};m.StringStream=Ta;m.TextMarker=ma;ma.prototype.clear=function(){var a,b,c,d,e,f,g;if(!this.explicitlyCleared){(b=(a=this.doc.cm)&&!a.curOp)&&va(a);d=c=null;for(g=0;g<this.lines.length;++g){e=this.lines[g];f=Wa(e.markedSpans,this);null!=f.to&&(d=L(e));for(var h=e,i=e.markedSpans,l=f,j=void 0,k=0;k<i.length;++k)i[k]!=l&&(j||(j=[])).push(i[k]);h.markedSpans=j;null!=f.from?c=L(e):
161
+ this.collapsed&&!ea(this.doc,e)&&a&&P(e,hb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(g=0;g<this.lines.length;++g)e=qa(a.doc,this.lines[g]),f=jb(a.doc,e),f>a.display.maxLineLength&&(a.display.maxLine=e,a.display.maxLineLength=f,a.display.maxLineChanged=!0);null!=c&&a&&y(a,c,d+1);this.lines.length=0;this.explicitlyCleared=!0;this.collapsed&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&kd(a));b&&wa(a);Q(this,"clear")}};ma.prototype.find=function(){for(var a,b,c,d,e,f=0;f<this.lines.length;++f)c=
162
+ this.lines[f],d=Wa(c.markedSpans,this),(null!=d.from||null!=d.to)&&(e=L(c),null!=d.from&&(a=o(e,d.from)),null!=d.to&&(b=o(e,d.to)));return"bookmark"==this.type?a:a&&{from:a,to:b}};ma.prototype.getOptions=function(a){var b=this.replacedWith;return{className:this.className,inclusiveLeft:this.inclusiveLeft,inclusiveRight:this.inclusiveRight,atomic:this.atomic,collapsed:this.collapsed,clearOnEnter:this.clearOnEnter,replacedWith:a?b&&b.cloneNode(!0):b,readOnly:this.readOnly,startStyle:this.startStyle,
163
+ endStyle:this.endStyle}};ma.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=Y(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)};ma.prototype.detachLine=function(a){if(this.lines.splice(Y(this.lines,a),1),!this.lines.length&&this.doc.cm)a=this.doc.cm.curOp,(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this)};m.SharedTextMarker=Va;Va.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=
164
+ !0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Q(this,"clear")}};Va.prototype.find=function(){return this.primary.find()};Va.prototype.getOptions=function(a){a=this.primary.getOptions(a);return a.shared=!0,a};Ib=m.LineWidget=function(a,b,c){for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.cm=a;this.node=b};Ib.prototype.clear=sd(function(){var a=this.line.widgets,b=L(this.line),c;if(null!=b&&a){for(c=0;c<a.length;++c)a[c]==this&&a.splice(c--,1);a.length||(this.line.widgets=
165
+ null);P(this.line,Math.max(0,this.line.height-qb(this)));y(this.cm,b,b+1)}});Ib.prototype.changed=sd(function(){var a=this.height,b,c;(this.height=null,b=qb(this)-a,b)&&(P(this.line,this.line.height+b),c=L(this.line),y(this.cm,c,c+1))});sc={};Jb=/[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g;Kb.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c,d=a,e=a+b;d<e;++d){c=this.lines[d];this.height-=c.height;var f=c;f.parent=null;qd(f);Q(c,"delete")}this.lines.splice(a,
166
+ b)},collapse:function(a){a.splice.apply(a,[a.length,0].concat(this.lines))},insertInner:function(a,b,c){this.height+=c;this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));a=0;for(c=b.length;a<c;++a)b[a].parent=this},iterN:function(a,b,c){for(b=a+b;a<b;++a)if(c(this.lines[a]))return!0}};Za.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){var c,d,e,f,g,h;this.size-=b;for(c=0;c<this.children.length;++c)if(d=this.children[c],e=d.chunkSize(),a<e){if(f=Math.min(b,
167
+ e-a),g=d.height,d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e;25>this.size-b&&(h=[],this.collapse(h),this.children=[new Kb(h)],this.children[0].parent=this)},collapse:function(a){for(var b=0,c=this.children.length;b<c;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){var d,e,f,g;this.size+=b.length;this.height+=c;d=0;for(e=this.children.length;d<e;++d){if(f=this.children[d],g=f.chunkSize(),a<=g){if(f.insertInner(a,
168
+ b,c),f.lines&&50<f.lines.length){for(;50<f.lines.length;)a=f.lines.splice(f.lines.length-25,25),a=new Kb(a),f.height-=a.height,this.children.splice(d+1,0,a),a.parent=this;this.maybeSpill()}break}a-=g}},maybeSpill:function(){var a,b,c,d;if(!(10>=this.children.length)){a=this;do b=a.children.splice(a.children.length-5,5),b=new Za(b),a.parent?(a.size-=b.size,a.height-=b.height,d=Y(a.parent.children,a),a.parent.children.splice(d+1,0,b)):(c=new Za(a.children),c.parent=a,a.children=[c,b],a=c),b.parent=
169
+ a.parent;while(10<a.children.length);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d,e,f,g=0,h=this.children.length;g<h;++g)if(d=this.children[g],e=d.chunkSize(),a<e){if(f=Math.min(b,e-a),d.iterN(a,f,c))return!0;if(0==(b-=f))break;a=0}else a-=e}};Gd=0;H=m.Doc=function(a,b,c){if(!(this instanceof H))return new H(a,b,c);null==c&&(c=0);Za.call(this,[new Kb([Xa("",null)])]);this.first=c;this.scrollTop=this.scrollLeft=0;this.cantEdit=!1;this.history=Lb();this.frontier=c;c=o(c,0);this.sel={from:c,
170
+ to:c,head:c,anchor:c,shift:!1,extend:!1,goalColumn:null};this.id=++Gd;this.modeOption=b;"string"==typeof a&&(a=ia(a));pc(this,{from:c,to:c,text:a},null,{head:c,anchor:c})};H.prototype=function(a,b){function c(){}c.prototype=a;var d=new c;return b&&Hb(b,d),d}(Za.prototype,{iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0,e=b.length;d<e;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-
171
+ this.first,b)},getValue:function(a){var b=uc(this,this.first,this.first+this.size);return!1===a?b:b.join(a||"\n")},setValue:function(a){var b=o(this.first,0),c=this.first+this.size-1;Ma(this,{from:b,to:o(c,r(this,c).text.length),text:ia(a),origin:"setValue"},{head:b,anchor:b},!0)},replaceRange:function(a,b,c,d){b=t(this,b);c=c?t(this,c):b;$(this,a,b,c,d)},getRange:function(a,b,c){a=xd(this,t(this,a),t(this,b));return!1===c?a:a.join(c||"\n")},getLine:function(a){return(a=this.getLineHandle(a))&&a.text},
172
+ setLine:function(a,b){ka(this,a)&&$(this,b,o(a,0),t(this,o(a)))},removeLine:function(a){ka(this,a)&&$(this,"",o(a,0),t(this,o(a+1,0)))},getLineHandle:function(a){if(ka(this,a))return r(this,a)},getLineNumber:function(a){return L(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return t(this,a)},getCursor:function(a){var b=this.sel,c;return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==
173
+ a||!1===a?b.to:b.from,ja(c)},somethingSelected:function(){return!A(this.sel.head,this.sel.anchor)},setCursor:Ja(function(a,b,c){a=t(this,"number"==typeof a?o(a,b||0):a);c?E(this,a):aa(this,a,a)}),setSelection:Ja(function(a,b){aa(this,t(this,a),t(this,b||a))}),extendSelection:Ja(function(a,b){E(this,t(this,a),b&&t(this,b))}),getSelection:function(a){return this.getRange(this.sel.from,this.sel.to,a)},replaceSelection:function(a,b,c){Ma(this,{from:this.sel.from,to:this.sel.to,text:ia(a),origin:c},b||
174
+ "around")},undo:Ja(function(){hd(this,"undo")}),redo:Ja(function(){hd(this,"redo")}),setExtending:function(a){this.sel.extend=a},historySize:function(){var a=this.history;return{undo:a.done.length,redo:a.undone.length}},clearHistory:function(){this.history=Lb()},markClean:function(){this.history.dirtyCounter=0;this.history.lastOp=this.history.lastOrigin=null},isClean:function(){return 0==this.history.dirtyCounter},getHistory:function(){return{done:Mb(this.history.done),undone:Mb(this.history.undone)}},
175
+ setHistory:function(a){var b=this.history=Lb();b.done=a.done.slice(0);b.undone=a.undone.slice(0)},markText:function(a,b,c){return Ua(this,t(this,a),t(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft};return a=t(this,a),Ua(this,a,a,c,"bookmark")},findMarksAt:function(a){var b,c,d,e;if(a=t(this,a),b=[],c=r(this,a.line).markedSpans,c)for(d=0;d<c.length;++d)e=c[d],(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||
176
+ e.marker);return b},getAllMarks:function(){var a=[];return this.iter(function(b){var b=b.markedSpans,c;if(b)for(c=0;c<b.length;++c)null!=b[c].from&&a.push(b[c].marker)}),a},posFromIndex:function(a){var b,c=this.first;return this.iter(function(d){d=d.text.length+1;if(d>a)return b=a,!0;a-=d;++c}),t(this,o(c,b))},indexFromPos:function(a){var a=t(this,a),b=a.ch;return a.line<this.first||0>a.ch?0:(this.iter(this.first,a.line,function(a){b+=a.text.length+1}),b)},copy:function(a){var b=new H(uc(this,this.first,
177
+ this.first+this.size),this.modeOption,this.first);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:!1,goalColumn:this.sel.goalColumn},a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){var b,c,d;return a||(a={}),b=this.first,c=this.first+this.size,null!=a.from&&a.from>b&&(b=a.from),null!=a.to&&a.to<c&&(c=a.to),d=new H(uc(this,
178
+ b,c),a.mode||this.modeOption,b),a.sharedHist&&(d.history=this.history),(this.linked||(this.linked=[])).push({doc:d,sharedHist:a.sharedHist}),d.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],d},unlinkDoc:function(a){var b,c,d;if(a instanceof m&&(a=a.doc),this.linked)for(b=0;b<this.linked.length;++b)if(c=this.linked[b],c.doc==a){this.linked.splice(b,1);a.unlinkDoc(this);break}a.history==this.history&&(d=[a.id],Ba(a,function(a){d.push(a.id)},!0),a.history=Lb(),a.history.done=Mb(this.history.done,
179
+ d),a.history.undone=Mb(this.history.undone,d))},iterLinkedDocs:function(a){Ba(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});H.prototype.eachLine=H.prototype.iter;Hd=["iter","insert","remove","copy","getEditor"];for(bb in H.prototype)H.prototype.hasOwnProperty(bb)&&0>Y(Hd,bb)&&(m.prototype[bb]=function(a){return function(){return a.apply(this.doc,arguments)}}(H.prototype[bb]));m.e_stop=wb;m.e_preventDefault=z;m.e_stopPropagation=Bd;Ia=0;m.on=w;m.off=W;m.signal=
180
+ M;na=30;hc=m.Pass={toString:function(){return"CodeMirror.Pass"}};Sb.prototype={set:function(a,b){clearTimeout(this.id);this.id=setTimeout(b,a)}};m.countColumn=ua;$a=[""];Cd=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/;ub=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff]/;m.replaceGetRect=function(a){C=a};Zc=function(){if(ga)return!1;
181
+ var a=s("div");return"draggable"in a||"dragDrop"in a}();Ya=/^$/;Aa?Ya=/$'/:gc?Ya=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:Fd&&(Ya=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/);ia=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length,e,f,g;b<=d;)e=a.indexOf("\n",b),-1==e&&(e=a.length),f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r"),-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1);return c}:function(a){return a.split(/\r\n?|\n/)};m.splitLines=
182
+ ia;var Xd=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return!b||b.parentElement()!=a?!1:0!=b.compareEndPoints("StartToEnd",b)},Sc=function(){var a=s("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),la={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",
183
+ 34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return m.keyNames=la,function(){for(var a=0;10>a;a++)la[a+48]=""+a;for(a=65;90>=a;a++)la[a]=String.fromCharCode(a);
184
+ for(a=1;12>=a;a++)la[a+111]=la[a+63235]="F"+a}(),yd=function(){function a(a){return 255>=a?b.charAt(a):1424<=a&&1524>=a?"R":1536<=a&&1791>=a?c.charAt(a-1536):1792<=a&&2220>=a?"r":"L"}var b="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",c="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",
185
+ d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/;return function(b){var c,j,k,m,p,o,r,n;if(!d.test(b))return!1;c=b.length;j=[];for(n=0;n<c;++n)j.push(p=a(b.charCodeAt(n)));n=0;for(k="L";n<c;++n)p=j[n],"m"==p?j[n]=k:k=p;n=0;for(k="L";n<c;++n)p=j[n],"1"==p&&"r"==k?j[n]="n":f.test(p)&&(k=p,"r"==p&&(j[n]="R"));n=1;for(k=j[0];n<c-1;++n)p=j[n],"+"==p&&"1"==k&&"1"==j[n+1]?j[n]="1":","==p&&k==j[n+1]&&("1"==k||"n"==k)&&(j[n]=k),k=p;for(n=0;n<c;++n)if(p=j[n],","==p)j[n]=
186
+ "N";else if("%"==p){for(o=n+1;o<c&&"%"==j[o];++o);m=n&&"!"==j[n-1]||o<c-1&&"1"==j[o]?"1":"N";for(k=n;k<o;++k)j[k]=m;n=o-1}n=0;for(k="L";n<c;++n)p=j[n],"L"==k&&"1"==p?j[n]="L":f.test(p)&&(k=p);for(n=0;n<c;++n)if(e.test(j[n])){for(o=n+1;o<c&&e.test(j[o]);++o);k="L"==(o<c-1?j[o]:"L");m="L"==(n?j[n-1]:"L")||k?"L":"R";for(k=n;k<o;++k)j[k]=m;n=o-1}p=[];for(n=0;n<c;)if(g.test(j[n])){k=n;for(++n;n<c&&g.test(j[n]);++n);p.push({from:k,to:n,level:0})}else{m=n;o=p.length;for(++n;n<c&&"L"!=j[n];++n);for(k=m;k<
187
+ n;)if(h.test(j[k])){m<k&&p.splice(o,0,{from:m,to:k,level:1});m=k;for(++k;k<n&&h.test(j[k]);++k);p.splice(o,0,{from:m,to:k,level:2});m=k}else++k;m<n&&p.splice(o,0,{from:m,to:n,level:1})}return 1==p[0].level&&(r=b.match(/^\s+/))&&(p[0].from=r[0].length,p.unshift({from:0,to:r[0].length,level:0})),1==F(p).level&&(r=b.match(/\s+$/))&&(F(p).to-=r[0].length,p.push({from:c-r[0].length,to:c,level:0})),p[0].level!=F(p).level&&p.push({from:c,to:c,level:p[0].level}),p}}(),m.version="3.1",m}();
@@ -0,0 +1,25 @@
1
+ CodeMirror.defineMode("xml",function(o,k){function i(a,b){function d(c){return b.tokenize=c,c(a,b)}var c=a.next(),g;if("<"==c){if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?d(r("atom","]]\>")):null:a.match("--")?d(r("comment","--\>")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),d(j(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=r("meta","?>"),"meta";c=a.eat("/");for(s="";g=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)s+=g;return s?(u=c?"closeTag":"openTag",b.tokenize=p,"tag"):"error"}return"&"==
2
+ c?(g=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),g?"atom":"error"):(a.eatWhile(/[^&<]/),null)}function p(a,b){var c=a.next();return">"==c||"/"==c&&a.eat(">")?(b.tokenize=i,u=">"==c?"endTag":"selfcloseTag","tag"):"="==c?(u="equals",null):/[\'\"]/.test(c)?(b.tokenize=w(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function w(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=p;break}return"string"}}
3
+ function r(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=i;break}c.next()}return a}}function j(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=j(a+1),c.tokenize(b,c);if(">"==d)if(1==a){c.tokenize=i;break}else return c.tokenize=j(a-1),c.tokenize(b,c)}return"meta"}}function l(){for(var a=arguments.length-1;0<=a;a--)h.cc.push(arguments[a])}function c(){return l.apply(null,arguments),!0}function m(){h.context&&(h.context=h.context.prev)}function t(b){return"openTag"==
4
+ b?(h.tagName=s,c(a,q(h.startOfLine))):"closeTag"==b?(b=!1,h.context?h.context.tagName!=s&&(v.implicitlyClosed.hasOwnProperty(h.context.tagName.toLowerCase())&&m(),b=!h.context||h.context.tagName!=s):b=!0,b&&(n="error"),c(g(b))):c()}function q(a){return function(b){var d=h.tagName;(h.tagName=null,"selfcloseTag"==b||"endTag"==b&&v.autoSelfClosers.hasOwnProperty(d.toLowerCase()))?d=(e(d.toLowerCase()),c()):("endTag"==b&&(e(d.toLowerCase()),b=v.doNotIndent.hasOwnProperty(d)||h.context&&h.context.noIndent,
5
+ h.context={prev:h.context,tagName:d,indent:h.indented,startOfLine:a,noIndent:b}),d=c());return d}}function g(a){return function(b){return(a&&(n="error"),"endTag"==b)?(m(),c()):(n="error",c(arguments.callee))}}function e(a){for(var b;h.context&&!(b=h.context.tagName.toLowerCase(),!v.contextGrabbers.hasOwnProperty(b)||!v.contextGrabbers[b].hasOwnProperty(a));)m()}function a(b){return"word"==b?(n="attribute",c(d,a)):"endTag"==b||"selfcloseTag"==b?l():(n="error",c(a))}function d(d){return"equals"==d?
6
+ c(b,a):(v.allowMissing?"word"==d&&(n="attribute"):n="error","endTag"==d||"selfcloseTag"==d?l():c())}function b(a){return"string"==a?c(f):"word"==a&&v.allowUnquoted?(n="string",c()):(n="error","endTag"==a||"selfCloseTag"==a?l():c())}function f(a){return"string"==a?c(f):l()}var x=o.indentUnit,v=k.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,
7
+ option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,
8
+ th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},y=k.alignCDATA,s,u,h,n;return{startState:function(){return{tokenize:i,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}},token:function(a,b){var c,d;if(a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;if(n=u=s=null,c=b.tokenize(a,b),b.type=u,(c||u)&&"comment"!=
9
+ c)for(h=b;!(d=b.cc.pop()||t,d(u||c)););return b.startOfLine=!1,n||c},indent:function(a,b,c){var d=a.context;if(a.tokenize!=p&&a.tokenize!=i||d&&d.noIndent)return c?c.match(/^(\s*)/)[0].length:0;if(y&&/<!\[CDATA\[/.test(b))return 0;for(d&&/^<\//.test(b)&&(d=d.prev);d&&!d.startOfLine;)d=d.prev;return d?d.indent+x:0},electricChars:"/",configuration:k.htmlMode?"html":"xml"}});CodeMirror.defineMIME("text/xml","xml");CodeMirror.defineMIME("application/xml","xml");
10
+ CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0});
11
+ CodeMirror.defineMode("css",function(o){function k(a){for(var d={},b=0;b<a.length;++b)d[a[b]]=!0;return d}function i(a,d){var b=a.next();if("@"==b)return a.eatWhile(/[\w\\\-]/),c=a.current(),"def";if("/"==b&&a.eat("*"))return d.tokenize=p,p(a,d);if("<"==b&&a.eat("!"))return d.tokenize=w,w(a,d);if("="==b)c="compare";else{if(("~"==b||"|"==b)&&a.eat("="))return c="compare",null;if('"'==b||"'"==b)return d.tokenize=r(b),d.tokenize(a,d);if("#"==b)return a.eatWhile(/[\w\\\-]/),c="hash","atom";if("!"==b)return a.match(/^\s*\w*/),
12
+ c="important","keyword";if(/\d/.test(b))return a.eatWhile(/[\w.%]/),c="unit","number";if("-"===b){if(/\d/.test(a.peek()))return a.eatWhile(/[\w.%]/),c="unit","number";if(a.match(/^[^-]+-/))return c="meta","meta"}else return/[,+>*\/]/.test(b)?(c="select-op",null):"."==b&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?(c="qualifier","qualifier"):":"==b?(c=b,"operator"):/[;{}\[\]\(\)]/.test(b)?(c=b,null):"u"==b&&a.match("rl(")?(a.backUp(1),d.tokenize=j,c="variable","property"):(a.eatWhile(/[\w\\\-]/),c="variable",
13
+ "property")}}function p(a,d){for(var b=!1,g;null!=(g=a.next());){if(b&&"/"==g){d.tokenize=i;break}b="*"==g}return c="comment","comment"}function w(a,d){for(var b=0,g;null!=(g=a.next());){if(2<=b&&">"==g){d.tokenize=i;break}b="-"==g?b+1:0}return c="comment","comment"}function r(a,d){return function(b,g){for(var e=!1,j;null!=(j=b.next())&&(j!=a||e);)e=!e&&"\\"==j;return e||(d&&b.backUp(1),g.tokenize=i),c="string","string"}}function j(a,d){return a.next(),d.tokenize=a.match(/\s*[\"\']/,!1)?i:r(")",!0),
14
+ c="(",null}var l=o.indentUnit,c,m=k("all aural braille handheld print projection screen tty tv embossed".split(" ")),t=k("width min-width max-width height min-height max-height device-width min-device-width max-device-width device-height min-device-height max-device-height aspect-ratio min-aspect-ratio max-aspect-ratio device-aspect-ratio min-device-aspect-ratio max-device-aspect-ratio color min-color max-color color-index min-color-index max-color-index monochrome min-monochrome max-monochrome resolution min-resolution max-resolution scan grid".split(" ")),
15
+ q=k("align-content align-items align-self alignment-adjust alignment-baseline anchor-point animation animation-delay animation-direction animation-duration animation-iteration-count animation-name animation-play-state animation-timing-function appearance azimuth backface-visibility background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size baseline-shift binding bleed bookmark-label bookmark-level bookmark-state bookmark-target border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side clear clip color color-profile column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset crop cue cue-after cue-before cursor direction display dominant-baseline drop-initial-after-adjust drop-initial-after-align drop-initial-before-adjust drop-initial-before-align drop-initial-size drop-initial-value elevation empty-cells fit fit-position flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float float-offset font font-feature-settings font-family font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid-cell grid-column grid-column-align grid-column-sizing grid-column-span grid-columns grid-flow grid-row grid-row-align grid-row-sizing grid-row-span grid-rows grid-template hanging-punctuation height hyphens icon image-orientation image-rendering image-resolution inline-box-align justify-content left letter-spacing line-break line-height line-stacking line-stacking-ruby line-stacking-shift line-stacking-strategy list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top marker-offset marks marquee-direction marquee-loop marquee-play-count marquee-speed marquee-style max-height max-width min-height min-width move-to nav-down nav-index nav-left nav-right nav-up opacity order orphans outline outline-color outline-offset outline-style outline-width overflow overflow-style overflow-wrap overflow-x overflow-y padding padding-bottom padding-left padding-right padding-top page page-break-after page-break-before page-break-inside page-policy pause pause-after pause-before perspective perspective-origin pitch pitch-range play-during position presentation-level punctuation-trim quotes rendering-intent resize rest rest-after rest-before richness right rotation rotation-point ruby-align ruby-overhang ruby-position ruby-span size speak speak-as speak-header speak-numeral speak-punctuation speech-rate stress string-set tab-size table-layout target target-name target-new target-position text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-skip text-decoration-style text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-height text-indent text-justify text-outline text-shadow text-space-collapse text-transform text-underline-position text-wrap top transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-range voice-rate voice-stress voice-volume volume white-space widows width word-break word-spacing word-wrap z-index".split(" ")),
16
+ g=k("black silver gray white maroon red purple fuchsia green lime olive yellow navy blue teal aqua".split(" ")),e=k("above absolute activeborder activecaption afar after-white-space ahead alias all all-scroll alternate always amharic amharic-abegede antialiased appworkspace arabic-indic armenian asterisks auto avoid background backwards baseline below bidi-override binary bengali blink block block-axis bold bolder border border-box both bottom break-all break-word button button-bevel buttonface buttonhighlight buttonshadow buttontext cambodian capitalize caps-lock-indicator caption captiontext caret cell center checkbox circle cjk-earthly-branch cjk-heavenly-stem cjk-ideographic clear clip close-quote col-resize collapse compact condensed contain content content-box context-menu continuous copy cover crop cross crosshair currentcolor cursive dashed decimal decimal-leading-zero default default-button destination-atop destination-in destination-out destination-over devanagari disc discard document dot-dash dot-dot-dash dotted double down e-resize ease ease-in ease-in-out ease-out element ellipsis embed end ethiopic ethiopic-abegede ethiopic-abegede-am-et ethiopic-abegede-gez ethiopic-abegede-ti-er ethiopic-abegede-ti-et ethiopic-halehame-aa-er ethiopic-halehame-aa-et ethiopic-halehame-am-et ethiopic-halehame-gez ethiopic-halehame-om-et ethiopic-halehame-sid-et ethiopic-halehame-so-et ethiopic-halehame-ti-er ethiopic-halehame-ti-et ethiopic-halehame-tig ew-resize expanded extra-condensed extra-expanded fantasy fast fill fixed flat footnotes forwards from geometricPrecision georgian graytext groove gujarati gurmukhi hand hangul hangul-consonant hebrew help hidden hide higher highlight highlighttext hiragana hiragana-iroha horizontal hsl hsla icon ignore inactiveborder inactivecaption inactivecaptiontext infinite infobackground infotext inherit initial inline inline-axis inline-block inline-table inset inside intrinsic invert italic justify kannada katakana katakana-iroha khmer landscape lao large larger left level lighter line-through linear lines list-item listbox listitem local logical loud lower lower-alpha lower-armenian lower-greek lower-hexadecimal lower-latin lower-norwegian lower-roman lowercase ltr malayalam match media-controls-background media-current-time-display media-fullscreen-button media-mute-button media-play-button media-return-to-realtime-button media-rewind-button media-seek-back-button media-seek-forward-button media-slider media-sliderthumb media-time-remaining-display media-volume-slider media-volume-slider-container media-volume-sliderthumb medium menu menulist menulist-button menulist-text menulist-textfield menutext message-box middle min-intrinsic mix mongolian monospace move multiple myanmar n-resize narrower navy ne-resize nesw-resize no-close-quote no-drop no-open-quote no-repeat none normal not-allowed nowrap ns-resize nw-resize nwse-resize oblique octal open-quote optimizeLegibility optimizeSpeed oriya oromo outset outside overlay overline padding padding-box painted paused persian plus-darker plus-lighter pointer portrait pre pre-line pre-wrap preserve-3d progress push-button radio read-only read-write read-write-plaintext-only relative repeat repeat-x repeat-y reset reverse rgb rgba ridge right round row-resize rtl run-in running s-resize sans-serif scroll scrollbar se-resize searchfield searchfield-cancel-button searchfield-decoration searchfield-results-button searchfield-results-decoration semi-condensed semi-expanded separate serif show sidama single skip-white-space slide slider-horizontal slider-vertical sliderthumb-horizontal sliderthumb-vertical slow small small-caps small-caption smaller solid somali source-atop source-in source-out source-over space square square-button start static status-bar stretch stroke sub subpixel-antialiased super sw-resize table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group telugu text text-bottom text-top textarea textfield thai thick thin threeddarkshadow threedface threedhighlight threedlightshadow threedshadow tibetan tigre tigrinya-er tigrinya-er-abegede tigrinya-et tigrinya-et-abegede to top transparent ultra-condensed ultra-expanded underline up upper-alpha upper-armenian upper-greek upper-hexadecimal upper-latin upper-norwegian upper-roman uppercase urdu url vertical vertical-text visible visibleFill visiblePainted visibleStroke visual w-resize wait wave white wider window windowframe windowtext x-large x-small xor xx-large xx-small yellow".split(" "));
17
+ return{startState:function(a){return{tokenize:i,baseIndent:a||0,stack:[]}},token:function(a,d){if(d.tokenize==i&&a.eatSpace())return null;var b=d.tokenize(a,d),f=d.stack[d.stack.length-1];return"property"==b?"propertyValue"==f?b=e[a.current()]?"string-2":g[a.current()]?"keyword":"variable-2":"rule"==f?q[a.current()]||(b+=" error"):f&&"@media{"!=f?"@media"==f?b=m[a.current()]?"attribute":/^(only|not)$/i.test(a.current())?"keyword":"and"==a.current().toLowerCase()?"error":t[a.current()]?"error":"attribute error":
18
+ "@mediaType"==f?b=m[a.current()]?"attribute":"and"==a.current().toLowerCase()?"operator":/^(only|not)$/i.test(a.current())?"error":(a.current(),"error"):"@mediaType("==f?q[a.current()]||(m[a.current()]?b="error":"and"==a.current().toLowerCase()?b="operator":/^(only|not)$/i.test(a.current())?b="error":b+=" error"):b="error":b="tag":"atom"==b?f&&"@media{"!=f?"propertyValue"==f?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current())||(b+=" error"):b="error":b="builtin":"@media"==f&&"{"==c&&(b="error"),
19
+ "{"==c?"@media"==f||"@mediaType"==f?(d.stack.pop(),d.stack[d.stack.length-1]="@media{"):d.stack.push("rule"):"}"==c?(d.stack.pop(),"propertyValue"==f&&d.stack.pop()):"@media"==c?d.stack.push("@media"):"@media"==f&&/\b(keyword|attribute)\b/.test(b)?d.stack.push("@mediaType"):"@mediaType"==f&&","==a.current()?d.stack.pop():"@mediaType"==f&&"("==c?d.stack.push("@mediaType("):"@mediaType("==f&&")"==c?d.stack.pop():"rule"==f&&":"==c?d.stack.push("propertyValue"):"propertyValue"==f&&";"==c&&d.stack.pop(),
20
+ b},indent:function(a,d){var b=a.stack.length;return/^\}/.test(d)&&(b-="propertyValue"==a.stack[a.stack.length-1]?2:1),a.baseIndent+b*l},electricChars:"}"}});CodeMirror.defineMIME("text/css","css");
21
+ CodeMirror.defineMode("htmlmixed",function(o,k){function i(g,e){var a=e.htmlState.tagName,d=j.token(g,e.htmlState),b,f;if("script"==a&&/\btag\b/.test(d)&&">"==g.current()){(a=(a=g.string.slice(Math.max(0,g.pos-100),g.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i))?a[1]:"")&&/[\"\']/.test(a.charAt(0))&&(a=a.slice(1,a.length-1));for(b=0;b<c.length;++b)if(f=c[b],"string"==typeof f.matches?a==f.matches:f.matches.test(a)){f.mode&&(e.token=w,e.localMode=f.mode,e.localState=f.mode.startState&&f.mode.startState(j.indent(e.htmlState,
22
+ "")));break}}else"style"==a&&/\btag\b/.test(d)&&">"==g.current()&&(e.token=r,e.localMode=l,e.localState=l.startState(j.indent(e.htmlState,"")));return d}function p(c,e,a){var d=c.current(),b=d.search(e);return-1<b?c.backUp(d.length-b):d.match(/<\/?$/)&&(c.backUp(d.length),c.match(e,!1)||c.match(d[0])),a}function w(c,e){return c.match(/^<\/\s*script\s*>/i,!1)?(e.token=i,e.localState=e.localMode=null,i(c,e)):p(c,/<\/\s*script\s*>/,e.localMode.token(c,e.localState))}function r(c,e){return c.match(/^<\/\s*style\s*>/i,
23
+ !1)?(e.token=i,e.localState=e.localMode=null,i(c,e)):p(c,/<\/\s*style\s*>/,l.token(c,e.localState))}var j=CodeMirror.getMode(o,{name:"xml",htmlMode:!0}),l=CodeMirror.getMode(o,"css"),c=[],m=k&&k.scriptTypes,t,q;if(c.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(o,"javascript")}),m)for(t=0;t<m.length;++t)q=m[t],c.push({matches:q.matches,mode:q.mode&&CodeMirror.getMode(o,q.mode)});return c.push({matches:/./,mode:CodeMirror.getMode(o,"text/plain")}),{startState:function(){var c=
24
+ j.startState();return{token:i,localMode:null,localState:null,htmlState:c}},copyState:function(c){if(c.localState)var e=CodeMirror.copyState(c.localMode,c.localState);return{token:c.token,localMode:c.localMode,localState:e,htmlState:CodeMirror.copyState(j,c.htmlState)}},token:function(c,e){return e.token(c,e)},indent:function(c,e){return!c.localMode||/^\s*<\//.test(e)?j.indent(c.htmlState,e):c.localMode.indent?c.localMode.indent(c.localState,e):CodeMirror.Pass},electricChars:"/{}:",innerMode:function(c){return{state:c.localState||
25
+ c.htmlState,mode:c.localMode||j}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");
@@ -0,0 +1,13 @@
1
+ (function(){function l(g,d,a){var c;return c=g.getWrapperElement().appendChild(document.createElement("div")),c.className=a?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top",c.innerHTML=d,c}CodeMirror.defineExtension("openDialog",function(g,d,a){function c(){k||(k=!0,f.parentNode.removeChild(f))}var f=l(this,g,a&&a.bottom),k=!1,i=this,e=f.getElementsByTagName("input")[0];if(e)CodeMirror.on(e,"keydown",function(a){(13==a.keyCode||27==a.keyCode)&&(CodeMirror.e_stop(a),
2
+ c(),i.focus(),13==a.keyCode&&d(e.value))}),a&&a.value&&(e.value=a.value),e.focus(),CodeMirror.on(e,"blur",c);else if(g=f.getElementsByTagName("button")[0])CodeMirror.on(g,"click",function(){c();i.focus()}),g.focus(),CodeMirror.on(g,"blur",c);return c});CodeMirror.defineExtension("openConfirm",function(g,d,a){function c(){k||(k=!0,f.parentNode.removeChild(f),i.focus())}var f=l(this,g,a&&a.bottom),g=f.getElementsByTagName("button"),k=!1,i=this,e=1,j;g[0].focus();for(a=0;a<g.length;++a)j=g[a],function(a){CodeMirror.on(j,
3
+ "click",function(d){CodeMirror.e_preventDefault(d);c();a&&a(i)})}(d[a]),CodeMirror.on(j,"blur",function(){--e;setTimeout(function(){0>=e&&c()},200)}),CodeMirror.on(j,"focus",function(){++e})})})();
4
+ (function(){function l(h){return"string"==typeof h?{token:function(a){if(a.match(h))return"searching";a.next();a.skipTo(h.charAt(0))||a.skipToEnd()}}:{token:function(a){if(a.match(h))return"searching";for(;!a.eol()&&!(a.next(),a.match(h,!1)););}}}function g(){this.overlay=this.posFrom=this.posTo=this.query=null}function d(h,a,d){return h.getSearchCursor(a,d,"string"==typeof a&&a==a.toLowerCase())}function a(a,d,e,g){a.openDialog?a.openDialog(d,g):g(prompt(e,""))}function c(a,d,e,g){a.openConfirm?
5
+ a.openConfirm(d,g):confirm(e)&&g[0]()}function f(a){var d=a.match(/^\/(.*)\/([a-z]*)$/);return d?RegExp(d[1],-1==d[2].indexOf("i")?"":"i"):a}function k(h,d){var e=h._searchState||(h._searchState=new g);if(e.query)return i(h,d);a(h,q,"Search for:",function(a){h.operation(function(){a&&!e.query&&(e.query=f(a),h.removeOverlay(e.overlay),e.overlay=l(a),h.addOverlay(e.overlay),e.posFrom=e.posTo=h.getCursor(),i(h,d))})})}function i(a,e){a.operation(function(){var b=a._searchState||(a._searchState=new g),
6
+ c=d(a,b.query,e?b.posFrom:b.posTo);(c.find(e)||(c=d(a,b.query,e?CodeMirror.Pos(a.lastLine()):CodeMirror.Pos(a.firstLine(),0)),c.find(e)))&&(a.setSelection(c.from(),c.to()),b.posFrom=c.from(),b.posTo=c.to())})}function e(a){a.operation(function(){var e=a._searchState||(a._searchState=new g);e.query&&(e.query=null,a.removeOverlay(e.overlay))})}function j(h,g){a(h,r,"Replace:",function(j){j&&(j=f(j),a(h,b,"Replace with:",function(a){if(g)h.operation(function(){for(var e,b=d(h,j);b.findNext();)"string"!=
7
+ typeof j?(e=h.getRange(b.from(),b.to()).match(j),b.replace(a.replace(/\$(\d)/,function(a,b){return e[b]}))):b.replace(a)});else{e(h);var b=d(h,j,h.getCursor()),f=function(){var a=b.from(),e;((e=b.findNext())||(b=d(h,j),(e=b.findNext())&&(!a||b.from().line!=a.line||b.from().ch!=a.ch)))&&(h.setSelection(b.from(),b.to()),c(h,m,"Replace?",[function(){i(e)},f]))},i=function(e){b.replace("string"==typeof j?a:a.replace(/\$(\d)/,function(a,b){return e[b]}));f()};f()}}))})}var q='Search: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>',
8
+ r='Replace: <input type="text" style="width: 10em"/> <span style="color: #888">(Use /re/ syntax for regexp search)</span>',b='With: <input type="text" style="width: 10em"/>',m="Replace? <button>Yes</button> <button>No</button> <button>Stop</button>";CodeMirror.commands.find=function(a){e(a);k(a)};CodeMirror.commands.findNext=k;CodeMirror.commands.findPrev=function(a){k(a,!0)};CodeMirror.commands.clearSearch=e;CodeMirror.commands.replace=j;CodeMirror.commands.replaceAll=function(a){j(a,!0)}})();
9
+ (function(){function l(d,a,c,f){if(this.atOccurrence=!1,this.cm=d,null==f&&"string"==typeof a&&(f=!1),c=c?d.clipPos(c):g(0,0),this.pos={from:c,to:c},"string"!=typeof a)a.global||(a=RegExp(a.source,a.ignoreCase?"ig":"g")),this.matches=function(e,j){var c;if(e){a.lastIndex=0;for(var f=d.getLine(j.line).slice(0,j.ch),b=a.exec(f),i=0;b;)if(i+=b.index+1,f=f.slice(i),a.lastIndex=0,c=a.exec(f),c)b=c;else break;i--}else a.lastIndex=j.ch,f=d.getLine(j.line),i=(b=a.exec(f))&&b.index;if(b&&b[0])return{from:g(j.line,
10
+ i),to:g(j.line,i+b[0].length),match:b}};else{f&&(a=a.toLowerCase());var k=f?function(a){return a.toLowerCase()}:function(a){return a},i=a.split("\n");this.matches=1==i.length?a.length?function(e,c){var f=k(d.getLine(c.line)),i=a.length,b;if(e?c.ch>=i&&-1!=(b=f.lastIndexOf(a,c.ch-i)):-1!=(b=f.indexOf(a,c.ch)))return{from:g(c.line,b),to:g(c.line,b+i)}}:function(){}:function(a,c){var f=c.line,l=a?i.length-1:0,b=i[l],m=k(d.getLine(f)),h=a?m.indexOf(b)+b.length:m.lastIndexOf(b),n,o,p;if(!(a?h>=c.ch||h!=
11
+ b.length:h<=c.ch||h!=m.length-b.length))for(;!(a?!f:f==d.lineCount()-1);)if(m=k(d.getLine(f+=a?-1:1)),b=i[a?--l:++l],0<l&&l<i.length-1){if(m!=b)break}else return(n=a?m.lastIndexOf(b):m.indexOf(b)+b.length,a?n!=m.length-b.length:n!=b.length)?void 0:(o=g(c.line,h),p=g(f,n),{from:a?p:o,to:a?o:p})}}}var g=CodeMirror.Pos;l.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(d){function a(a){a=g(a,0);return c.pos={from:a,to:a},c.atOccurrence=
12
+ !1,!1}for(var c=this,f=this.cm.clipPos(d?this.pos.from:this.pos.to),k;;){if(this.pos=this.matches(d,f))return this.pos.from&&this.pos.to||console.log(this.matches,this.pos),this.atOccurrence=!0,this.pos.match||!0;if(d){if(!f.line)return a(0);f=g(f.line-1,this.cm.getLine(f.line-1).length)}else{if(k=this.cm.lineCount(),f.line==k-1)return a(k);f=g(f.line+1,0)}}},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(d){this.atOccurrence&&
13
+ (d=CodeMirror.splitLines(d),this.cm.replaceRange(d,this.pos.from,this.pos.to),this.pos.to=g(this.pos.from.line+d.length-1,d[d.length-1].length+(1==d.length?this.pos.from.ch:0)))}};CodeMirror.defineExtension("getSearchCursor",function(d,a,c){return new l(this,d,a,c)})})();
@@ -0,0 +1,5 @@
1
+ CodeMirror.defineMode("htmlmixed",function(g,o){function h(a,b){var c=b.htmlState.tagName,e=d.token(a,b.htmlState);if("script"==c&&/\btag\b/.test(e)&&">"==a.current()){(c=(c=a.string.slice(Math.max(0,a.pos-100),a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i))?c[1]:"")&&/[\"\']/.test(c.charAt(0))&&(c=c.slice(1,c.length-1));for(var j=0;j<i.length;++j){var f=i[j];if("string"==typeof f.matches?c==f.matches:f.matches.test(c)){f.mode&&(b.token=q,b.localMode=f.mode,b.localState=f.mode.startState&&
2
+ f.mode.startState(d.indent(b.htmlState,"")));break}}}else"style"==c&&(/\btag\b/.test(e)&&">"==a.current())&&(b.token=r,b.localMode=k,b.localState=k.startState(d.indent(b.htmlState,"")));return e}function p(a,b,c){var e=a.current(),d=e.search(b);-1<d?a.backUp(e.length-d):e.match(/<\/?$/)&&(a.backUp(e.length),a.match(b,!1)||a.match(e[0]));return c}function q(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=h,b.localState=b.localMode=null,h(a,b)):p(a,/<\/\s*script\s*>/,b.localMode.token(a,b.localState))}
3
+ function r(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=h,b.localState=b.localMode=null,h(a,b)):p(a,/<\/\s*style\s*>/,k.token(a,b.localState))}var d=CodeMirror.getMode(g,{name:"xml",htmlMode:!0}),k=CodeMirror.getMode(g,"css"),i=[],l=o&&o.scriptTypes;i.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(g,"javascript")});if(l)for(var m=0;m<l.length;++m){var n=l[m];i.push({matches:n.matches,mode:n.mode&&CodeMirror.getMode(g,n.mode)})}i.push({matches:/./,
4
+ mode:CodeMirror.getMode(g,"text/plain")});return{startState:function(){var a=d.startState();return{token:h,localMode:null,localState:null,htmlState:a}},copyState:function(a){if(a.localState)var b=CodeMirror.copyState(a.localMode,a.localState);return{token:a.token,localMode:a.localMode,localState:b,htmlState:CodeMirror.copyState(d,a.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return!a.localMode||/^\s*<\//.test(b)?d.indent(a.htmlState,b):a.localMode.indent?a.localMode.indent(a.localState,
5
+ b):CodeMirror.Pass},electricChars:"/{}:",innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||d}}}},"xml","javascript","css");CodeMirror.defineMIME("text/html","htmlmixed");
@@ -2,13 +2,13 @@
2
2
  if("/"==c){if(a.eat("*"))return c=G,d.tokenize=c,c(a,d);if(a.eat("/"))return a.skipToEnd(),k("comment","comment");if("operator"==d.lastType||"keyword c"==d.lastType||/^[\[{}\(,;:]$/.test(d.lastType))return E(a,"/"),a.eatWhile(/[gimy]/),k("regexp","string-2");a.eatWhile(x);return k("operator",null,a.current())}if("#"==c)return a.skipToEnd(),k("error","error");if(x.test(c))return a.eatWhile(x),k("operator",null,a.current());a.eatWhile(/[\w\$_]/);var c=a.current(),f=H.propertyIsEnumerable(c)&&H[c];return f&&
3
3
  "."!=d.lastType?k(f.type,f.style,c):k("variable","variable",c)}function S(a){return function(d,c){E(d,a)||(c.tokenize=s);return k("string","string")}}function G(a,d){for(var c=!1,f;f=a.next();){if("/"==f&&c){d.tokenize=s;break}c="*"==f}return k("comment","comment")}function I(a,d,c,f,b,e){this.indented=a;this.column=d;this.type=c;this.prev=b;this.info=e;null!=f&&(this.align=f)}function l(){for(var a=arguments.length-1;0<=a;a--)v.push(arguments[a])}function b(){l.apply(null,arguments);return!0}function y(a){function d(c){for(;c;c=
4
4
  c.next)if(c.name==a)return!0;return!1}var c=j;c.context?(n="def",d(c.localVars)||(c.localVars={name:a,next:c.localVars})):d(c.globalVars)||(c.globalVars={name:a,next:c.globalVars})}function J(){j.context={prev:j.context,vars:j.localVars};j.localVars=T}function K(){j.localVars=j.context.vars;j.context=j.context.prev}function i(a,d){var c=function(){var c=j;c.lexical=new I(c.indented,w.column(),a,null,c.lexical,d)};c.lex=!0;return c}function e(){var a=j;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=
5
- a.lexical.indented),a.lexical=a.lexical.prev)}function g(a){return function(d){return d==a?b():";"==a?l():b(arguments.callee)}}function o(a){return"var"==a?b(i("vardef"),z,g(";"),e):"keyword a"==a?b(i("form"),h,o,e):"keyword b"==a?b(i("form"),o,e):"{"==a?b(i("}"),A,e):";"==a?b():"function"==a?b(B):"for"==a?b(i("form"),g("("),i(")"),U,g(")"),e,o,e):"variable"==a?b(i("stat"),V):"switch"==a?b(i("form"),h,i("}","switch"),g("{"),A,e,e):"case"==a?b(h,g(":")):"default"==a?b(g(":")):"catch"==a?b(i("form"),
6
- J,g("("),L,g(")"),o,e,K):l(i("stat"),h,g(";"),e)}function h(a){return M.hasOwnProperty(a)?b(m):"function"==a?b(B):"keyword c"==a?b(N):"("==a?b(i(")"),N,g(")"),e,m):"operator"==a?b(h):"["==a?b(i("]"),t(h,"]"),e,m):"{"==a?b(i("}"),t(W,"}"),e,m):b()}function N(a){return a.match(/[;\}\)\],]/)?l():l(h)}function m(a,d){if("operator"==a&&/\+\+|--/.test(d))return b(m);if("operator"==a&&"?"==d)return b(h,g(":"),h);if(";"!=a){if("("==a)return b(i(")"),t(h,")"),e,m);if("."==a)return b(X,m);if("["==a)return b(i("]"),
7
- h,g("]"),e,m)}}function V(a){return":"==a?b(e,o):l(m,g(";"),e)}function X(a){if("variable"==a)return n="property",b()}function W(a){"variable"==a&&(n="property");if(M.hasOwnProperty(a))return b(g(":"),h)}function t(a,d){function c(f){return","==f?b(a,c):f==d?b():b(g(d))}return function(f){return f==d?b():l(a,c)}}function A(a){return"}"==a?b():l(o,A)}function O(a){return":"==a?b(Y):l()}function Y(a){return"variable"==a?(n="variable-3",b()):l()}function z(a,d){return"variable"==a?(y(d),C?b(O,D):b(D)):
8
- l()}function D(a,d){if("="==d)return b(h,D);if(","==a)return b(z)}function U(a){return"var"==a?b(z,g(";"),u):";"==a?b(u):"variable"==a?b(Z):b(u)}function Z(a,d){return"in"==d?b(h):b(m,u)}function u(a,d){return";"==a?b(P):"in"==d?b(h):b(h,g(";"),P)}function P(a){")"!=a&&b(h)}function B(a,d){if("variable"==a)return y(d),b(B);if("("==a)return b(i(")"),J,t(L,")"),e,o,K)}function L(a,d){if("variable"==a)return y(d),C?b(O):b()}var q=R.indentUnit,Q=p.json,C=p.typescript,H=function(){function a(a){return{type:a,
9
- style:"keyword"}}var d=a("keyword a"),c=a("keyword b"),b=a("keyword c"),e=a("operator"),h={type:"atom",style:"atom"},d={"if":d,"while":d,"with":d,"else":c,"do":c,"try":c,"finally":c,"return":b,"break":b,"continue":b,"new":b,"delete":b,"throw":b,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":h,"false":h,"null":h,undefined:h,NaN:h,Infinity:h};
5
+ a.lexical.indented),a.lexical=a.lexical.prev)}function h(a){return function(d){return d==a?b():";"==a?l():b(arguments.callee)}}function o(a){return"var"==a?b(i("vardef"),z,h(";"),e):"keyword a"==a?b(i("form"),g,o,e):"keyword b"==a?b(i("form"),o,e):"{"==a?b(i("}"),A,e):";"==a?b():"function"==a?b(B):"for"==a?b(i("form"),h("("),i(")"),U,h(")"),e,o,e):"variable"==a?b(i("stat"),V):"switch"==a?b(i("form"),g,i("}","switch"),h("{"),A,e,e):"case"==a?b(g,h(":")):"default"==a?b(h(":")):"catch"==a?b(i("form"),
6
+ J,h("("),L,h(")"),o,e,K):l(i("stat"),g,h(";"),e)}function g(a){return M.hasOwnProperty(a)?b(m):"function"==a?b(B):"keyword c"==a?b(N):"("==a?b(i(")"),N,h(")"),e,m):"operator"==a?b(g):"["==a?b(i("]"),t(g,"]"),e,m):"{"==a?b(i("}"),t(W,"}"),e,m):b()}function N(a){return a.match(/[;\}\)\],]/)?l():l(g)}function m(a,d){if("operator"==a)return/\+\+|--/.test(d)?b(m):"?"==d?b(g,h(":"),g):b(g);if(";"!=a){if("("==a)return b(i(")"),t(g,")"),e,m);if("."==a)return b(X,m);if("["==a)return b(i("]"),g,h("]"),e,m)}}
7
+ function V(a){return":"==a?b(e,o):l(m,h(";"),e)}function X(a){if("variable"==a)return n="property",b()}function W(a){if("variable"==a)n="property";else if("number"==a||"string"==a)n=a+" property";if(M.hasOwnProperty(a))return b(h(":"),g)}function t(a,d){function c(f){return","==f?b(a,c):f==d?b():b(h(d))}return function(f){return f==d?b():l(a,c)}}function A(a){return"}"==a?b():l(o,A)}function O(a){return":"==a?b(Y):l()}function Y(a){return"variable"==a?(n="variable-3",b()):l()}function z(a,d){return"variable"==
8
+ a?(y(d),C?b(O,D):b(D)):l()}function D(a,d){if("="==d)return b(g,D);if(","==a)return b(z)}function U(a){return"var"==a?b(z,h(";"),u):";"==a?b(u):"variable"==a?b(Z):b(u)}function Z(a,d){return"in"==d?b(g):b(m,u)}function u(a,d){return";"==a?b(P):"in"==d?b(g):b(g,h(";"),P)}function P(a){")"!=a&&b(g)}function B(a,d){if("variable"==a)return y(d),b(B);if("("==a)return b(i(")"),J,t(L,")"),e,o,K)}function L(a,d){if("variable"==a)return y(d),C?b(O):b()}var q=R.indentUnit,Q=p.json,C=p.typescript,H=function(){function a(a){return{type:a,
9
+ style:"keyword"}}var d=a("keyword a"),c=a("keyword b"),b=a("keyword c"),e=a("operator"),g={type:"atom",style:"atom"},d={"if":d,"while":d,"with":d,"else":c,"do":c,"try":c,"finally":c,"return":b,"break":b,"continue":b,"new":b,"delete":b,"throw":b,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":g,"false":g,"null":g,undefined:g,NaN:g,Infinity:g};
10
10
  if(C){var c={type:"variable",style:"variable-3"},c={"interface":a("interface"),"class":a("class"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),"super":a("super"),string:c,number:c,bool:c,any:c},i;for(i in c)d[i]=c[i]}return d}(),x=/[+\-*&%=<>!?|]/,r,F,M={atom:!0,number:!0,variable:!0,string:!0,regexp:!0};v=n=j=null;w=void 0;var T={name:"this",next:{name:"arguments"}};e.lex=!0;return{startState:function(a){return{tokenize:s,
11
- lastType:null,cc:[],lexical:new I((a||0)-q,0,"block",!1),localVars:p.localVars,globalVars:p.globalVars,context:p.localVars&&{vars:p.localVars},indented:0}},token:function(a,d){a.sol()&&(d.lexical.hasOwnProperty("align")||(d.lexical.align=!1),d.indented=a.indentation());if(a.eatSpace())return null;var c=d.tokenize(a,d);if("comment"==r)return c;d.lastType=r;var b;a:{var e=r,i=F,g=d.cc;j=d;w=a;n=null;v=g;d.lexical.hasOwnProperty("align")||(d.lexical.align=!0);for(;;)if((g.length?g.pop():Q?h:o)(e,i)){for(;g.length&&
12
- g[g.length-1].lex;)g.pop()();if(n){b=n;break a}if(b="variable"==e)b:{for(b=d.localVars;b;b=b.next)if(b.name==i){b=!0;break b}b=void 0}if(b){b="variable-2";break a}b=c;break a}}return b},indent:function(a,b){if(a.tokenize==G)return CodeMirror.Pass;if(a.tokenize!=s)return 0;var c=b&&b.charAt(0),f=a.lexical;"stat"==f.type&&"}"==c&&(f=f.prev);var e=f.type,g=c==e;return"vardef"==e?f.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==e&&"{"==c?f.indented:"form"==e?f.indented+q:"stat"==e?f.indented+
11
+ lastType:null,cc:[],lexical:new I((a||0)-q,0,"block",!1),localVars:p.localVars,globalVars:p.globalVars,context:p.localVars&&{vars:p.localVars},indented:0}},token:function(a,d){a.sol()&&(d.lexical.hasOwnProperty("align")||(d.lexical.align=!1),d.indented=a.indentation());if(a.eatSpace())return null;var c=d.tokenize(a,d);if("comment"==r)return c;d.lastType=r;var b;a:{var e=r,i=F,h=d.cc;j=d;w=a;n=null;v=h;d.lexical.hasOwnProperty("align")||(d.lexical.align=!0);for(;;)if((h.length?h.pop():Q?g:o)(e,i)){for(;h.length&&
12
+ h[h.length-1].lex;)h.pop()();if(n){b=n;break a}if(b="variable"==e)b:{for(b=d.localVars;b;b=b.next)if(b.name==i){b=!0;break b}b=void 0}if(b){b="variable-2";break a}b=c;break a}}return b},indent:function(a,b){if(a.tokenize==G)return CodeMirror.Pass;if(a.tokenize!=s)return 0;var c=b&&b.charAt(0),f=a.lexical;"stat"==f.type&&"}"==c&&(f=f.prev);var e=f.type,g=c==e;return"vardef"==e?f.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==e&&"{"==c?f.indented:"form"==e?f.indented+q:"stat"==e?f.indented+
13
13
  ("operator"==a.lastType||","==a.lastType?q:0):"switch"==f.info&&!g?f.indented+(/^(?:case|default)\b/.test(b)?q:2*q):f.align?f.column+(g?0:1):f.indented+(g?0:q)},electricChars:":{}",jsonMode:Q}});CodeMirror.defineMIME("text/javascript","javascript");CodeMirror.defineMIME("text/ecmascript","javascript");CodeMirror.defineMIME("application/javascript","javascript");CodeMirror.defineMIME("application/ecmascript","javascript");CodeMirror.defineMIME("application/json",{name:"javascript",json:!0});
14
14
  CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0});CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0});
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'af', {
6
+ label: 'Styl',
7
+ panelTitle: 'Opmaak style',
8
+ panelTitle1: 'Blok style',
9
+ panelTitle2: 'Inlyn style',
10
+ panelTitle3: 'Objek style'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'ar', {
6
+ label: 'أنماط',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'أنماط الفقرة',
9
+ panelTitle2: 'أنماط مضمنة',
10
+ panelTitle3: 'أنماط الكائن'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'bg', {
6
+ label: 'Стилове',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'Block Styles', // MISSING
9
+ panelTitle2: 'Inline Styles', // MISSING
10
+ panelTitle3: 'Object Styles' // MISSING
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'bn', {
6
+ label: 'স্টাইল',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'Block Styles', // MISSING
9
+ panelTitle2: 'Inline Styles', // MISSING
10
+ panelTitle3: 'Object Styles' // MISSING
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'bs', {
6
+ label: 'Stil',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'Block Styles', // MISSING
9
+ panelTitle2: 'Inline Styles', // MISSING
10
+ panelTitle3: 'Object Styles' // MISSING
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'ca', {
6
+ label: 'Estil',
7
+ panelTitle: 'Estils de format',
8
+ panelTitle1: 'Estils de bloc',
9
+ panelTitle2: 'Estils incrustats',
10
+ panelTitle3: 'Estils d\'objecte'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'cs', {
6
+ label: 'Styl',
7
+ panelTitle: 'Formátovací styly',
8
+ panelTitle1: 'Blokové styly',
9
+ panelTitle2: 'Řádkové styly',
10
+ panelTitle3: 'Objektové styly'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'cy', {
6
+ label: 'Arddulliau',
7
+ panelTitle: 'Arddulliau Fformatio',
8
+ panelTitle1: 'Arddulliau Bloc',
9
+ panelTitle2: 'Arddulliau Mewnol',
10
+ panelTitle3: 'Arddulliau Gwrthrych'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'da', {
6
+ label: 'Typografi',
7
+ panelTitle: 'Formattering på stylesheet',
8
+ panelTitle1: 'Block typografi',
9
+ panelTitle2: 'Inline typografi',
10
+ panelTitle3: 'Object typografi'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'de', {
6
+ label: 'Stil',
7
+ panelTitle: 'Formatierungenstil',
8
+ panelTitle1: 'Block Stilart',
9
+ panelTitle2: 'Inline Stilart',
10
+ panelTitle3: 'Objekt Stilart'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'el', {
6
+ label: 'Μορφές',
7
+ panelTitle: 'Στυλ Μορφοποίησης',
8
+ panelTitle1: 'Στυλ Κομματιών',
9
+ panelTitle2: 'Στυλ Εν Σειρά',
10
+ panelTitle3: 'Στυλ Αντικειμένων'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'en-au', {
6
+ label: 'Styles',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'Block Styles',
9
+ panelTitle2: 'Inline Styles',
10
+ panelTitle3: 'Object Styles'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'en-ca', {
6
+ label: 'Styles',
7
+ panelTitle: 'Formatting Styles', // MISSING
8
+ panelTitle1: 'Block Styles',
9
+ panelTitle2: 'Inline Styles',
10
+ panelTitle3: 'Object Styles'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'en-gb', {
6
+ label: 'Styles',
7
+ panelTitle: 'Formatting Styles',
8
+ panelTitle1: 'Block Styles',
9
+ panelTitle2: 'Inline Styles',
10
+ panelTitle3: 'Object Styles'
11
+ });
@@ -0,0 +1,11 @@
1
+ /*
2
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.html or http://ckeditor.com/license
4
+ */
5
+ CKEDITOR.plugins.setLang( 'stylescombo', 'en', {
6
+ label: 'Styles',
7
+ panelTitle: 'Formatting Styles',
8
+ panelTitle1: 'Block Styles',
9
+ panelTitle2: 'Inline Styles',
10
+ panelTitle3: 'Object Styles'
11
+ });