Version Description
- Ctrl-S / Cmd-S saving will now select "Save Draft" if the post has not been published yet
- Switched to an npm and grunt.js based build so new versions of CodeMirror can be applied easier
- Updated CodeMirror to its latest version
- Fixed FireFox bug:
<select>
dropdown would not display due to::active
statetransform
property - Fixed bug: toolbar covering text at small screen width
- Fixed bug:
switchEditors is undefined
- Updated Css for wp 4.5
- Added all available CodeMirror themes
- Added syntax highlighting:
- for WordPress shortcodes
- for
<!--more-->
tags and their variants -
NEW CodeMirror modes:
shortcode.js
&wordpresspost.js
- Now calling
hesh.js
in an anonymous wrapper so it won't pollute the global namespace - Now initializing
hesh.js
in an async compliant way - Refactored php to enqueue javascript in the WordPress friendly way
- Tested with WordPress 4.5.2
- Tested in all modern desktop browsers on OSX and Windows 10
Download this release
Release Info
Developer | nixdns |
Plugin | HTML Editor Syntax Highlighter |
Version | 1.7.0 |
Comparing to | |
See all releases |
Code changes from version 1.6.9 to 1.7.0
- html-editor-syntax-highlighter.php +44 -31
- lib/codemirror.min.css +1 -0
- lib/codemirror.min.js +5 -0
- lib/hesh.min.css +1 -1
- lib/hesh.min.js +2 -6
- readme.txt +28 -9
html-editor-syntax-highlighter.php
CHANGED
@@ -1,49 +1,62 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
-
*
|
5 |
-
*
|
6 |
-
*
|
7 |
-
*
|
8 |
-
*
|
9 |
-
*
|
10 |
-
*
|
11 |
-
*
|
12 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
**/
|
14 |
|
15 |
-
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
|
|
|
|
|
16 |
|
17 |
define('HESH_LIBS', plugins_url('/lib/',__FILE__));
|
18 |
|
19 |
class wp_html_editor_syntax {
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
public function admin_head() {
|
25 |
-
if (!$this->is_editor())
|
26 |
-
return;
|
27 |
-
?>
|
28 |
-
<link rel="stylesheet" href="<?php echo HESH_LIBS; ?>hesh.min.css">
|
29 |
-
<?php
|
30 |
}
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
37 |
}
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
40 |
return false;
|
41 |
-
}
|
42 |
return true;
|
43 |
}
|
|
|
44 |
}
|
45 |
|
46 |
if (is_admin()) {
|
47 |
$hesh = new wp_html_editor_syntax();
|
48 |
}
|
49 |
-
|
|
1 |
<?php
|
2 |
/**
|
3 |
+
*
|
4 |
+
* @since 1.7.0
|
5 |
+
* @package HESH_plugin
|
6 |
+
*
|
7 |
+
* Plugin Name: HTML Editor Syntax Highlighter
|
8 |
+
* Plugin URI: http://wordpress.org/extend/plugins/html-editor-syntax-highlighter/
|
9 |
+
* Description: Adds syntax highlighting in the WordPress post HTML/text editor using Codemirror.js
|
10 |
+
* Text Domain: html-editor-syntax-highlighter
|
11 |
+
* Author: Petr Mukhortov
|
12 |
+
* Author URI: http://mukhortov.com/
|
13 |
+
* Author: James Bradford
|
14 |
+
* Author URI: http://arniebradfo.com/
|
15 |
+
* License: GPL-2.0+
|
16 |
+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
|
17 |
+
* GitHub Branch: master
|
18 |
+
* GitHub Plugin URI: https://github.com/arniebradfo/HESH-WordPress-Plugin
|
19 |
+
* Version: 1.7.0
|
20 |
+
* Requires at least: 3.3
|
21 |
+
* Tested up to: 4.5.2
|
22 |
+
* Stable tag: 1.7.0
|
23 |
**/
|
24 |
|
25 |
+
if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
|
26 |
+
die('You are not allowed to call this page directly.');
|
27 |
+
}
|
28 |
|
29 |
define('HESH_LIBS', plugins_url('/lib/',__FILE__));
|
30 |
|
31 |
class wp_html_editor_syntax {
|
32 |
+
|
33 |
+
public function __construct () {
|
34 |
+
if (!$this->is_editor()) return;
|
35 |
+
add_action('admin_enqueue_scripts', array(&$this, 'admin_enqueue_scripts'));
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
+
|
38 |
+
// Enqueues scripts and styles for hesh.js
|
39 |
+
public function admin_enqueue_scripts () {
|
40 |
+
wp_enqueue_style('codemirror', HESH_LIBS.'codemirror.min.css');
|
41 |
+
wp_enqueue_style('heshcss', HESH_LIBS.'hesh.min.css');
|
42 |
+
wp_register_script('codemirror', HESH_LIBS.'codemirror.min.js', false, false, true);
|
43 |
+
wp_enqueue_script('codemirror');
|
44 |
+
wp_register_script('heshjs', HESH_LIBS.'hesh.min.js', array('codemirror'), false, true); // 'tiny_mce' dependency doesn't work?!
|
45 |
+
wp_enqueue_script('heshjs');
|
46 |
}
|
47 |
+
|
48 |
+
// returns whether or not the current page is a post editing admin page
|
49 |
+
private function is_editor () {
|
50 |
+
if (!strstr($_SERVER['SCRIPT_NAME'], 'post.php') &&
|
51 |
+
!strstr($_SERVER['SCRIPT_NAME'], 'post-new.php'))
|
52 |
return false;
|
|
|
53 |
return true;
|
54 |
}
|
55 |
+
|
56 |
}
|
57 |
|
58 |
if (is_admin()) {
|
59 |
$hesh = new wp_html_editor_syntax();
|
60 |
}
|
61 |
+
|
62 |
+
?>
|
lib/codemirror.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.CodeMirror{font-family:monospace;height:300px;color:#000}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:0 0!important;border:none!important;-webkit-user-select:none;-moz-user-select:none;user-select:none}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:0 0;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:none;font-variant-ligatures:none}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-code{outline:0}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected,.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:0 0}.cm-s-3024-day.CodeMirror{background:#f7f7f7;color:#3a3432}.cm-s-3024-day .CodeMirror-line::selection,.cm-s-3024-day .CodeMirror-line>span::selection,.cm-s-3024-day .CodeMirror-line>span>span::selection,.cm-s-3024-day div.CodeMirror-selected{background:#d6d5d4}.cm-s-3024-day .CodeMirror-line::-moz-selection,.cm-s-3024-day .CodeMirror-line>span::-moz-selection,.cm-s-3024-day .CodeMirror-line>span>span::selection{background:#d9d9d9}.cm-s-3024-day .CodeMirror-gutters{background:#f7f7f7;border-right:0}.cm-s-3024-day .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-day .CodeMirror-guttermarker-subtle,.cm-s-3024-day .CodeMirror-linenumber{color:#807d7c}.cm-s-3024-day .CodeMirror-cursor{border-left:1px solid #5c5855}.cm-s-3024-day span.cm-comment{color:#cdab53}.cm-s-3024-day span.cm-atom,.cm-s-3024-day span.cm-number{color:#a16a94}.cm-s-3024-day span.cm-attribute,.cm-s-3024-day span.cm-property{color:#01a252}.cm-s-3024-day span.cm-keyword{color:#db2d20}.cm-s-3024-day span.cm-string{color:#fded02}.cm-s-3024-day span.cm-variable{color:#01a252}.cm-s-3024-day span.cm-variable-2{color:#01a0e4}.cm-s-3024-day span.cm-def{color:#e8bbd0}.cm-s-3024-day span.cm-bracket{color:#3a3432}.cm-s-3024-day span.cm-tag{color:#db2d20}.cm-s-3024-day span.cm-link{color:#a16a94}.cm-s-3024-day span.cm-error{background:#db2d20;color:#5c5855}.cm-s-3024-day .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-3024-day .CodeMirror-matchingbracket{text-decoration:underline;color:#a16a94!important}.cm-s-3024-night.CodeMirror{background:#090300;color:#d6d5d4}.cm-s-3024-night div.CodeMirror-selected{background:#3a3432}.cm-s-3024-night .CodeMirror-line::selection,.cm-s-3024-night .CodeMirror-line>span::selection,.cm-s-3024-night .CodeMirror-line>span>span::selection{background:rgba(58,52,50,.99)}.cm-s-3024-night .CodeMirror-line::-moz-selection,.cm-s-3024-night .CodeMirror-line>span::-moz-selection,.cm-s-3024-night .CodeMirror-line>span>span::-moz-selection{background:rgba(58,52,50,.99)}.cm-s-3024-night .CodeMirror-gutters{background:#090300;border-right:0}.cm-s-3024-night .CodeMirror-guttermarker{color:#db2d20}.cm-s-3024-night .CodeMirror-guttermarker-subtle,.cm-s-3024-night .CodeMirror-linenumber{color:#5c5855}.cm-s-3024-night .CodeMirror-cursor{border-left:1px solid #807d7c}.cm-s-3024-night span.cm-comment{color:#cdab53}.cm-s-3024-night span.cm-atom,.cm-s-3024-night span.cm-number{color:#a16a94}.cm-s-3024-night span.cm-attribute,.cm-s-3024-night span.cm-property{color:#01a252}.cm-s-3024-night span.cm-keyword{color:#db2d20}.cm-s-3024-night span.cm-string{color:#fded02}.cm-s-3024-night span.cm-variable{color:#01a252}.cm-s-3024-night span.cm-variable-2{color:#01a0e4}.cm-s-3024-night span.cm-def{color:#e8bbd0}.cm-s-3024-night span.cm-bracket{color:#d6d5d4}.cm-s-3024-night span.cm-tag{color:#db2d20}.cm-s-3024-night span.cm-link{color:#a16a94}.cm-s-3024-night span.cm-error{background:#db2d20;color:#807d7c}.cm-s-3024-night .CodeMirror-activeline-background{background:#2F2F2F}.cm-s-3024-night .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-abcdef.CodeMirror{background:#0f0f0f;color:#defdef}.cm-s-abcdef div.CodeMirror-selected{background:#515151}.cm-s-abcdef .CodeMirror-line::selection,.cm-s-abcdef .CodeMirror-line>span::selection,.cm-s-abcdef .CodeMirror-line>span>span::selection{background:rgba(56,56,56,.99)}.cm-s-abcdef .CodeMirror-line::-moz-selection,.cm-s-abcdef .CodeMirror-line>span::-moz-selection,.cm-s-abcdef .CodeMirror-line>span>span::-moz-selection{background:rgba(56,56,56,.99)}.cm-s-abcdef .CodeMirror-gutters{background:#555;border-right:2px solid #314151}.cm-s-abcdef .CodeMirror-guttermarker{color:#222}.cm-s-abcdef .CodeMirror-guttermarker-subtle{color:azure}.cm-s-abcdef .CodeMirror-linenumber{color:#FFF}.cm-s-abcdef .CodeMirror-cursor{border-left:1px solid #0F0}.cm-s-abcdef span.cm-keyword{color:#b8860b;font-weight:700}.cm-s-abcdef span.cm-atom{color:#77F}.cm-s-abcdef span.cm-number{color:violet}.cm-s-abcdef span.cm-def{color:#fffabc}.cm-s-abcdef span.cm-variable{color:#abcdef}.cm-s-abcdef span.cm-variable-2{color:#cacbcc}.cm-s-abcdef span.cm-variable-3{color:#def}.cm-s-abcdef span.cm-property{color:#fedcba}.cm-s-abcdef span.cm-operator{color:#ff0}.cm-s-abcdef span.cm-comment{color:#7a7b7c;font-style:italic}.cm-s-abcdef span.cm-string{color:#2b4}.cm-s-abcdef span.cm-meta{color:#C9F}.cm-s-abcdef span.cm-qualifier{color:#FFF700}.cm-s-abcdef span.cm-builtin{color:#30aabc}.cm-s-abcdef span.cm-bracket{color:#8a8a8a}.cm-s-abcdef span.cm-tag{color:#FD4}.cm-s-abcdef span.cm-attribute{color:#DF0}.cm-s-abcdef span.cm-error{color:red}.cm-s-abcdef span.cm-header{color:#7fffd4;font-weight:700}.cm-s-abcdef span.cm-link{color:#8a2be2}.cm-s-abcdef .CodeMirror-activeline-background{background:#314151}.cm-s-ambiance .cm-header{color:#00f}.cm-s-ambiance .cm-quote{color:#24C2C7}.cm-s-ambiance .cm-keyword{color:#cda869}.cm-s-ambiance .cm-atom{color:#CF7EA9}.cm-s-ambiance .cm-number{color:#78CF8A}.cm-s-ambiance .cm-def{color:#aac6e3}.cm-s-ambiance .cm-variable{color:#ffb795}.cm-s-ambiance .cm-variable-2{color:#eed1b3}.cm-s-ambiance .cm-variable-3{color:#faded3}.cm-s-ambiance .cm-property{color:#eed1b3}.cm-s-ambiance .cm-operator{color:#fa8d6a}.cm-s-ambiance .cm-comment{color:#555;font-style:italic}.cm-s-ambiance .cm-string{color:#8f9d6a}.cm-s-ambiance .cm-string-2{color:#9d937c}.cm-s-ambiance .cm-meta{color:#D2A8A1}.cm-s-ambiance .cm-qualifier{color:#ff0}.cm-s-ambiance .cm-builtin{color:#99c}.cm-s-ambiance .cm-bracket{color:#24C2C7}.cm-s-ambiance .cm-tag{color:#fee4ff}.cm-s-ambiance .cm-attribute{color:#9B859D}.cm-s-ambiance .cm-hr{color:pink}.cm-s-ambiance .cm-link{color:#F4C20B}.cm-s-ambiance .cm-special{color:#FF9D00}.cm-s-ambiance .cm-error{color:#AF2018}.cm-s-ambiance .CodeMirror-matchingbracket{color:#0f0}.cm-s-ambiance .CodeMirror-nonmatchingbracket{color:#f22}.cm-s-ambiance div.CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-ambiance .CodeMirror-line::selection,.cm-s-ambiance .CodeMirror-line>span::selection,.cm-s-ambiance .CodeMirror-line>span>span::selection,.cm-s-ambiance.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-ambiance .CodeMirror-line::-moz-selection,.cm-s-ambiance .CodeMirror-line>span::-moz-selection,.cm-s-ambiance .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-ambiance.CodeMirror{line-height:1.4em;color:#E6E1DC;background-color:#202020;-webkit-box-shadow:inset 0 0 10px #000;-moz-box-shadow:inset 0 0 10px #000;box-shadow:inset 0 0 10px #000}.cm-s-ambiance .CodeMirror-gutters{background:#3D3D3D;border-right:1px solid #4D4D4D;box-shadow:0 10px 20px #000}.cm-s-ambiance .CodeMirror-linenumber{text-shadow:0 1px 1px #4d4d4d;color:#111;padding:0 5px}.cm-s-ambiance .CodeMirror-guttermarker{color:#aaa}.cm-s-ambiance .CodeMirror-guttermarker-subtle{color:#111}.cm-s-ambiance .CodeMirror-cursor{border-left:1px solid #7991E8}.cm-s-ambiance .CodeMirror-activeline-background{background:rgba(255,255,255,.031)}.cm-s-ambiance .CodeMirror-gutters,.cm-s-ambiance.CodeMirror{background-image:url(data:image/png;base64,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)}.cm-s-base16-dark.CodeMirror{background:#151515;color:#e0e0e0}.cm-s-base16-dark div.CodeMirror-selected{background:#303030}.cm-s-base16-dark .CodeMirror-line::selection,.cm-s-base16-dark .CodeMirror-line>span::selection,.cm-s-base16-dark .CodeMirror-line>span>span::selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark .CodeMirror-line::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span::-moz-selection,.cm-s-base16-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(48,48,48,.99)}.cm-s-base16-dark .CodeMirror-gutters{background:#151515;border-right:0}.cm-s-base16-dark .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-dark .CodeMirror-guttermarker-subtle,.cm-s-base16-dark .CodeMirror-linenumber{color:#505050}.cm-s-base16-dark .CodeMirror-cursor{border-left:1px solid #b0b0b0}.cm-s-base16-dark span.cm-comment{color:#8f5536}.cm-s-base16-dark span.cm-atom,.cm-s-base16-dark span.cm-number{color:#aa759f}.cm-s-base16-dark span.cm-attribute,.cm-s-base16-dark span.cm-property{color:#90a959}.cm-s-base16-dark span.cm-keyword{color:#ac4142}.cm-s-base16-dark span.cm-string{color:#f4bf75}.cm-s-base16-dark span.cm-variable{color:#90a959}.cm-s-base16-dark span.cm-variable-2{color:#6a9fb5}.cm-s-base16-dark span.cm-def{color:#d28445}.cm-s-base16-dark span.cm-bracket{color:#e0e0e0}.cm-s-base16-dark span.cm-tag{color:#ac4142}.cm-s-base16-dark span.cm-link{color:#aa759f}.cm-s-base16-dark span.cm-error{background:#ac4142;color:#b0b0b0}.cm-s-base16-dark .CodeMirror-activeline-background{background:#202020}.cm-s-base16-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-base16-light.CodeMirror{background:#f5f5f5;color:#202020}.cm-s-base16-light .CodeMirror-line::selection,.cm-s-base16-light .CodeMirror-line>span::selection,.cm-s-base16-light .CodeMirror-line>span>span::selection,.cm-s-base16-light div.CodeMirror-selected{background:#e0e0e0}.cm-s-base16-light .CodeMirror-line::-moz-selection,.cm-s-base16-light .CodeMirror-line>span::-moz-selection,.cm-s-base16-light .CodeMirror-line>span>span::-moz-selection{background:#e0e0e0}.cm-s-base16-light .CodeMirror-gutters{background:#f5f5f5;border-right:0}.cm-s-base16-light .CodeMirror-guttermarker{color:#ac4142}.cm-s-base16-light .CodeMirror-guttermarker-subtle,.cm-s-base16-light .CodeMirror-linenumber{color:#b0b0b0}.cm-s-base16-light .CodeMirror-cursor{border-left:1px solid #505050}.cm-s-base16-light span.cm-comment{color:#8f5536}.cm-s-base16-light span.cm-atom,.cm-s-base16-light span.cm-number{color:#aa759f}.cm-s-base16-light span.cm-attribute,.cm-s-base16-light span.cm-property{color:#90a959}.cm-s-base16-light span.cm-keyword{color:#ac4142}.cm-s-base16-light span.cm-string{color:#f4bf75}.cm-s-base16-light span.cm-variable{color:#90a959}.cm-s-base16-light span.cm-variable-2{color:#6a9fb5}.cm-s-base16-light span.cm-def{color:#d28445}.cm-s-base16-light span.cm-bracket{color:#202020}.cm-s-base16-light span.cm-tag{color:#ac4142}.cm-s-base16-light span.cm-link{color:#aa759f}.cm-s-base16-light span.cm-error{background:#ac4142;color:#505050}.cm-s-base16-light .CodeMirror-activeline-background{background:#DDDCDC}.cm-s-base16-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-bespin.CodeMirror{background:#28211c;color:#9d9b97}.cm-s-bespin div.CodeMirror-selected{background:#36312e!important}.cm-s-bespin .CodeMirror-gutters{background:#28211c;border-right:0}.cm-s-bespin .CodeMirror-linenumber{color:#666}.cm-s-bespin .CodeMirror-cursor{border-left:1px solid #797977!important}.cm-s-bespin span.cm-comment{color:#937121}.cm-s-bespin span.cm-atom,.cm-s-bespin span.cm-number{color:#9b859d}.cm-s-bespin span.cm-attribute,.cm-s-bespin span.cm-property{color:#54be0d}.cm-s-bespin span.cm-keyword{color:#cf6a4c}.cm-s-bespin span.cm-string{color:#f9ee98}.cm-s-bespin span.cm-variable{color:#54be0d}.cm-s-bespin span.cm-variable-2{color:#5ea6ea}.cm-s-bespin span.cm-def{color:#cf7d34}.cm-s-bespin span.cm-error{background:#cf6a4c;color:#797977}.cm-s-bespin span.cm-bracket{color:#9d9b97}.cm-s-bespin span.cm-tag{color:#cf6a4c}.cm-s-bespin span.cm-link{color:#9b859d}.cm-s-bespin .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-bespin .CodeMirror-activeline-background{background:#404040}.cm-s-blackboard.CodeMirror{background:#0C1021;color:#F8F8F8}.cm-s-blackboard div.CodeMirror-selected{background:#253B76}.cm-s-blackboard .CodeMirror-line::selection,.cm-s-blackboard .CodeMirror-line>span::selection,.cm-s-blackboard .CodeMirror-line>span>span::selection{background:rgba(37,59,118,.99)}.cm-s-blackboard .CodeMirror-line::-moz-selection,.cm-s-blackboard .CodeMirror-line>span::-moz-selection,.cm-s-blackboard .CodeMirror-line>span>span::-moz-selection{background:rgba(37,59,118,.99)}.cm-s-blackboard .CodeMirror-gutters{background:#0C1021;border-right:0}.cm-s-blackboard .CodeMirror-guttermarker{color:#FBDE2D}.cm-s-blackboard .CodeMirror-guttermarker-subtle,.cm-s-blackboard .CodeMirror-linenumber{color:#888}.cm-s-blackboard .CodeMirror-cursor{border-left:1px solid #A7A7A7}.cm-s-cobalt .CodeMirror-cursor,.cm-s-colorforth .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-blackboard .cm-keyword{color:#FBDE2D}.cm-s-blackboard .cm-atom,.cm-s-blackboard .cm-number{color:#D8FA3C}.cm-s-blackboard .cm-def{color:#8DA6CE}.cm-s-blackboard .cm-variable{color:#FF6400}.cm-s-blackboard .cm-operator{color:#FBDE2D}.cm-s-blackboard .cm-comment{color:#AEAEAE}.cm-s-blackboard .cm-string,.cm-s-blackboard .cm-string-2{color:#61CE3C}.cm-s-blackboard .cm-meta{color:#D8FA3C}.cm-s-blackboard .cm-attribute,.cm-s-blackboard .cm-builtin,.cm-s-blackboard .cm-tag{color:#8DA6CE}.cm-s-blackboard .cm-header{color:#FF6400}.cm-s-blackboard .cm-hr{color:#AEAEAE}.cm-s-blackboard .cm-link{color:#8DA6CE}.cm-s-blackboard .cm-error{background:#9D1E15;color:#F8F8F8}.cm-s-blackboard .CodeMirror-activeline-background{background:#3C3636}.cm-s-blackboard .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-cobalt.CodeMirror{background:#002240;color:#fff}.cm-s-cobalt div.CodeMirror-selected{background:#b36539}.cm-s-cobalt .CodeMirror-line::selection,.cm-s-cobalt .CodeMirror-line>span::selection,.cm-s-cobalt .CodeMirror-line>span>span::selection{background:rgba(179,101,57,.99)}.cm-s-cobalt .CodeMirror-line::-moz-selection,.cm-s-cobalt .CodeMirror-line>span::-moz-selection,.cm-s-cobalt .CodeMirror-line>span>span::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-cobalt .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-cobalt .CodeMirror-guttermarker{color:#ffee80}.cm-s-cobalt .CodeMirror-guttermarker-subtle,.cm-s-cobalt .CodeMirror-linenumber{color:#d0d0d0}.cm-s-cobalt span.cm-comment{color:#08f}.cm-s-cobalt span.cm-atom{color:#845dc4}.cm-s-cobalt span.cm-attribute,.cm-s-cobalt span.cm-number{color:#ff80e1}.cm-s-cobalt span.cm-keyword{color:#ffee80}.cm-s-cobalt span.cm-string{color:#3ad900}.cm-s-cobalt span.cm-meta{color:#ff9d00}.cm-s-cobalt span.cm-tag,.cm-s-cobalt span.cm-variable-2{color:#9effff}.cm-s-cobalt span.cm-def,.cm-s-cobalt span.cm-variable-3{color:#fff}.cm-s-cobalt span.cm-bracket{color:#d8d8d8}.cm-s-cobalt span.cm-builtin,.cm-s-cobalt span.cm-special{color:#ff9e59}.cm-s-cobalt span.cm-link{color:#845dc4}.cm-s-cobalt span.cm-error{color:#9d1e15}.cm-s-cobalt .CodeMirror-activeline-background{background:#002D57}.cm-s-cobalt .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-colorforth.CodeMirror{background:#000;color:#f8f8f8}.cm-s-colorforth .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-colorforth .CodeMirror-guttermarker{color:#FFBD40}.cm-s-colorforth .CodeMirror-guttermarker-subtle{color:#78846f}.cm-s-colorforth .CodeMirror-linenumber{color:#bababa}.cm-s-colorforth span.cm-comment{color:#ededed}.cm-s-colorforth span.cm-def{color:#ff1c1c;font-weight:700}.cm-s-colorforth span.cm-keyword{color:#ffd900}.cm-s-colorforth span.cm-builtin{color:#00d95a}.cm-s-colorforth span.cm-variable{color:#73ff00}.cm-s-colorforth span.cm-string{color:#007bff}.cm-s-colorforth span.cm-number{color:#00c4ff}.cm-s-colorforth span.cm-atom{color:#606060}.cm-s-colorforth span.cm-variable-2{color:#EEE}.cm-s-colorforth span.cm-variable-3{color:#DDD}.cm-s-colorforth span.cm-meta{color:#ff0}.cm-s-colorforth span.cm-qualifier{color:#FFF700}.cm-s-colorforth span.cm-bracket{color:#cc7}.cm-s-colorforth span.cm-tag{color:#FFBD40}.cm-s-colorforth span.cm-attribute{color:#FFF700}.cm-s-colorforth span.cm-error{color:red}.cm-s-colorforth div.CodeMirror-selected{background:#333d53}.cm-s-colorforth span.cm-compilation{background:rgba(255,255,255,.12)}.cm-s-colorforth .CodeMirror-activeline-background{background:#253540}.cm-s-dracula .CodeMirror-gutters,.cm-s-dracula.CodeMirror{background-color:#282a36!important;color:#f8f8f2!important;border:none}.cm-s-dracula .CodeMirror-activeline-background,.cm-s-dracula .CodeMirror-line::selection,.cm-s-dracula .CodeMirror-line>span::selection,.cm-s-dracula .CodeMirror-line>span>span::selection,.cm-s-dracula.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-dracula .CodeMirror-gutters{color:#282a36}.cm-s-dracula .CodeMirror-cursor{border-left:solid thin #f8f8f0}.cm-s-dracula .CodeMirror-linenumber{color:#6D8A88}.cm-s-dracula .CodeMirror-line::-moz-selection,.cm-s-dracula .CodeMirror-line>span::-moz-selection,.cm-s-dracula .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-dracula span.cm-comment{color:#6272a4}.cm-s-dracula span.cm-string,.cm-s-dracula span.cm-string-2{color:#f1fa8c}.cm-s-dracula span.cm-number{color:#bd93f9}.cm-s-dracula span.cm-variable{color:#50fa7b}.cm-s-dracula span.cm-variable-2{color:#fff}.cm-s-dracula span.cm-def{color:#ffb86c}.cm-s-dracula span.cm-keyword,.cm-s-dracula span.cm-operator{color:#ff79c6}.cm-s-dracula span.cm-atom{color:#bd93f9}.cm-s-dracula span.cm-meta{color:#f8f8f2}.cm-s-dracula span.cm-tag{color:#ff79c6}.cm-s-dracula span.cm-attribute,.cm-s-dracula span.cm-qualifier{color:#50fa7b}.cm-s-dracula span.cm-property{color:#66d9ef}.cm-s-dracula span.cm-builtin,.cm-s-dracula span.cm-variable-3{color:#50fa7b}.cm-s-dracula .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-eclipse span.cm-meta{color:#FF1717}.cm-s-eclipse span.cm-keyword{line-height:1em;font-weight:700;color:#7F0055}.cm-s-eclipse span.cm-atom{color:#219}.cm-s-eclipse span.cm-number{color:#164}.cm-s-eclipse span.cm-def{color:#00f}.cm-s-eclipse span.cm-variable{color:#000}.cm-s-eclipse span.cm-variable-2,.cm-s-eclipse span.cm-variable-3{color:#0000C0}.cm-s-eclipse span.cm-operator,.cm-s-eclipse span.cm-property{color:#000}.cm-s-eclipse span.cm-comment{color:#3F7F5F}.cm-s-eclipse span.cm-string{color:#2A00FF}.cm-s-eclipse span.cm-string-2{color:#f50}.cm-s-eclipse span.cm-qualifier{color:#555}.cm-s-eclipse span.cm-builtin{color:#30a}.cm-s-eclipse span.cm-bracket{color:#cc7}.cm-s-eclipse span.cm-tag{color:#170}.cm-s-eclipse span.cm-attribute{color:#00c}.cm-s-eclipse span.cm-link{color:#219}.cm-s-eclipse span.cm-error{color:red}.cm-s-eclipse .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-eclipse .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}.cm-s-elegant span.cm-atom,.cm-s-elegant span.cm-number,.cm-s-elegant span.cm-string{color:#762}.cm-s-elegant span.cm-comment{color:#262;font-style:italic;line-height:1em}.cm-s-elegant span.cm-meta{color:#555;font-style:italic;line-height:1em}.cm-s-elegant span.cm-variable{color:#000}.cm-s-elegant span.cm-variable-2{color:#b11}.cm-s-elegant span.cm-qualifier{color:#555}.cm-s-elegant span.cm-keyword{color:#730}.cm-s-elegant span.cm-builtin{color:#30a}.cm-s-elegant span.cm-link{color:#762}.cm-s-elegant span.cm-error{background-color:#fdd}.cm-s-elegant .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-elegant .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}.cm-s-erlang-dark.CodeMirror{background:#002240;color:#fff}.cm-s-erlang-dark div.CodeMirror-selected{background:#b36539}.cm-s-erlang-dark .CodeMirror-line::selection,.cm-s-erlang-dark .CodeMirror-line>span::selection,.cm-s-erlang-dark .CodeMirror-line>span>span::selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark .CodeMirror-line::-moz-selection,.cm-s-erlang-dark .CodeMirror-line>span::-moz-selection,.cm-s-erlang-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(179,101,57,.99)}.cm-s-erlang-dark .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-erlang-dark .CodeMirror-guttermarker{color:#fff}.cm-s-erlang-dark .CodeMirror-guttermarker-subtle,.cm-s-erlang-dark .CodeMirror-linenumber{color:#d0d0d0}.cm-s-erlang-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-erlang-dark span.cm-quote{color:#ccc}.cm-s-erlang-dark span.cm-atom{color:#f133f1}.cm-s-erlang-dark span.cm-attribute{color:#ff80e1}.cm-s-erlang-dark span.cm-bracket{color:#ff9d00}.cm-s-erlang-dark span.cm-builtin{color:#eaa}.cm-s-erlang-dark span.cm-comment{color:#77f}.cm-s-erlang-dark span.cm-def{color:#e7a}.cm-s-erlang-dark span.cm-keyword{color:#ffee80}.cm-s-erlang-dark span.cm-meta{color:#50fefe}.cm-s-erlang-dark span.cm-number{color:#ffd0d0}.cm-s-erlang-dark span.cm-operator{color:#d55}.cm-s-erlang-dark span.cm-property,.cm-s-erlang-dark span.cm-qualifier{color:#ccc}.cm-s-erlang-dark span.cm-special{color:#fbb}.cm-s-erlang-dark span.cm-string{color:#3ad900}.cm-s-erlang-dark span.cm-string-2{color:#ccc}.cm-s-erlang-dark span.cm-tag{color:#9effff}.cm-s-erlang-dark span.cm-variable{color:#50fe50}.cm-s-erlang-dark span.cm-variable-2{color:#e0e}.cm-s-erlang-dark span.cm-variable-3{color:#ccc}.cm-s-erlang-dark span.cm-error{color:#9d1e15}.cm-s-erlang-dark .CodeMirror-activeline-background{background:#013461}.cm-s-erlang-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-hopscotch.CodeMirror{background:#322931;color:#d5d3d5}.cm-s-hopscotch div.CodeMirror-selected{background:#433b42!important}.cm-s-hopscotch .CodeMirror-gutters{background:#322931;border-right:0}.cm-s-hopscotch .CodeMirror-linenumber{color:#797379}.cm-s-hopscotch .CodeMirror-cursor{border-left:1px solid #989498!important}.cm-s-hopscotch span.cm-comment{color:#b33508}.cm-s-hopscotch span.cm-atom,.cm-s-hopscotch span.cm-number{color:#c85e7c}.cm-s-hopscotch span.cm-attribute,.cm-s-hopscotch span.cm-property{color:#8fc13e}.cm-s-hopscotch span.cm-keyword{color:#dd464c}.cm-s-hopscotch span.cm-string{color:#fdcc59}.cm-s-hopscotch span.cm-variable{color:#8fc13e}.cm-s-hopscotch span.cm-variable-2{color:#1290bf}.cm-s-hopscotch span.cm-def{color:#fd8b19}.cm-s-hopscotch span.cm-error{background:#dd464c;color:#989498}.cm-s-hopscotch span.cm-bracket{color:#d5d3d5}.cm-s-hopscotch span.cm-tag{color:#dd464c}.cm-s-hopscotch span.cm-link{color:#c85e7c}.cm-s-hopscotch .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-hopscotch .CodeMirror-activeline-background{background:#302020}.cm-s-icecoder{color:#666;background:#1d1d1b}.cm-s-icecoder span.cm-keyword{color:#eee;font-weight:700}.cm-s-icecoder span.cm-atom{color:#e1c76e}.cm-s-icecoder span.cm-number{color:#6cb5d9}.cm-s-icecoder span.cm-def{color:#b9ca4a}.cm-s-icecoder span.cm-variable{color:#6cb5d9}.cm-s-icecoder span.cm-variable-2{color:#cc1e5c}.cm-s-icecoder span.cm-variable-3{color:#f9602c}.cm-s-icecoder span.cm-property{color:#eee}.cm-s-icecoder span.cm-operator{color:#9179bb}.cm-s-icecoder span.cm-comment{color:#97a3aa}.cm-s-icecoder span.cm-string{color:#b9ca4a}.cm-s-icecoder span.cm-string-2{color:#6cb5d9}.cm-s-icecoder span.cm-meta,.cm-s-icecoder span.cm-qualifier{color:#555}.cm-s-icecoder span.cm-builtin{color:#214e7b}.cm-s-icecoder span.cm-bracket{color:#cc7}.cm-s-icecoder span.cm-tag{color:#e8e8e8}.cm-s-icecoder span.cm-attribute{color:#099}.cm-s-icecoder span.cm-header{color:#6a0d6a}.cm-s-icecoder span.cm-quote{color:#186718}.cm-s-icecoder span.cm-hr{color:#888}.cm-s-icecoder span.cm-link{color:#e1c76e}.cm-s-icecoder span.cm-error{color:#d00}.cm-s-icecoder .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-icecoder div.CodeMirror-selected{color:#fff;background:#037}.cm-s-icecoder .CodeMirror-gutters{background:#1d1d1b;min-width:41px;border-right:0}.cm-s-icecoder .CodeMirror-linenumber{color:#555;cursor:default}.cm-s-icecoder .CodeMirror-matchingbracket{color:#fff!important;background:#555!important}.cm-s-icecoder .CodeMirror-activeline-background{background:#000}.cm-s-isotope.CodeMirror{background:#000;color:#e0e0e0}.cm-s-isotope div.CodeMirror-selected{background:#404040!important}.cm-s-isotope .CodeMirror-gutters{background:#000;border-right:0}.cm-s-isotope .CodeMirror-linenumber{color:grey}.cm-s-isotope .CodeMirror-cursor{border-left:1px solid silver!important}.cm-s-isotope span.cm-comment{color:#30f}.cm-s-isotope span.cm-atom,.cm-s-isotope span.cm-number{color:#c0f}.cm-s-isotope span.cm-attribute,.cm-s-isotope span.cm-property{color:#3f0}.cm-s-isotope span.cm-keyword{color:red}.cm-s-isotope span.cm-string{color:#f09}.cm-s-isotope span.cm-variable{color:#3f0}.cm-s-isotope span.cm-variable-2{color:#06f}.cm-s-isotope span.cm-def{color:#f90}.cm-s-isotope span.cm-error{background:red;color:silver}.cm-s-isotope span.cm-bracket{color:#e0e0e0}.cm-s-isotope span.cm-tag{color:red}.cm-s-isotope span.cm-link{color:#c0f}.cm-s-isotope .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-isotope .CodeMirror-activeline-background{background:#202020}.cm-s-lesser-dark{line-height:1.3em}.cm-s-lesser-dark.CodeMirror{background:#262626;color:#EBEFE7;text-shadow:0 -1px 1px #262626}.cm-s-lesser-dark div.CodeMirror-selected{background:#45443B}.cm-s-lesser-dark .CodeMirror-line::selection,.cm-s-lesser-dark .CodeMirror-line>span::selection,.cm-s-lesser-dark .CodeMirror-line>span>span::selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark .CodeMirror-line::-moz-selection,.cm-s-lesser-dark .CodeMirror-line>span::-moz-selection,.cm-s-lesser-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(69,68,59,.99)}.cm-s-lesser-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-lesser-dark pre{padding:0 8px}.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket{color:#7EFC7E}.cm-s-lesser-dark .CodeMirror-gutters{background:#262626;border-right:1px solid #aaa}.cm-s-lesser-dark .CodeMirror-guttermarker{color:#599eff}.cm-s-lesser-dark .CodeMirror-guttermarker-subtle,.cm-s-lesser-dark .CodeMirror-linenumber{color:#777}.cm-s-lesser-dark span.cm-header{color:#a0a}.cm-s-lesser-dark span.cm-quote{color:#090}.cm-s-lesser-dark span.cm-keyword{color:#599eff}.cm-s-lesser-dark span.cm-atom{color:#C2B470}.cm-s-lesser-dark span.cm-number{color:#B35E4D}.cm-s-lesser-dark span.cm-def{color:#fff}.cm-s-lesser-dark span.cm-variable{color:#D9BF8C}.cm-s-lesser-dark span.cm-variable-2{color:#669199}.cm-s-lesser-dark span.cm-variable-3{color:#fff}.cm-s-lesser-dark span.cm-operator,.cm-s-lesser-dark span.cm-property{color:#92A75C}.cm-s-lesser-dark span.cm-comment{color:#666}.cm-s-lesser-dark span.cm-string{color:#BCD279}.cm-s-lesser-dark span.cm-string-2{color:#f50}.cm-s-lesser-dark span.cm-meta{color:#738C73}.cm-s-lesser-dark span.cm-qualifier{color:#555}.cm-s-lesser-dark span.cm-builtin{color:#ff9e59}.cm-s-lesser-dark span.cm-bracket{color:#EBEFE7}.cm-s-lesser-dark span.cm-tag{color:#669199}.cm-s-lesser-dark span.cm-attribute{color:#00c}.cm-s-lesser-dark span.cm-hr{color:#999}.cm-s-lesser-dark span.cm-link{color:#00c}.cm-s-lesser-dark span.cm-error{color:#9d1e15}.cm-s-lesser-dark .CodeMirror-activeline-background{background:#3C3A3A}.cm-s-lesser-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-liquibyte.CodeMirror{background-color:#000;color:#fff;line-height:1.2em;font-size:1em}.cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight{text-decoration:underline;text-decoration-color:#0f0;text-decoration-style:wavy}.cm-s-liquibyte .cm-tab,.cm-s-liquibyte .cm-trailingspace{text-decoration:line-through;text-decoration-style:dotted}.cm-s-liquibyte .cm-trailingspace{text-decoration-color:red}.cm-s-liquibyte .cm-tab{text-decoration-color:#404040}.cm-s-liquibyte .CodeMirror-gutters{background-color:#262626;border-right:1px solid #505050;padding-right:.8em}.cm-s-liquibyte .CodeMirror-gutter-elt div{font-size:1.2em}.cm-s-liquibyte .CodeMirror-linenumber{color:#606060;padding-left:0}.cm-s-liquibyte .CodeMirror-cursor{border-left:1px solid #eee}.cm-s-liquibyte span.cm-comment{color:green}.cm-s-liquibyte span.cm-def{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-keyword{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-builtin{color:#ffaf40;font-weight:700}.cm-s-liquibyte span.cm-variable{color:#5967ff;font-weight:700}.cm-s-liquibyte span.cm-string{color:#ff8000}.cm-s-liquibyte span.cm-number{color:#0f0;font-weight:700}.cm-s-liquibyte span.cm-atom{color:#bf3030;font-weight:700}.cm-s-liquibyte span.cm-variable-2{color:#007f7f;font-weight:700}.cm-s-liquibyte span.cm-variable-3{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-property{color:#999;font-weight:700}.cm-s-liquibyte span.cm-operator{color:#fff}.cm-s-liquibyte span.cm-meta{color:#0f0}.cm-s-liquibyte span.cm-qualifier{color:#fff700;font-weight:700}.cm-s-liquibyte span.cm-bracket{color:#cc7}.cm-s-liquibyte span.cm-tag{color:#ff0;font-weight:700}.cm-s-liquibyte span.cm-attribute{color:#c080ff;font-weight:700}.cm-s-liquibyte span.cm-error{color:red}.cm-s-liquibyte div.CodeMirror-selected{background-color:rgba(255,0,0,.25)}.cm-s-liquibyte span.cm-compilation{background-color:rgba(255,255,255,.12)}.cm-s-liquibyte .CodeMirror-activeline-background{background-color:rgba(0,255,0,.15)}.cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket{color:#0f0;font-weight:700}.cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket{color:red;font-weight:700}.CodeMirror-matchingtag{background-color:rgba(150,255,0,.3)}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover,div.CodeMirror-simplescroll-vertical div:hover{background-color:rgba(80,80,80,.7)}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div,div.CodeMirror-simplescroll-vertical div{background-color:rgba(80,80,80,.3);border:1px solid #404040;border-radius:5px}.cm-s-liquibyte div.CodeMirror-simplescroll-vertical div{border-top:1px solid #404040;border-bottom:1px solid #404040}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div{border-left:1px solid #404040;border-right:1px solid #404040}.cm-s-liquibyte div.CodeMirror-simplescroll-vertical{background-color:#262626}.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal{background-color:#262626;border-top:1px solid #404040}.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div,div.CodeMirror-overlayscroll-vertical div{background-color:#404040;border-radius:5px}.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div,.cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div{border:1px solid #404040}.cm-s-material{background-color:#263238;color:rgba(233,237,237,1)}.cm-s-material .CodeMirror-gutters{background:#263238;color:#537f7e;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#537f7e}.cm-s-material .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-material div.CodeMirror-selected{background:rgba(255,255,255,.15)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,0)}.cm-s-material .cm-keyword{color:rgba(199,146,234,1)}.cm-s-material .cm-operator{color:rgba(233,237,237,1)}.cm-s-material .cm-variable-2{color:#80CBC4}.cm-s-material .cm-builtin{color:#DECB6B}.cm-s-material .cm-atom,.cm-s-material .cm-number{color:#F77669}.cm-s-material .cm-def{color:rgba(233,237,237,1)}.cm-s-material .cm-string{color:#C3E88D}.cm-s-material .cm-string-2{color:#80CBC4}.cm-s-material .cm-comment{color:#546E7A}.cm-s-material .cm-variable{color:#82B1FF}.cm-s-material .cm-meta,.cm-s-material .cm-tag{color:#80CBC4}.cm-s-material .cm-attribute{color:#FFCB6B}.cm-s-material .cm-property{color:#80CBAE}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3{color:#DECB6B}.cm-s-material .cm-tag{color:rgba(255,83,112,1)}.cm-s-material .cm-error{color:rgba(255,255,255,1);background-color:#EC5F67}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-mbo.CodeMirror{background:#2c2c2c;color:#ffffec}.cm-s-mbo div.CodeMirror-selected{background:#716C62}.cm-s-mbo .CodeMirror-line::selection,.cm-s-mbo .CodeMirror-line>span::selection,.cm-s-mbo .CodeMirror-line>span>span::selection{background:rgba(113,108,98,.99)}.cm-s-mbo .CodeMirror-line::-moz-selection,.cm-s-mbo .CodeMirror-line>span::-moz-selection,.cm-s-mbo .CodeMirror-line>span>span::-moz-selection{background:rgba(113,108,98,.99)}.cm-s-mbo .CodeMirror-gutters{background:#4e4e4e;border-right:0}.cm-s-mbo .CodeMirror-guttermarker{color:#fff}.cm-s-mbo .CodeMirror-guttermarker-subtle{color:grey}.cm-s-mbo .CodeMirror-linenumber{color:#dadada}.cm-s-mbo .CodeMirror-cursor{border-left:1px solid #ffffec}.cm-s-mbo span.cm-comment{color:#95958a}.cm-s-mbo span.cm-atom,.cm-s-mbo span.cm-number{color:#00a8c6}.cm-s-mbo span.cm-attribute,.cm-s-mbo span.cm-property{color:#9ddfe9}.cm-s-mbo span.cm-keyword{color:#ffb928}.cm-s-mbo span.cm-string{color:#ffcf6c}.cm-s-mbo span.cm-string.cm-property,.cm-s-mbo span.cm-variable{color:#ffffec}.cm-s-mbo span.cm-variable-2{color:#00a8c6}.cm-s-mbo span.cm-def{color:#ffffec}.cm-s-mbo span.cm-bracket{color:#fffffc;font-weight:700}.cm-s-mbo span.cm-tag{color:#9ddfe9}.cm-s-mbo span.cm-link{color:#f54b07}.cm-s-mbo span.cm-error{border-bottom:#636363;color:#ffffec}.cm-s-mbo span.cm-qualifier{color:#ffffec}.cm-s-mbo .CodeMirror-activeline-background{background:#494b41}.cm-s-mbo .CodeMirror-matchingbracket{color:#ffb928!important}.cm-s-mbo .CodeMirror-matchingtag{background:rgba(255,255,255,.37)}.cm-s-mdn-like.CodeMirror{color:#999;background-color:#fff}.cm-s-mdn-like .CodeMirror-line::selection,.cm-s-mdn-like .CodeMirror-line>span::selection,.cm-s-mdn-like .CodeMirror-line>span>span::selection,.cm-s-mdn-like div.CodeMirror-selected{background:#cfc}.cm-s-mdn-like .CodeMirror-line::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span::-moz-selection,.cm-s-mdn-like .CodeMirror-line>span>span::-moz-selection{background:#cfc}.cm-s-mdn-like .CodeMirror-gutters{background:#f8f8f8;border-left:6px solid rgba(0,83,159,.65);color:#333}.cm-s-mdn-like .CodeMirror-linenumber{color:#aaa;padding-left:8px}.cm-s-mdn-like .CodeMirror-cursor{border-left:2px solid #222}.cm-s-mdn-like .cm-keyword{color:#6262FF}.cm-s-mdn-like .cm-atom{color:#F90}.cm-s-mdn-like .cm-number{color:#ca7841}.cm-s-mdn-like .cm-def{color:#8DA6CE}.cm-s-mdn-like span.cm-tag,.cm-s-mdn-like span.cm-variable-2{color:#690}.cm-s-mdn-like .cm-variable,.cm-s-mdn-like span.cm-def,.cm-s-mdn-like span.cm-variable-3{color:#07a}.cm-s-mdn-like .cm-property{color:#905}.cm-s-mdn-like .cm-qualifier{color:#690}.cm-s-mdn-like .cm-operator{color:#cda869}.cm-s-mdn-like .cm-comment{color:#777;font-weight:400}.cm-s-mdn-like .cm-string{color:#07a;font-style:italic}.cm-s-mdn-like .cm-string-2{color:#bd6b18}.cm-s-mdn-like .cm-meta{color:#000}.cm-s-mdn-like .cm-builtin{color:#9B7536}.cm-s-mdn-like .cm-tag{color:#997643}.cm-s-mdn-like .cm-attribute{color:#d6bb6d}.cm-s-mdn-like .cm-header{color:#FF6400}.cm-s-mdn-like .cm-hr{color:#AEAEAE}.cm-s-mdn-like .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-mdn-like .cm-error{border-bottom:1px solid red}div.cm-s-mdn-like .CodeMirror-activeline-background{background:#efefff}div.cm-s-mdn-like span.CodeMirror-matchingbracket{outline:grey solid 1px;color:inherit}.cm-s-mdn-like.CodeMirror{background-image:url(data:image/png;base64,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)}.cm-s-midnight span.CodeMirror-matchhighlight{background:#494949}.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight{background:#314D67!important}.cm-s-midnight .CodeMirror-activeline-background{background:#253540}.cm-s-midnight.CodeMirror{background:#0F192A;color:#D1EDFF;border-top:1px solid #000;border-bottom:1px solid #000}.cm-s-midnight div.CodeMirror-selected{background:#314D67}.cm-s-midnight .CodeMirror-line::selection,.cm-s-midnight .CodeMirror-line>span::selection,.cm-s-midnight .CodeMirror-line>span>span::selection{background:rgba(49,77,103,.99)}.cm-s-midnight .CodeMirror-line::-moz-selection,.cm-s-midnight .CodeMirror-line>span::-moz-selection,.cm-s-midnight .CodeMirror-line>span>span::-moz-selection{background:rgba(49,77,103,.99)}.cm-s-midnight .CodeMirror-gutters{background:#0F192A;border-right:1px solid}.cm-s-midnight .CodeMirror-guttermarker{color:#fff}.cm-s-midnight .CodeMirror-guttermarker-subtle{color:#d0d0d0}.cm-s-midnight .CodeMirror-linenumber{color:#D0D0D0}.cm-s-midnight .CodeMirror-cursor{border-left:1px solid #F8F8F0}.cm-s-midnight span.cm-comment{color:#428BDD}.cm-s-midnight span.cm-atom{color:#AE81FF}.cm-s-midnight span.cm-number{color:#D1EDFF}.cm-s-midnight span.cm-attribute,.cm-s-midnight span.cm-property{color:#A6E22E}.cm-s-midnight span.cm-keyword{color:#E83737}.cm-s-midnight span.cm-string{color:#1DC116}.cm-s-midnight span.cm-variable,.cm-s-midnight span.cm-variable-2{color:#FFAA3E}.cm-s-midnight span.cm-def{color:#4DD}.cm-s-midnight span.cm-bracket{color:#D1EDFF}.cm-s-midnight span.cm-tag{color:#449}.cm-s-midnight span.cm-link{color:#AE81FF}.cm-s-midnight span.cm-error{background:#F92672;color:#F8F8F0}.cm-s-midnight .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-monokai.CodeMirror{background:#272822;color:#f8f8f2}.cm-s-monokai div.CodeMirror-selected{background:#49483E}.cm-s-monokai .CodeMirror-line::selection,.cm-s-monokai .CodeMirror-line>span::selection,.cm-s-monokai .CodeMirror-line>span>span::selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-line::-moz-selection,.cm-s-monokai .CodeMirror-line>span::-moz-selection,.cm-s-monokai .CodeMirror-line>span>span::-moz-selection{background:rgba(73,72,62,.99)}.cm-s-monokai .CodeMirror-gutters{background:#272822;border-right:0}.cm-s-monokai .CodeMirror-guttermarker{color:#fff}.cm-s-monokai .CodeMirror-guttermarker-subtle,.cm-s-monokai .CodeMirror-linenumber{color:#d0d0d0}.cm-s-monokai .CodeMirror-cursor{border-left:1px solid #f8f8f0}.cm-s-monokai span.cm-comment{color:#75715e}.cm-s-monokai span.cm-atom,.cm-s-monokai span.cm-number{color:#ae81ff}.cm-s-monokai span.cm-attribute,.cm-s-monokai span.cm-property{color:#a6e22e}.cm-s-monokai span.cm-keyword{color:#f92672}.cm-s-monokai span.cm-builtin{color:#66d9ef}.cm-s-monokai span.cm-string{color:#e6db74}.cm-s-monokai span.cm-variable{color:#f8f8f2}.cm-s-monokai span.cm-variable-2{color:#9effff}.cm-s-monokai span.cm-variable-3{color:#66d9ef}.cm-s-monokai span.cm-def{color:#fd971f}.cm-s-monokai span.cm-bracket{color:#f8f8f2}.cm-s-monokai span.cm-tag{color:#f92672}.cm-s-monokai span.cm-header,.cm-s-monokai span.cm-link{color:#ae81ff}.cm-s-monokai span.cm-error{background:#f92672;color:#f8f8f0}.cm-s-monokai .CodeMirror-activeline-background{background:#373831}.cm-s-monokai .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-neat span.cm-comment{color:#a86}.cm-s-neat span.cm-keyword{line-height:1em;font-weight:700;color:#00f}.cm-s-neat span.cm-string{color:#a22}.cm-s-neat span.cm-builtin{line-height:1em;font-weight:700;color:#077}.cm-s-neat span.cm-special{line-height:1em;font-weight:700;color:#0aa}.cm-s-neat span.cm-variable{color:#000}.cm-s-neat span.cm-atom,.cm-s-neat span.cm-number{color:#3a3}.cm-s-neat span.cm-meta{color:#555}.cm-s-neat span.cm-link{color:#3a3}.cm-s-neat .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-neat .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important}.cm-s-neo.CodeMirror{background-color:#fff;color:#2e383c;line-height:1.4375}.cm-s-neo .cm-comment{color:#75787b}.cm-s-neo .cm-keyword,.cm-s-neo .cm-property{color:#1d75b3}.cm-s-neo .cm-atom,.cm-s-neo .cm-number{color:#75438a}.cm-s-neo .cm-node,.cm-s-neo .cm-tag{color:#9c3328}.cm-s-neo .cm-string{color:#b35e14}.cm-s-neo .cm-qualifier,.cm-s-neo .cm-variable{color:#047d65}.cm-s-neo pre{padding:0}.cm-s-neo .CodeMirror-gutters{border:none;border-right:10px solid transparent;background-color:transparent}.cm-s-neo .CodeMirror-linenumber{padding:0;color:#e0e2e5}.cm-s-neo .CodeMirror-guttermarker{color:#1d75b3}.cm-s-neo .CodeMirror-guttermarker-subtle{color:#e0e2e5}.cm-s-neo .CodeMirror-cursor{width:auto;border:0;background:rgba(155,157,162,.37);z-index:1}.cm-s-night.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-night div.CodeMirror-selected{background:#447}.cm-s-night .CodeMirror-line::selection,.cm-s-night .CodeMirror-line>span::selection,.cm-s-night .CodeMirror-line>span>span::selection{background:rgba(68,68,119,.99)}.cm-s-night .CodeMirror-line::-moz-selection,.cm-s-night .CodeMirror-line>span::-moz-selection,.cm-s-night .CodeMirror-line>span>span::-moz-selection{background:rgba(68,68,119,.99)}.cm-s-night .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-night .CodeMirror-guttermarker{color:#fff}.cm-s-night .CodeMirror-guttermarker-subtle{color:#bbb}.cm-s-night .CodeMirror-linenumber{color:#f8f8f8}.cm-s-night .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-night span.cm-comment{color:#8900d1}.cm-s-night span.cm-atom{color:#845dc4}.cm-s-night span.cm-attribute,.cm-s-night span.cm-number{color:#ffd500}.cm-s-night span.cm-keyword{color:#599eff}.cm-s-night span.cm-string{color:#37f14a}.cm-s-night span.cm-meta{color:#7678e2}.cm-s-night span.cm-tag,.cm-s-night span.cm-variable-2{color:#99b2ff}.cm-s-night span.cm-def,.cm-s-night span.cm-variable-3{color:#fff}.cm-s-night span.cm-bracket{color:#8da6ce}.cm-s-night span.cm-builtin,.cm-s-night span.cm-special{color:#ff9e59}.cm-s-night span.cm-link{color:#845dc4}.cm-s-night span.cm-error{color:#9d1e15}.cm-s-night .CodeMirror-activeline-background{background:#1C005A}.cm-s-night .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-paraiso-dark.CodeMirror{background:#2f1e2e;color:#b9b6b0}.cm-s-paraiso-dark div.CodeMirror-selected{background:#41323f}.cm-s-paraiso-dark .CodeMirror-line::selection,.cm-s-paraiso-dark .CodeMirror-line>span::selection,.cm-s-paraiso-dark .CodeMirror-line>span>span::selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark .CodeMirror-line::-moz-selection,.cm-s-paraiso-dark .CodeMirror-line>span::-moz-selection,.cm-s-paraiso-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(65,50,63,.99)}.cm-s-paraiso-dark .CodeMirror-gutters{background:#2f1e2e;border-right:0}.cm-s-paraiso-dark .CodeMirror-guttermarker{color:#ef6155}.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle,.cm-s-paraiso-dark .CodeMirror-linenumber{color:#776e71}.cm-s-paraiso-dark .CodeMirror-cursor{border-left:1px solid #8d8687}.cm-s-paraiso-dark span.cm-comment{color:#e96ba8}.cm-s-paraiso-dark span.cm-atom,.cm-s-paraiso-dark span.cm-number{color:#815ba4}.cm-s-paraiso-dark span.cm-attribute,.cm-s-paraiso-dark span.cm-property{color:#48b685}.cm-s-paraiso-dark span.cm-keyword{color:#ef6155}.cm-s-paraiso-dark span.cm-string{color:#fec418}.cm-s-paraiso-dark span.cm-variable{color:#48b685}.cm-s-paraiso-dark span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-dark span.cm-def{color:#f99b15}.cm-s-paraiso-dark span.cm-bracket{color:#b9b6b0}.cm-s-paraiso-dark span.cm-tag{color:#ef6155}.cm-s-paraiso-dark span.cm-link{color:#815ba4}.cm-s-paraiso-dark span.cm-error{background:#ef6155;color:#8d8687}.cm-s-paraiso-dark .CodeMirror-activeline-background{background:#4D344A}.cm-s-paraiso-dark .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-paraiso-light.CodeMirror{background:#e7e9db;color:#41323f}.cm-s-paraiso-light .CodeMirror-line::selection,.cm-s-paraiso-light .CodeMirror-line>span::selection,.cm-s-paraiso-light .CodeMirror-line>span>span::selection,.cm-s-paraiso-light div.CodeMirror-selected{background:#b9b6b0}.cm-s-paraiso-light .CodeMirror-line::-moz-selection,.cm-s-paraiso-light .CodeMirror-line>span::-moz-selection,.cm-s-paraiso-light .CodeMirror-line>span>span::-moz-selection{background:#b9b6b0}.cm-s-paraiso-light .CodeMirror-gutters{background:#e7e9db;border-right:0}.cm-s-paraiso-light .CodeMirror-guttermarker{color:#000}.cm-s-paraiso-light .CodeMirror-guttermarker-subtle,.cm-s-paraiso-light .CodeMirror-linenumber{color:#8d8687}.cm-s-paraiso-light .CodeMirror-cursor{border-left:1px solid #776e71}.cm-s-paraiso-light span.cm-comment{color:#e96ba8}.cm-s-paraiso-light span.cm-atom,.cm-s-paraiso-light span.cm-number{color:#815ba4}.cm-s-paraiso-light span.cm-attribute,.cm-s-paraiso-light span.cm-property{color:#48b685}.cm-s-paraiso-light span.cm-keyword{color:#ef6155}.cm-s-paraiso-light span.cm-string{color:#fec418}.cm-s-paraiso-light span.cm-variable{color:#48b685}.cm-s-paraiso-light span.cm-variable-2{color:#06b6ef}.cm-s-paraiso-light span.cm-def{color:#f99b15}.cm-s-paraiso-light span.cm-bracket{color:#41323f}.cm-s-paraiso-light span.cm-tag{color:#ef6155}.cm-s-paraiso-light span.cm-link{color:#815ba4}.cm-s-paraiso-light span.cm-error{background:#ef6155;color:#776e71}.cm-s-paraiso-light .CodeMirror-activeline-background{background:#CFD1C4}.cm-s-paraiso-light .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-pastel-on-dark.CodeMirror{background:#2c2827;color:#8F938F;line-height:1.5;font-size:14px}.cm-s-pastel-on-dark .CodeMirror-line::selection,.cm-s-pastel-on-dark .CodeMirror-line>span::selection,.cm-s-pastel-on-dark .CodeMirror-line>span>span::selection,.cm-s-pastel-on-dark div.CodeMirror-selected{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark .CodeMirror-line::-moz-selection,.cm-s-pastel-on-dark .CodeMirror-line>span::-moz-selection,.cm-s-pastel-on-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(221,240,255,.2)}.cm-s-pastel-on-dark .CodeMirror-gutters{background:#34302f;border-right:0;padding:0 3px}.cm-s-pastel-on-dark .CodeMirror-guttermarker{color:#fff}.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle,.cm-s-pastel-on-dark .CodeMirror-linenumber{color:#8F938F}.cm-s-pastel-on-dark .CodeMirror-cursor{border-left:1px solid #A7A7A7}.cm-s-pastel-on-dark span.cm-comment{color:#A6C6FF}.cm-s-pastel-on-dark span.cm-atom{color:#DE8E30}.cm-s-pastel-on-dark span.cm-number{color:#CCC}.cm-s-pastel-on-dark span.cm-property{color:#8F938F}.cm-s-pastel-on-dark span.cm-attribute{color:#a6e22e}.cm-s-pastel-on-dark span.cm-keyword{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-string{color:#66A968}.cm-s-pastel-on-dark span.cm-variable{color:#AEB2F8}.cm-s-pastel-on-dark span.cm-variable-2{color:#BEBF55}.cm-s-pastel-on-dark span.cm-variable-3{color:#DE8E30}.cm-s-pastel-on-dark span.cm-def{color:#757aD8}.cm-s-pastel-on-dark span.cm-bracket{color:#f8f8f2}.cm-s-pastel-on-dark span.cm-tag{color:#C1C144}.cm-s-pastel-on-dark span.cm-link{color:#ae81ff}.cm-s-pastel-on-dark span.cm-builtin,.cm-s-pastel-on-dark span.cm-qualifier{color:#C1C144}.cm-s-pastel-on-dark span.cm-error{background:#757aD8;color:#f8f8f0}.cm-s-pastel-on-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.031)}.cm-s-pastel-on-dark .CodeMirror-matchingbracket{border:1px solid rgba(255,255,255,.25);color:#8F938F!important;margin:-1px -1px 0}.cm-s-railscasts.CodeMirror{background:#2b2b2b;color:#f4f1ed}.cm-s-railscasts div.CodeMirror-selected{background:#272935!important}.cm-s-railscasts .CodeMirror-gutters{background:#2b2b2b;border-right:0}.cm-s-railscasts .CodeMirror-linenumber{color:#5a647e}.cm-s-railscasts .CodeMirror-cursor{border-left:1px solid #d4cfc9!important}.cm-s-railscasts span.cm-comment{color:#bc9458}.cm-s-railscasts span.cm-atom,.cm-s-railscasts span.cm-number{color:#b6b3eb}.cm-s-railscasts span.cm-attribute,.cm-s-railscasts span.cm-property{color:#a5c261}.cm-s-railscasts span.cm-keyword{color:#da4939}.cm-s-railscasts span.cm-string{color:#ffc66d}.cm-s-railscasts span.cm-variable{color:#a5c261}.cm-s-railscasts span.cm-variable-2{color:#6d9cbe}.cm-s-railscasts span.cm-def{color:#cc7833}.cm-s-railscasts span.cm-error{background:#da4939;color:#d4cfc9}.cm-s-railscasts span.cm-bracket{color:#f4f1ed}.cm-s-railscasts span.cm-tag{color:#da4939}.cm-s-railscasts span.cm-link{color:#b6b3eb}.cm-s-railscasts .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-railscasts .CodeMirror-activeline-background{background:#303040}.cm-s-rubyblue.CodeMirror{background:#112435;color:#fff}.cm-s-rubyblue div.CodeMirror-selected{background:#38566F}.cm-s-rubyblue .CodeMirror-line::selection,.cm-s-rubyblue .CodeMirror-line>span::selection,.cm-s-rubyblue .CodeMirror-line>span>span::selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue .CodeMirror-line::-moz-selection,.cm-s-rubyblue .CodeMirror-line>span::-moz-selection,.cm-s-rubyblue .CodeMirror-line>span>span::-moz-selection{background:rgba(56,86,111,.99)}.cm-s-rubyblue .CodeMirror-gutters{background:#1F4661;border-right:7px solid #3E7087}.cm-s-rubyblue .CodeMirror-guttermarker{color:#fff}.cm-s-rubyblue .CodeMirror-guttermarker-subtle{color:#3E7087}.cm-s-rubyblue .CodeMirror-linenumber{color:#fff}.cm-s-rubyblue .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-rubyblue span.cm-comment{color:#999;font-style:italic;line-height:1em}.cm-s-rubyblue span.cm-atom{color:#F4C20B}.cm-s-rubyblue span.cm-attribute,.cm-s-rubyblue span.cm-number{color:#82C6E0}.cm-s-rubyblue span.cm-keyword{color:#F0F}.cm-s-rubyblue span.cm-string{color:#F08047}.cm-s-rubyblue span.cm-meta{color:#F0F}.cm-s-rubyblue span.cm-tag,.cm-s-rubyblue span.cm-variable-2{color:#7BD827}.cm-s-rubyblue span.cm-def,.cm-s-rubyblue span.cm-variable-3{color:#fff}.cm-s-rubyblue span.cm-bracket{color:#F0F}.cm-s-rubyblue span.cm-link{color:#F4C20B}.cm-s-rubyblue span.CodeMirror-matchingbracket{color:#F0F!important}.cm-s-rubyblue span.cm-builtin,.cm-s-rubyblue span.cm-special{color:#FF9D00}.cm-s-rubyblue span.cm-error{color:#AF2018}.cm-s-rubyblue .CodeMirror-activeline-background{background:#173047}.cm-s-seti.CodeMirror{background-color:#151718!important;color:#CFD2D1!important;border:none}.cm-s-seti .CodeMirror-gutters{color:#404b53;background-color:#0E1112;border:none}.cm-s-seti .CodeMirror-cursor{border-left:solid thin #f8f8f0}.cm-s-seti .CodeMirror-linenumber{color:#6D8A88}.cm-s-seti .CodeMirror-line::selection,.cm-s-seti .CodeMirror-line>span::selection,.cm-s-seti .CodeMirror-line>span>span::selection,.cm-s-seti.CodeMirror-focused div.CodeMirror-selected{background:rgba(255,255,255,.1)}.cm-s-seti .CodeMirror-line::-moz-selection,.cm-s-seti .CodeMirror-line>span::-moz-selection,.cm-s-seti .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,.1)}.cm-s-seti span.cm-comment{color:#41535b}.cm-s-seti span.cm-string,.cm-s-seti span.cm-string-2{color:#55b5db}.cm-s-seti span.cm-number{color:#cd3f45}.cm-s-seti span.cm-variable{color:#55b5db}.cm-s-seti span.cm-variable-2{color:#a074c4}.cm-s-seti span.cm-def{color:#55b5db}.cm-s-seti span.cm-operator{color:#9fca56}.cm-s-seti span.cm-keyword{color:#e6cd69}.cm-s-seti span.cm-atom{color:#cd3f45}.cm-s-seti span.cm-meta,.cm-s-seti span.cm-tag{color:#55b5db}.cm-s-seti span.cm-attribute,.cm-s-seti span.cm-qualifier{color:#9fca56}.cm-s-seti span.cm-property{color:#a074c4}.cm-s-seti span.cm-builtin,.cm-s-seti span.cm-variable-3{color:#9fca56}.cm-s-seti .CodeMirror-activeline-background{background:#101213}.cm-s-seti .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.solarized.base03{color:#002b36}.solarized.base02{color:#073642}.solarized.base01{color:#586e75}.solarized.base00{color:#657b83}.solarized.base0{color:#839496}.solarized.base1{color:#93a1a1}.solarized.base2{color:#eee8d5}.solarized.base3{color:#fdf6e3}.solarized.solar-yellow{color:#b58900}.solarized.solar-orange{color:#cb4b16}.solarized.solar-red{color:#dc322f}.solarized.solar-magenta{color:#d33682}.solarized.solar-violet{color:#6c71c4}.solarized.solar-blue{color:#268bd2}.solarized.solar-cyan{color:#2aa198}.solarized.solar-green{color:#859900}.cm-s-solarized{line-height:1.45em;color-profile:sRGB;rendering-intent:auto}.cm-s-solarized.cm-s-dark{color:#839496;background-color:#002b36;text-shadow:#002b36 0 1px}.cm-s-solarized.cm-s-light{background-color:#fdf6e3;color:#657b83;text-shadow:#eee8d5 0 1px}.cm-s-solarized .CodeMirror-widget{text-shadow:none}.cm-s-solarized .cm-header{color:#586e75}.cm-s-solarized .cm-quote{color:#93a1a1}.cm-s-solarized .cm-keyword{color:#cb4b16}.cm-s-solarized .cm-atom,.cm-s-solarized .cm-number{color:#d33682}.cm-s-solarized .cm-def{color:#2aa198}.cm-s-solarized .cm-variable{color:#839496}.cm-s-solarized .cm-variable-2{color:#b58900}.cm-s-solarized .cm-variable-3{color:#6c71c4}.cm-s-solarized .cm-property{color:#2aa198}.cm-s-solarized .cm-operator{color:#6c71c4}.cm-s-solarized .cm-comment{color:#586e75;font-style:italic}.cm-s-solarized .cm-string{color:#859900}.cm-s-solarized .cm-string-2{color:#b58900}.cm-s-solarized .cm-meta{color:#859900}.cm-s-solarized .cm-qualifier{color:#b58900}.cm-s-solarized .cm-builtin{color:#d33682}.cm-s-solarized .cm-bracket{color:#cb4b16}.cm-s-solarized .CodeMirror-matchingbracket{color:#859900}.cm-s-solarized .CodeMirror-nonmatchingbracket{color:#dc322f}.cm-s-solarized .cm-tag{color:#93a1a1}.cm-s-solarized .cm-attribute{color:#2aa198}.cm-s-solarized .cm-hr{color:transparent;border-top:1px solid #586e75;display:block}.cm-s-solarized .cm-link{color:#93a1a1;cursor:pointer}.cm-s-solarized .cm-special{color:#6c71c4}.cm-s-solarized .cm-em{color:#999;text-decoration:underline;text-decoration-style:dotted}.cm-s-solarized .cm-strong{color:#eee}.cm-s-solarized .cm-error,.cm-s-solarized .cm-invalidchar{color:#586e75;border-bottom:1px dotted #dc322f}.cm-s-solarized.cm-s-dark div.CodeMirror-selected{background:#073642}.cm-s-solarized.cm-s-dark.CodeMirror ::selection{background:rgba(7,54,66,.99)}.cm-s-dark .CodeMirror-line>span::-moz-selection,.cm-s-dark .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection{background:rgba(7,54,66,.99)}.cm-s-light .CodeMirror-line>span::selection,.cm-s-light .CodeMirror-line>span>span::selection,.cm-s-solarized.cm-s-light .CodeMirror-line::selection,.cm-s-solarized.cm-s-light div.CodeMirror-selected{background:#eee8d5}.cm-s-ligh .CodeMirror-line>span::-moz-selection,.cm-s-ligh .CodeMirror-line>span>span::-moz-selection,.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection{background:#eee8d5}.cm-s-solarized.CodeMirror{-moz-box-shadow:inset 7px 0 12px -6px #000;-webkit-box-shadow:inset 7px 0 12px -6px #000;box-shadow:inset 7px 0 12px -6px #000}.cm-s-solarized .CodeMirror-gutters{border-right:1px solid}.cm-s-solarized.cm-s-dark .CodeMirror-gutters{background-color:#002b36;border-color:#00232c}.cm-s-solarized.cm-s-dark .CodeMirror-linenumber{text-shadow:#021014 0 -1px}.cm-s-solarized.cm-s-light .CodeMirror-gutters{background-color:#fdf6e3;border-color:#eee8d5}.cm-s-twilight .cm-error,.cm-s-vibrant-ink .cm-error{border-bottom:1px solid red}.cm-s-solarized .CodeMirror-linenumber{color:#586e75;padding:0 5px}.cm-s-solarized .CodeMirror-guttermarker-subtle{color:#586e75}.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker{color:#ddd}.cm-s-solarized.cm-s-light .CodeMirror-guttermarker{color:#cb4b16}.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text{color:#586e75}.cm-s-solarized .CodeMirror-cursor{border-left:1px solid #819090}.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background{background:rgba(255,255,255,.1)}.cm-s-solarized.cm-s-light .CodeMirror-activeline-background{background:rgba(0,0,0,.1)}.cm-s-the-matrix.CodeMirror{background:#000;color:#0F0}.cm-s-the-matrix div.CodeMirror-selected{background:#2D2D2D}.cm-s-the-matrix .CodeMirror-line::selection,.cm-s-the-matrix .CodeMirror-line>span::selection,.cm-s-the-matrix .CodeMirror-line>span>span::selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix .CodeMirror-line::-moz-selection,.cm-s-the-matrix .CodeMirror-line>span::-moz-selection,.cm-s-the-matrix .CodeMirror-line>span>span::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-the-matrix .CodeMirror-gutters{background:#060;border-right:2px solid #0F0}.cm-s-the-matrix .CodeMirror-guttermarker{color:#0f0}.cm-s-the-matrix .CodeMirror-guttermarker-subtle{color:#fff}.cm-s-the-matrix .CodeMirror-linenumber{color:#FFF}.cm-s-the-matrix .CodeMirror-cursor{border-left:1px solid #0F0}.cm-s-tomorrow-night-bright .CodeMirror-cursor,.cm-s-tomorrow-night-eighties .CodeMirror-cursor{border-left:1px solid #6A6A6A}.cm-s-the-matrix span.cm-keyword{color:#008803;font-weight:700}.cm-s-the-matrix span.cm-atom{color:#3FF}.cm-s-the-matrix span.cm-number{color:#FFB94F}.cm-s-the-matrix span.cm-def{color:#99C}.cm-s-the-matrix span.cm-variable{color:#F6C}.cm-s-the-matrix span.cm-variable-2{color:#C6F}.cm-s-the-matrix span.cm-variable-3{color:#96F}.cm-s-the-matrix span.cm-property{color:#62FFA0}.cm-s-the-matrix span.cm-operator{color:#999}.cm-s-the-matrix span.cm-comment{color:#CCC}.cm-s-the-matrix span.cm-string{color:#39C}.cm-s-the-matrix span.cm-meta{color:#C9F}.cm-s-the-matrix span.cm-qualifier{color:#FFF700}.cm-s-the-matrix span.cm-builtin{color:#30a}.cm-s-the-matrix span.cm-bracket{color:#cc7}.cm-s-the-matrix span.cm-tag{color:#FFBD40}.cm-s-the-matrix span.cm-attribute{color:#FFF700}.cm-s-the-matrix span.cm-error{color:red}.cm-s-the-matrix .CodeMirror-activeline-background{background:#040}.cm-s-tomorrow-night-bright.CodeMirror{background:#000;color:#eaeaea}.cm-s-tomorrow-night-bright div.CodeMirror-selected{background:#424242}.cm-s-tomorrow-night-bright .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker{color:#e78c45}.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-bright .CodeMirror-linenumber{color:#424242}.cm-s-tomorrow-night-bright span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-bright span.cm-atom,.cm-s-tomorrow-night-bright span.cm-number{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-attribute,.cm-s-tomorrow-night-bright span.cm-property{color:#9c9}.cm-s-tomorrow-night-bright span.cm-keyword{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-string{color:#e7c547}.cm-s-tomorrow-night-bright span.cm-variable{color:#b9ca4a}.cm-s-tomorrow-night-bright span.cm-variable-2{color:#7aa6da}.cm-s-tomorrow-night-bright span.cm-def{color:#e78c45}.cm-s-tomorrow-night-bright span.cm-bracket{color:#eaeaea}.cm-s-tomorrow-night-bright span.cm-tag{color:#d54e53}.cm-s-tomorrow-night-bright span.cm-link{color:#a16a94}.cm-s-tomorrow-night-bright span.cm-error{background:#d54e53;color:#6A6A6A}.cm-s-tomorrow-night-bright .CodeMirror-activeline-background{background:#2a2a2a}.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-tomorrow-night-eighties.CodeMirror{background:#000;color:#CCC}.cm-s-tomorrow-night-eighties div.CodeMirror-selected{background:#2D2D2D}.cm-s-tomorrow-night-eighties .CodeMirror-line::selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span::selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span>span::selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span::-moz-selection,.cm-s-tomorrow-night-eighties .CodeMirror-line>span>span::-moz-selection{background:rgba(45,45,45,.99)}.cm-s-tomorrow-night-eighties .CodeMirror-gutters{background:#000;border-right:0}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker{color:#f2777a}.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle{color:#777}.cm-s-tomorrow-night-eighties .CodeMirror-linenumber{color:#515151}.cm-s-twilight .CodeMirror-cursor,.cm-s-vibrant-ink .CodeMirror-cursor,.cm-s-xq-dark .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-tomorrow-night-eighties span.cm-comment{color:#d27b53}.cm-s-tomorrow-night-eighties span.cm-atom,.cm-s-tomorrow-night-eighties span.cm-number{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-attribute,.cm-s-tomorrow-night-eighties span.cm-property{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-keyword{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-string{color:#fc6}.cm-s-tomorrow-night-eighties span.cm-variable{color:#9c9}.cm-s-tomorrow-night-eighties span.cm-variable-2{color:#69c}.cm-s-tomorrow-night-eighties span.cm-def{color:#f99157}.cm-s-tomorrow-night-eighties span.cm-bracket{color:#CCC}.cm-s-tomorrow-night-eighties span.cm-tag{color:#f2777a}.cm-s-tomorrow-night-eighties span.cm-link{color:#a16a94}.cm-s-tomorrow-night-eighties span.cm-error{background:#f2777a;color:#6A6A6A}.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background{background:#343600}.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}.cm-s-ttcn .cm-quote{color:#090}.cm-s-ttcn .cm-header,.cm-strong{font-weight:700}.cm-s-ttcn .cm-header{color:#00f;font-weight:700}.cm-s-ttcn .cm-atom{color:#219}.cm-s-ttcn .cm-attribute{color:#00c}.cm-s-ttcn .cm-bracket{color:#997}.cm-s-ttcn .cm-comment{color:#333}.cm-s-ttcn .cm-def{color:#00f}.cm-s-ttcn .cm-em{font-style:italic}.cm-s-ttcn .cm-error{color:red}.cm-s-ttcn .cm-hr{color:#999}.cm-s-ttcn .cm-keyword{font-weight:700}.cm-s-ttcn .cm-link{color:#00c;text-decoration:underline}.cm-s-ttcn .cm-meta{color:#555}.cm-s-ttcn .cm-negative{color:#d44}.cm-s-ttcn .cm-positive{color:#292}.cm-s-ttcn .cm-qualifier{color:#555}.cm-s-ttcn .cm-strikethrough{text-decoration:line-through}.cm-s-ttcn .cm-string{color:#006400}.cm-s-ttcn .cm-string-2{color:#f50}.cm-s-ttcn .cm-strong{font-weight:700}.cm-s-ttcn .cm-tag{color:#170}.cm-s-ttcn .cm-variable{color:#8B2252}.cm-s-ttcn .cm-variable-2{color:#05a}.cm-s-ttcn .cm-variable-3{color:#085}.cm-s-ttcn .cm-invalidchar{color:red}.cm-s-ttcn .cm-accessTypes,.cm-s-ttcn .cm-compareTypes{color:#27408B}.cm-s-ttcn .cm-cmipVerbs{color:#8B2252}.cm-s-ttcn .cm-modifier{color:#D2691E}.cm-s-ttcn .cm-status{color:#8B4545}.cm-s-ttcn .cm-storage{color:#A020F0}.cm-s-ttcn .cm-tags{color:#006400}.cm-s-ttcn .cm-externalCommands{color:#8B4545;font-weight:700}.cm-s-ttcn .cm-fileNCtrlMaskOptions,.cm-s-ttcn .cm-sectionTitle{color:#2E8B57;font-weight:700}.cm-s-ttcn .cm-booleanConsts,.cm-s-ttcn .cm-otherConsts,.cm-s-ttcn .cm-verdictConsts{color:#006400}.cm-s-ttcn .cm-configOps,.cm-s-ttcn .cm-functionOps,.cm-s-ttcn .cm-portOps,.cm-s-ttcn .cm-sutOps,.cm-s-ttcn .cm-timerOps,.cm-s-ttcn .cm-verdictOps{color:#00F}.cm-s-ttcn .cm-preprocessor,.cm-s-ttcn .cm-templateMatch,.cm-s-ttcn .cm-ttcn3Macros{color:#27408B}.cm-s-ttcn .cm-types{color:brown;font-weight:700}.cm-s-ttcn .cm-visibilityModifiers{font-weight:700}.cm-s-twilight.CodeMirror{background:#141414;color:#f7f7f7}.cm-s-twilight div.CodeMirror-selected{background:#323232}.cm-s-twilight .CodeMirror-line::selection,.cm-s-twilight .CodeMirror-line>span::selection,.cm-s-twilight .CodeMirror-line>span>span::selection{background:rgba(50,50,50,.99)}.cm-s-twilight .CodeMirror-line::-moz-selection,.cm-s-twilight .CodeMirror-line>span::-moz-selection,.cm-s-twilight .CodeMirror-line>span>span::-moz-selection{background:rgba(50,50,50,.99)}.cm-s-twilight .CodeMirror-gutters{background:#222;border-right:1px solid #aaa}.cm-s-twilight .CodeMirror-guttermarker{color:#fff}.cm-s-twilight .CodeMirror-guttermarker-subtle,.cm-s-twilight .CodeMirror-linenumber{color:#aaa}.cm-s-twilight .cm-keyword{color:#f9ee98}.cm-s-twilight .cm-atom{color:#FC0}.cm-s-twilight .cm-number{color:#ca7841}.cm-s-twilight .cm-def{color:#8DA6CE}.cm-s-twilight span.cm-def,.cm-s-twilight span.cm-tag,.cm-s-twilight span.cm-variable-2,.cm-s-twilight span.cm-variable-3{color:#607392}.cm-s-twilight .cm-operator{color:#cda869}.cm-s-twilight .cm-comment{color:#777;font-style:italic;font-weight:400}.cm-s-twilight .cm-string{color:#8f9d6a;font-style:italic}.cm-s-twilight .cm-string-2{color:#bd6b18}.cm-s-twilight .cm-meta{background-color:#141414;color:#f7f7f7}.cm-s-twilight .cm-builtin{color:#cda869}.cm-s-twilight .cm-tag{color:#997643}.cm-s-twilight .cm-attribute{color:#d6bb6d}.cm-s-twilight .cm-header{color:#FF6400}.cm-s-twilight .cm-hr{color:#AEAEAE}.cm-s-twilight .cm-link{color:#ad9361;font-style:italic;text-decoration:none}.cm-s-xq-dark span.cm-def,.cm-s-xq-light span.cm-def,.cm-s-yeti .CodeMirror-matchingbracket{text-decoration:underline}.cm-s-twilight .CodeMirror-activeline-background{background:#27282E}.cm-s-twilight .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-vibrant-ink.CodeMirror{background:#000;color:#fff}.cm-s-vibrant-ink div.CodeMirror-selected{background:#35493c}.cm-s-vibrant-ink .CodeMirror-line::selection,.cm-s-vibrant-ink .CodeMirror-line>span::selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-line::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::-moz-selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-vibrant-ink .CodeMirror-guttermarker{color:#fff}.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber{color:#d0d0d0}.cm-s-vibrant-ink .cm-keyword{color:#CC7832}.cm-s-vibrant-ink .cm-atom{color:#FC0}.cm-s-vibrant-ink .cm-number{color:#FFEE98}.cm-s-vibrant-ink .cm-def{color:#8DA6CE}.cm-s-vibrant span.cm-def,.cm-s-vibrant span.cm-tag,.cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant-ink span.cm-variable-3{color:#FFC66D}.cm-s-vibrant-ink .cm-operator{color:#888}.cm-s-vibrant-ink .cm-comment{color:gray;font-weight:700}.cm-s-vibrant-ink .cm-string{color:#A5C25C}.cm-s-vibrant-ink .cm-string-2{color:red}.cm-s-vibrant-ink .cm-meta{color:#D8FA3C}.cm-s-vibrant-ink .cm-attribute,.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag{color:#8DA6CE}.cm-s-vibrant-ink .cm-header{color:#FF6400}.cm-s-vibrant-ink .cm-hr{color:#AEAEAE}.cm-s-vibrant-ink .cm-link{color:#00f}.cm-s-vibrant-ink .CodeMirror-activeline-background{background:#27282E}.cm-s-vibrant-ink .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-xq-dark.CodeMirror{background:#0a001f;color:#f8f8f8}.cm-s-xq-dark div.CodeMirror-selected{background:#27007A}.cm-s-xq-dark .CodeMirror-line::selection,.cm-s-xq-dark .CodeMirror-line>span::selection,.cm-s-xq-dark .CodeMirror-line>span>span::selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark .CodeMirror-line::-moz-selection,.cm-s-xq-dark .CodeMirror-line>span::-moz-selection,.cm-s-xq-dark .CodeMirror-line>span>span::-moz-selection{background:rgba(39,0,122,.99)}.cm-s-xq-dark .CodeMirror-gutters{background:#0a001f;border-right:1px solid #aaa}.cm-s-xq-dark .CodeMirror-guttermarker{color:#FFBD40}.cm-s-xq-dark .CodeMirror-guttermarker-subtle,.cm-s-xq-dark .CodeMirror-linenumber{color:#f8f8f8}.cm-s-xq-dark span.cm-keyword{color:#FFBD40}.cm-s-xq-dark span.cm-atom{color:#6C8CD5}.cm-s-xq-dark span.cm-number{color:#164}.cm-s-xq-dark span.cm-def,.cm-s-xq-dark span.cm-variable{color:#FFF}.cm-s-xq-dark span.cm-variable-2{color:#EEE}.cm-s-xq-dark span.cm-variable-3{color:#DDD}.cm-s-xq-dark span.cm-comment{color:gray}.cm-s-xq-dark span.cm-string{color:#9FEE00}.cm-s-xq-dark span.cm-meta{color:#ff0}.cm-s-xq-dark span.cm-qualifier{color:#FFF700}.cm-s-xq-dark span.cm-builtin{color:#30a}.cm-s-xq-dark span.cm-bracket{color:#cc7}.cm-s-xq-dark span.cm-tag{color:#FFBD40}.cm-s-xq-dark span.cm-attribute{color:#FFF700}.cm-s-xq-dark span.cm-error{color:red}.cm-s-xq-dark .CodeMirror-activeline-background{background:#27282E}.cm-s-xq-dark .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}.cm-s-xq-light span.cm-keyword{line-height:1em;font-weight:700;color:#5A5CAD}.cm-s-xq-light span.cm-atom{color:#6C8CD5}.cm-s-xq-light span.cm-number{color:#164}.cm-s-xq-light span.cm-variable,.cm-s-xq-light span.cm-variable-2,.cm-s-xq-light span.cm-variable-3{color:#000}.cm-s-xq-light span.cm-comment{color:#0080FF;font-style:italic}.cm-s-xq-light span.cm-string{color:red}.cm-s-xq-light span.cm-meta{color:#ff0}.cm-s-xq-light span.cm-qualifier{color:grey}.cm-s-xq-light span.cm-builtin{color:#7EA656}.cm-s-xq-light span.cm-bracket{color:#cc7}.cm-s-xq-light span.cm-tag{color:#3F7F7F}.cm-s-xq-light span.cm-attribute{color:#7F007F}.cm-s-xq-light span.cm-error{color:red}.cm-s-xq-light .CodeMirror-activeline-background{background:#e8f2ff}.cm-s-xq-light .CodeMirror-matchingbracket{outline:grey solid 1px;color:#000!important;background:#ff0}.cm-s-yeti.CodeMirror{background-color:#ECEAE8!important;color:#d1c9c0!important;border:none}.cm-s-yeti .CodeMirror-gutters{color:#adaba6;background-color:#E5E1DB;border:none}.cm-s-yeti .CodeMirror-cursor{border-left:solid thin #d1c9c0}.cm-s-yeti .CodeMirror-linenumber{color:#adaba6}.cm-s-yeti .CodeMirror-line::selection,.cm-s-yeti .CodeMirror-line>span::selection,.cm-s-yeti .CodeMirror-line>span>span::selection,.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected{background:#DCD8D2}.cm-s-yeti .CodeMirror-line::-moz-selection,.cm-s-yeti .CodeMirror-line>span::-moz-selection,.cm-s-yeti .CodeMirror-line>span>span::-moz-selection{background:#DCD8D2}.cm-s-yeti span.cm-comment{color:#d4c8be}.cm-s-yeti span.cm-string,.cm-s-yeti span.cm-string-2{color:#96c0d8}.cm-s-yeti span.cm-number{color:#a074c4}.cm-s-yeti span.cm-variable{color:#55b5db}.cm-s-yeti span.cm-variable-2{color:#a074c4}.cm-s-yeti span.cm-def{color:#55b5db}.cm-s-yeti span.cm-keyword,.cm-s-yeti span.cm-operator{color:#9fb96e}.cm-s-yeti span.cm-atom{color:#a074c4}.cm-s-yeti span.cm-meta,.cm-s-yeti span.cm-tag{color:#96c0d8}.cm-s-yeti span.cm-attribute{color:#9fb96e}.cm-s-yeti span.cm-qualifier{color:#96c0d8}.cm-s-yeti span.cm-builtin,.cm-s-yeti span.cm-property{color:#a074c4}.cm-s-yeti span.cm-variable-3{color:#96c0d8}.cm-s-yeti .CodeMirror-activeline-background{background:#E7E4E0}.cm-s-zenburn .CodeMirror-gutters{background:#3f3f3f!important}.CodeMirror-foldgutter-folded,.cm-s-zenburn .CodeMirror-foldgutter-open{color:#999}.cm-s-zenburn .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-zenburn{background-color:#3f3f3f;color:#dcdccc}.cm-s-zenburn span.cm-builtin{color:#dcdccc;font-weight:700}.cm-s-zenburn span.cm-comment{color:#7f9f7f}.cm-s-zenburn span.cm-keyword{color:#f0dfaf;font-weight:700}.cm-s-zenburn span.cm-atom{color:#bfebbf}.cm-s-zenburn span.cm-def{color:#dcdccc}.cm-s-zenburn span.cm-variable{color:#dfaf8f}.cm-s-zenburn span.cm-variable-2{color:#dcdccc}.cm-s-zenburn span.cm-string,.cm-s-zenburn span.cm-string-2{color:#cc9393}.cm-s-zenburn span.cm-number{color:#dcdccc}.cm-s-zenburn span.cm-tag{color:#93e0e3}.cm-s-zenburn span.cm-attribute,.cm-s-zenburn span.cm-property{color:#dfaf8f}.cm-s-zenburn span.cm-qualifier{color:#7cb8bb}.cm-s-zenburn span.cm-meta{color:#f0dfaf}.cm-s-zenburn span.cm-header,.cm-s-zenburn span.cm-operator{color:#f0efd0}.cm-s-zenburn span.CodeMirror-matchingbracket{box-sizing:border-box;background:0 0;border-bottom:1px solid}.cm-s-zenburn span.CodeMirror-nonmatchingbracket{border-bottom:1px solid;background:0 0}.cm-s-zenburn .CodeMirror-activeline,.cm-s-zenburn .CodeMirror-activeline-background{background:#000}.cm-s-zenburn div.CodeMirror-selected{background:#545454}.cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected{background:#4f4f4f}
|
lib/codemirror.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(a){if("object"==typeof exports&&"object"==typeof module)module.exports=a();else{if("function"==typeof define&&define.amd)return define([],a);(this||window).CodeMirror=a()}}(function(){"use strict";function a(c,d){if(!(this instanceof a))return new a(c,d);this.options=d=d?Ke(d):{},Ke(_f,d,!1),n(d);var e=d.value;"string"==typeof e&&(e=new xg(e,d.mode,null,d.lineSeparator)),this.doc=e;var f=new a.inputStyles[d.inputStyle](this),g=this.display=new b(c,e,f);g.wrapper.CodeMirror=this,j(this),h(this),d.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),d.autofocus&&!Cf&&g.input.focus(),r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new De,keySeq:null,specialChars:null};var i=this;sf&&11>tf&&setTimeout(function(){i.display.input.reset(!0)},20),Qb(this),We(),ub(this),this.curOp.forceUpdate=!0,Xd(this,e),d.autofocus&&!Cf||i.hasFocus()?setTimeout(Le(qc,this),20):rc(this);for(var k in ag)ag.hasOwnProperty(k)&&ag[k](this,d[k],bg);w(this),d.finishInit&&d.finishInit(this);for(var l=0;l<fg.length;++l)fg[l](this);wb(this),uf&&d.lineWrapping&&"optimizelegibility"==getComputedStyle(g.lineDiv).textRendering&&(g.lineDiv.style.textRendering="auto")}function b(a,b,c){var d=this;this.input=c,d.scrollbarFiller=Pe("div",null,"CodeMirror-scrollbar-filler"),d.scrollbarFiller.setAttribute("cm-not-content","true"),d.gutterFiller=Pe("div",null,"CodeMirror-gutter-filler"),d.gutterFiller.setAttribute("cm-not-content","true"),d.lineDiv=Pe("div",null,"CodeMirror-code"),d.selectionDiv=Pe("div",null,null,"position: relative; z-index: 1"),d.cursorDiv=Pe("div",null,"CodeMirror-cursors"),d.measure=Pe("div",null,"CodeMirror-measure"),d.lineMeasure=Pe("div",null,"CodeMirror-measure"),d.lineSpace=Pe("div",[d.measure,d.lineMeasure,d.selectionDiv,d.cursorDiv,d.lineDiv],null,"position: relative; outline: none"),d.mover=Pe("div",[Pe("div",[d.lineSpace],"CodeMirror-lines")],null,"position: relative"),d.sizer=Pe("div",[d.mover],"CodeMirror-sizer"),d.sizerWidth=null,d.heightForcer=Pe("div",null,null,"position: absolute; height: "+Ig+"px; width: 1px;"),d.gutters=Pe("div",null,"CodeMirror-gutters"),d.lineGutter=null,d.scroller=Pe("div",[d.sizer,d.heightForcer,d.gutters],"CodeMirror-scroll"),d.scroller.setAttribute("tabIndex","-1"),d.wrapper=Pe("div",[d.scrollbarFiller,d.gutterFiller,d.scroller],"CodeMirror"),sf&&8>tf&&(d.gutters.style.zIndex=-1,d.scroller.style.paddingRight=0),uf||pf&&Cf||(d.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(d.wrapper):a(d.wrapper)),d.viewFrom=d.viewTo=b.first,d.reportedViewFrom=d.reportedViewTo=b.first,d.view=[],d.renderedView=null,d.externalMeasured=null,d.viewOffset=0,d.lastWrapHeight=d.lastWrapWidth=0,d.updateLineNumbers=null,d.nativeBarWidth=d.barHeight=d.barWidth=0,d.scrollbarsClipped=!1,d.lineNumWidth=d.lineNumInnerWidth=d.lineNumChars=null,d.alignWidgets=!1,d.cachedCharWidth=d.cachedTextHeight=d.cachedPaddingH=null,d.maxLine=null,d.maxLineLength=0,d.maxLineChanged=!1,d.wheelDX=d.wheelDY=d.wheelStartX=d.wheelStartY=null,d.shift=!1,d.selForContextMenu=null,d.activeTouch=null,c.init(d)}function c(b){b.doc.mode=a.getMode(b.options,b.doc.modeOption),d(b)}function d(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null)}),a.doc.frontier=a.doc.first,Na(a,100),a.state.modeGen++,a.curOp&&Jb(a)}function e(a){a.options.lineWrapping?(Zg(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Yg(a.display.wrapper,"CodeMirror-wrap"),m(a)),g(a),Jb(a),hb(a),setTimeout(function(){s(a)},100)}function f(a){var b=sb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/tb(a.display)-3);return function(e){if(vd(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function g(a){var b=a.doc,c=f(a);b.iter(function(a){var b=c(a);b!=a.height&&_d(a,b)})}function h(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hb(a)}function i(a){j(a),Jb(a),setTimeout(function(){v(a)},20)}function j(a){var b=a.display.gutters,c=a.options.gutters;Qe(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(Pe("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",k(a)}function k(a){var b=a.display.gutters.offsetWidth;a.display.sizer.style.marginLeft=b+"px"}function l(a){if(0==a.height)return 0;for(var b,c=a.text.length,d=a;b=od(d);){var e=b.find(0,!0);d=e.from.line,c+=e.from.ch-e.to.ch}for(d=a;b=pd(d);){var e=b.find(0,!0);c-=d.text.length-e.from.ch,d=e.to.line,c+=d.text.length-e.to.ch}return c}function m(a){var b=a.display,c=a.doc;b.maxLine=Yd(c,c.first),b.maxLineLength=l(b.maxLine),b.maxLineChanged=!0,c.iter(function(a){var c=l(a);c>b.maxLineLength&&(b.maxLineLength=c,b.maxLine=a)})}function n(a){var b=Ge(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):b>-1&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function o(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Sa(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Ua(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function p(a,b,c){this.cm=c;var d=this.vert=Pe("div",[Pe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=Pe("div",[Pe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d),a(e),Dg(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")}),Dg(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,sf&&8>tf&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function q(){}function r(b){b.display.scrollbars&&(b.display.scrollbars.clear(),b.display.scrollbars.addClass&&Yg(b.display.wrapper,b.display.scrollbars.addClass)),b.display.scrollbars=new a.scrollbarModel[b.options.scrollbarStyle](function(a){b.display.wrapper.insertBefore(a,b.display.scrollbarFiller),Dg(a,"mousedown",function(){b.state.focused&&setTimeout(function(){b.display.input.focus()},0)}),a.setAttribute("cm-not-content","true")},function(a,c){"horizontal"==c?ec(b,a):dc(b,a)},b),b.display.scrollbars.addClass&&Zg(b.display.wrapper,b.display.scrollbars.addClass)}function s(a,b){b||(b=o(a));var c=a.display.barWidth,d=a.display.barHeight;t(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&F(a),t(a,o(a)),c=a.display.barWidth,d=a.display.barHeight}function t(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px",c.heightForcer.style.borderBottom=d.bottom+"px solid transparent",d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="",d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function u(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-Ra(a));var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,f=be(b,d),g=be(b,e);if(c&&c.ensure){var h=c.ensure.from.line,i=c.ensure.to.line;f>h?(f=h,g=be(b,ce(Yd(b,h))+a.wrapper.clientHeight)):Math.min(i,b.lastLine())>=g&&(f=be(b,ce(Yd(b,i))-a.wrapper.clientHeight),g=i)}return{from:f,to:Math.max(g,f+1)}}function v(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=y(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=f);var h=c[g].alignable;if(h)for(var i=0;i<h.length;i++)h[i].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function w(a){if(!a.options.lineNumbers)return!1;var b=a.doc,c=x(a.options,b.first+b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(Pe("div",[Pe("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g)+1,d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",k(a),!0}return!1}function x(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function y(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function z(a,b,c){var d=a.display;this.viewport=b,this.visible=u(d,a.doc,b),this.editorIsHidden=!d.wrapper.offsetWidth,this.wrapperHeight=d.wrapper.clientHeight,this.wrapperWidth=d.wrapper.clientWidth,this.oldDisplayWidth=Va(a),this.force=c,this.dims=H(a),this.events=[]}function A(a){var b=a.display;!b.scrollbarsClipped&&b.scroller.offsetWidth&&(b.nativeBarWidth=b.scroller.offsetWidth-b.scroller.clientWidth,b.heightForcer.style.height=Ua(a)+"px",b.sizer.style.marginBottom=-b.nativeBarWidth+"px",b.sizer.style.borderRightWidth=Ua(a)+"px",b.scrollbarsClipped=!0)}function B(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return Lb(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Pb(a))return!1;w(a)&&(Lb(a),b.dims=H(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&f-c.viewFrom<20&&(f=Math.max(d.first,c.viewFrom)),c.viewTo>g&&c.viewTo-g<20&&(g=Math.min(e,c.viewTo)),Kf&&(f=td(a.doc,f),g=ud(a.doc,g));var h=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;Ob(a,f,g),c.viewOffset=ce(Yd(a.doc,c.viewFrom)),a.display.mover.style.top=c.viewOffset+"px";var i=Pb(a);if(!h&&0==i&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;var j=Se();return i>4&&(c.lineDiv.style.display="none"),I(a,c.updateLineNumbers,b.dims),i>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,j&&Se()!=j&&j.offsetHeight&&j.focus(),Qe(c.cursorDiv),Qe(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,h&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Na(a,400)),c.updateLineNumbers=null,!0}function C(a,b){for(var c=b.viewport,d=!0;(d&&a.options.lineWrapping&&b.oldDisplayWidth!=Va(a)||(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Sa(a.display)-Wa(a),c.top)}),b.visible=u(a.display,a.doc,c),!(b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)))&&B(a,b);d=!1){F(a);var e=o(a);Ia(a),s(a,e),E(a,e)}b.signal(a,"update",a),a.display.viewFrom==a.display.reportedViewFrom&&a.display.viewTo==a.display.reportedViewTo||(b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function D(a,b){var c=new z(a,b);if(B(a,c)){F(a),C(a,c);var d=o(a);Ia(a),s(a,d),E(a,d),c.finish()}}function E(a,b){a.display.sizer.style.minHeight=b.docHeight+"px",a.display.heightForcer.style.top=b.docHeight+"px",a.display.gutters.style.height=b.docHeight+a.display.barHeight+Ua(a)+"px"}function F(a){for(var b=a.display,c=b.lineDiv.offsetTop,d=0;d<b.view.length;d++){var e,f=b.view[d];if(!f.hidden){if(sf&&8>tf){var g=f.node.offsetTop+f.node.offsetHeight;e=g-c,c=g}else{var h=f.node.getBoundingClientRect();e=h.bottom-h.top}var i=f.line.height-e;if(2>e&&(e=sb(b)),(i>.001||-.001>i)&&(_d(f.line,e),G(f.line),f.rest))for(var j=0;j<f.rest.length;j++)G(f.rest[j])}}}function G(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.parentNode.offsetHeight}function H(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:y(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function I(a,b,c){function d(b){var c=b.nextSibling;return uf&&Df&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b),c}for(var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,i=e.view,j=e.viewFrom,k=0;k<i.length;k++){var l=i[k];if(l.hidden);else if(l.node&&l.node.parentNode==g){for(;h!=l.node;)h=d(h);var m=f&&null!=b&&j>=b&&l.lineNumber;l.changes&&(Ge(l.changes,"gutter")>-1&&(m=!1),J(a,l,j,c)),m&&(Qe(l.lineNumber),l.lineNumber.appendChild(document.createTextNode(x(a.options,j)))),h=l.node.nextSibling}else{var n=R(a,l,j,c);g.insertBefore(n,h)}j+=l.size}for(;h;)h=d(h)}function J(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];"text"==f?N(a,b):"gutter"==f?P(a,b,c,d):"class"==f?O(b):"widget"==f&&Q(a,b,d)}b.changes=null}function K(a){return a.node==a.text&&(a.node=Pe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),sf&&8>tf&&(a.node.style.zIndex=2)),a.node}function L(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;if(b&&(b+=" CodeMirror-linebackground"),a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),a.background=null);else if(b){var c=K(a);a.background=c.insertBefore(Pe("div",null,b),c.firstChild)}}function M(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Ld(a,b)}function N(a,b){var c=b.text.className,d=M(a,b);b.text==b.node&&(b.node=d.pre),b.text.parentNode.replaceChild(d.pre,b.text),b.text=d.pre,d.bgClass!=b.bgClass||d.textClass!=b.textClass?(b.bgClass=d.bgClass,b.textClass=d.textClass,O(b)):c&&(b.text.className=c)}function O(a){L(a),a.line.wrapClass?K(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");var b=a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass;a.text.className=b||""}function P(a,b,c,d){if(b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null),b.gutterBackground&&(b.node.removeChild(b.gutterBackground),b.gutterBackground=null),b.line.gutterClass){var e=K(b);b.gutterBackground=Pe("div",null,"CodeMirror-gutter-background "+b.line.gutterClass,"left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px"),e.insertBefore(b.gutterBackground,b.text)}var f=b.line.gutterMarkers;if(a.options.lineNumbers||f){var e=K(b),g=b.gutter=Pe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px");if(a.display.input.setUneditable(g),e.insertBefore(g,b.text),b.line.gutterClass&&(g.className+=" "+b.line.gutterClass),!a.options.lineNumbers||f&&f["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(Pe("div",x(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),f)for(var h=0;h<a.options.gutters.length;++h){var i=a.options.gutters[h],j=f.hasOwnProperty(i)&&f[i];j&&g.appendChild(Pe("div",[j],"CodeMirror-gutter-elt","left: "+d.gutterLeft[i]+"px; width: "+d.gutterWidth[i]+"px"))}}}function Q(a,b,c){b.alignable&&(b.alignable=null);for(var d,e=b.node.firstChild;e;e=d){var d=e.nextSibling;"CodeMirror-linewidget"==e.className&&b.node.removeChild(e)}S(a,b,c)}function R(a,b,c,d){var e=M(a,b);return b.text=b.node=e.pre,e.bgClass&&(b.bgClass=e.bgClass),e.textClass&&(b.textClass=e.textClass),O(b),P(a,b,c,d),S(a,b,d),b.node}function S(a,b,c){if(T(a,b.line,b,c,!0),b.rest)for(var d=0;d<b.rest.length;d++)T(a,b.rest[d],b,c,!1)}function T(a,b,c,d,e){if(b.widgets)for(var f=K(c),g=0,h=b.widgets;g<h.length;++g){var i=h[g],j=Pe("div",[i.node],"CodeMirror-linewidget");i.handleMouseEvents||j.setAttribute("cm-ignore-events","true"),U(i,j,c,d),a.display.input.setUneditable(j),e&&i.above?f.insertBefore(j,c.gutter||c.text):f.appendChild(j),xe(i,"redraw")}}function U(a,b,c,d){if(a.noHScroll){(c.alignable||(c.alignable=[])).push(b);var e=d.wrapperWidth;b.style.left=d.fixedPos+"px",a.coverGutter||(e-=d.gutterTotalWidth,b.style.paddingLeft=d.gutterTotalWidth+"px"),b.style.width=e+"px"}a.coverGutter&&(b.style.zIndex=5,b.style.position="relative",a.noHScroll||(b.style.marginLeft=-d.gutterTotalWidth+"px"))}function V(a){return Lf(a.line,a.ch)}function W(a,b){return Mf(a,b)<0?b:a}function X(a,b){return Mf(a,b)<0?a:b}function Y(a){a.state.focused||(a.display.input.focus(),qc(a))}function Z(a,b,c,d,e){var f=a.doc;a.display.shift=!1,d||(d=f.sel);var g=a.state.pasteIncoming||"paste"==e,h=f.splitLines(b),i=null;if(g&&d.ranges.length>1)if(Nf&&Nf.text.join("\n")==b){if(d.ranges.length%Nf.text.length==0){i=[];for(var j=0;j<Nf.text.length;j++)i.push(f.splitLines(Nf.text[j]))}}else h.length==d.ranges.length&&(i=He(h,function(a){return[a]}));for(var j=d.ranges.length-1;j>=0;j--){var k=d.ranges[j],l=k.from(),m=k.to();k.empty()&&(c&&c>0?l=Lf(l.line,l.ch-c):a.state.overwrite&&!g?m=Lf(m.line,Math.min(Yd(f,m.line).text.length,m.ch+Fe(h).length)):Nf&&Nf.lineWise&&Nf.text.join("\n")==b&&(l=m=Lf(l.line,0)));var n=a.curOp.updateInput,o={from:l,to:m,text:i?i[j%i.length]:h,origin:e||(g?"paste":a.state.cutIncoming?"cut":"+input")};zc(a.doc,o),xe(a,"inputRead",a,o)}b&&!g&&_(a,b),Lc(a),a.curOp.updateInput=n,a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=!1}function $(a,b){var c=a.clipboardData&&a.clipboardData.getData("text/plain");return c?(a.preventDefault(),b.isReadOnly()||b.options.disableInput||Db(b,function(){Z(b,c,0,null,"paste")}),!0):void 0}function _(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;d>=0;d--){var e=c.ranges[d];if(!(e.head.ch>100||d&&c.ranges[d-1].head.line==e.head.line)){var f=a.getModeAt(e.head),g=!1;if(f.electricChars){for(var h=0;h<f.electricChars.length;h++)if(b.indexOf(f.electricChars.charAt(h))>-1){g=Nc(a,e.head.line,"smart");break}}else f.electricInput&&f.electricInput.test(Yd(a.doc,e.head.line).text.slice(0,e.head.ch))&&(g=Nc(a,e.head.line,"smart"));g&&xe(a,"electricInput",a,e.head.line)}}}function aa(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line,f={anchor:Lf(e,0),head:Lf(e+1,0)};c.push(f),b.push(a.getRange(f.anchor,f.head))}return{text:b,ranges:c}}function ba(a){a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false")}function ca(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new De,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null}function da(){var a=Pe("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),b=Pe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return uf?a.style.width="1000px":a.setAttribute("wrap","off"),Bf&&(a.style.border="1px solid black"),ba(a),b}function ea(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new De,this.gracePeriod=!1}function fa(a,b){var c=_a(a,b.line);if(!c||c.hidden)return null;var d=Yd(a.doc,b.line),e=Ya(c,d,b.line),f=de(d),g="left";if(f){var h=jf(f,b.ch);g=h%2?"right":"left"}var i=cb(e.map,b.ch,g);return i.offset="right"==i.collapse?i.end:i.start,i}function ga(a,b){return b&&(a.bad=!0),a}function ha(a,b,c){var d;if(b==a.display.lineDiv){if(d=a.display.lineDiv.childNodes[c],!d)return ga(a.clipPos(Lf(a.display.viewTo-1)),!0);b=null,c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=a.display.view[e];if(f.node==d)return ia(f,b,c)}}function ia(a,b,c){function d(b,c,d){for(var e=-1;e<(k?k.length:0);e++)for(var f=0>e?j.map:k[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==c){var i=ae(0>e?a.line:a.rest[e]),l=f[g]+d;return(0>d||h!=b)&&(l=f[g+(d?1:0)]),Lf(i,l)}}}var e=a.text.firstChild,f=!1;if(!b||!Vg(e,b))return ga(Lf(ae(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b)){var g=a.rest?Fe(a.rest):a.line;return ga(Lf(ae(g),g.text.length),f)}var h=3==b.nodeType?b:null,i=b;for(h||1!=b.childNodes.length||3!=b.firstChild.nodeType||(h=b.firstChild,c&&(c=h.nodeValue.length));i.parentNode!=e;)i=i.parentNode;var j=a.measure,k=j.maps,l=d(h,i,c);if(l)return ga(l,f);for(var m=i.nextSibling,n=h?h.nodeValue.length-c:0;m;m=m.nextSibling){if(l=d(m,m.firstChild,0))return ga(Lf(l.line,l.ch-n),f);n+=m.textContent.length}for(var o=i.previousSibling,n=c;o;o=o.previousSibling){if(l=d(o,o.firstChild,-1))return ga(Lf(l.line,l.ch+n),f);n+=m.textContent.length}}function ja(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)return""==c&&(c=b.textContent.replace(/\u200b/g,"")),void(h+=c);var k,l=b.getAttribute("cm-marker");if(l){var m=a.findMarks(Lf(d,0),Lf(e+1,0),f(+l));return void(m.length&&(k=m[0].find())&&(h+=Zd(a.doc,k.from,k.to).join(j)))}if("false"==b.getAttribute("contenteditable"))return;for(var n=0;n<b.childNodes.length;n++)g(b.childNodes[n]);/^(pre|div|p)$/i.test(b.nodeName)&&(i=!0)}else if(3==b.nodeType){var o=b.nodeValue;if(!o)return;i&&(h+=j,i=!1),h+=o}}for(var h="",i=!1,j=a.doc.lineSeparator();g(b),b!=c;)b=b.nextSibling;return h}function ka(a,b){this.ranges=a,this.primIndex=b}function la(a,b){this.anchor=a,this.head=b}function ma(a,b){var c=a[b];a.sort(function(a,b){return Mf(a.from(),b.from())}),b=Ge(a,c);for(var d=1;d<a.length;d++){var e=a[d],f=a[d-1];if(Mf(f.to(),e.from())>=0){var g=X(f.from(),e.from()),h=W(f.to(),e.to()),i=f.empty()?e.from()==e.head:f.from()==f.head;b>=d&&--b,a.splice(--d,2,new la(i?h:g,i?g:h))}}return new ka(a,b)}function na(a,b){return new ka([new la(a,b||a)],0)}function oa(a,b){return Math.max(a.first,Math.min(b,a.first+a.size-1))}function pa(a,b){if(b.line<a.first)return Lf(a.first,0);var c=a.first+a.size-1;return b.line>c?Lf(c,Yd(a,c).text.length):qa(b,Yd(a,b.line).text.length)}function qa(a,b){var c=a.ch;return null==c||c>b?Lf(a.line,b):0>c?Lf(a.line,0):a}function ra(a,b){return b>=a.first&&b<a.first+a.size}function sa(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=pa(a,b[d]);return c}function ta(a,b,c,d){if(a.cm&&a.cm.display.shift||a.extend){var e=b.anchor;if(d){var f=Mf(c,e)<0;f!=Mf(d,e)<0?(e=c,c=d):f!=Mf(c,d)<0&&(c=d)}return new la(e,c)}return new la(d||c,c)}function ua(a,b,c,d){Aa(a,new ka([ta(a,a.sel.primary(),b,c)],0),d)}function va(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=ta(a,a.sel.ranges[e],b[e],null);var f=ma(d,a.sel.primIndex);Aa(a,f,c)}function wa(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c,Aa(a,ma(e,a.sel.primIndex),d)}function xa(a,b,c,d){Aa(a,na(b,c),d)}function ya(a,b,c){var d={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new la(pa(a,b[c].anchor),pa(a,b[c].head))},origin:c&&c.origin};return Gg(a,"beforeSelectionChange",a,d),a.cm&&Gg(a.cm,"beforeSelectionChange",a.cm,d),d.ranges!=b.ranges?ma(d.ranges,d.ranges.length-1):b}function za(a,b,c){var d=a.history.done,e=Fe(d);e&&e.ranges?(d[d.length-1]=b,Ba(a,b,c)):Aa(a,b,c)}function Aa(a,b,c){Ba(a,b,c),ke(a,a.sel,a.cm?a.cm.curOp.id:NaN,c)}function Ba(a,b,c){(Be(a,"beforeSelectionChange")||a.cm&&Be(a.cm,"beforeSelectionChange"))&&(b=ya(a,b,c));var d=c&&c.bias||(Mf(b.primary().head,a.sel.primary().head)<0?-1:1);Ca(a,Ea(a,b,d,!0)),c&&c.scroll===!1||!a.cm||Lc(a.cm)}function Ca(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,Ae(a.cm)),xe(a,"cursorActivity",a))}function Da(a){Ca(a,Ea(a,a.sel,null,!1),Kg)}function Ea(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=b.ranges.length==a.sel.ranges.length&&a.sel.ranges[f],i=Ga(a,g.anchor,h&&h.anchor,c,d),j=Ga(a,g.head,h&&h.head,c,d);(e||i!=g.anchor||j!=g.head)&&(e||(e=b.ranges.slice(0,f)),e[f]=new la(i,j))}return e?ma(e,b.primIndex):b}function Fa(a,b,c,d,e){var f=Yd(a,b.line);if(f.markedSpans)for(var g=0;g<f.markedSpans.length;++g){var h=f.markedSpans[g],i=h.marker;if((null==h.from||(i.inclusiveLeft?h.from<=b.ch:h.from<b.ch))&&(null==h.to||(i.inclusiveRight?h.to>=b.ch:h.to>b.ch))){if(e&&(Gg(i,"beforeCursorEnter"),i.explicitlyCleared)){if(f.markedSpans){--g;continue}break}if(!i.atomic)continue;if(c){var j,k=i.find(0>d?1:-1);if((0>d?i.inclusiveRight:i.inclusiveLeft)&&(k=Ha(a,k,-d,k&&k.line==b.line?f:null)),k&&k.line==b.line&&(j=Mf(k,c))&&(0>d?0>j:j>0))return Fa(a,k,b,d,e)}var l=i.find(0>d?-1:1);return(0>d?i.inclusiveLeft:i.inclusiveRight)&&(l=Ha(a,l,d,l.line==b.line?f:null)),l?Fa(a,l,b,d,e):null}}return b}function Ga(a,b,c,d,e){var f=d||1,g=Fa(a,b,c,f,e)||!e&&Fa(a,b,c,f,!0)||Fa(a,b,c,-f,e)||!e&&Fa(a,b,c,-f,!0);return g?g:(a.cantEdit=!0,Lf(a.first,0))}function Ha(a,b,c,d){return 0>c&&0==b.ch?b.line>a.first?pa(a,Lf(b.line-1)):null:c>0&&b.ch==(d||Yd(a,b.line)).text.length?b.line<a.first+a.size-1?Lf(b.line+1,0):null:new Lf(b.line,b.ch+c)}function Ia(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Ja(a,b){for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(b!==!1||g!=c.sel.primIndex){var h=c.sel.ranges[g];if(!(h.from().line>=a.display.viewTo||h.to().line<a.display.viewFrom)){var i=h.empty();(i||a.options.showCursorWhenSelecting)&&Ka(a,h.head,e),i||La(a,h,f)}}return d}function Ka(a,b,c){var d=nb(a,b,"div",null,null,!a.options.singleCursorHeightPerLine),e=c.appendChild(Pe("div"," ","CodeMirror-cursor"));if(e.style.left=d.left+"px",e.style.top=d.top+"px",e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Pe("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function La(a,b,c){function d(a,b,c,d){0>b&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Pe("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return mb(a,Lf(b,c),"div",l,d)}var h,i,l=Yd(g,b),m=l.text.length;return _e(de(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottom<l.top&&d(n,p.bottom,null,l.top)),null==e&&b==m&&(o=k),(!h||p.top<h.top||p.top==h.top&&p.left<h.left)&&(h=p),(!i||l.bottom>i.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),j+1>n&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Ta(a.display),j=i.left,k=Math.max(f.sizerWidth,Va(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Yd(g,l.line),o=Yd(g,m.line),p=rd(n)==rd(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(d(q.right,q.top,null,q.bottom),d(j,r.top,r.left,r.bottom)):d(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&d(j,q.bottom,null,r.top)}c.appendChild(h)}function Ma(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Na(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Le(Oa,a))}function Oa(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=hg(b.mode,Qa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=f.text.length>a.options.maxHighlightLength,i=Hd(a,f,h?hg(b.mode,d):d,!0);f.styles=i.styles;var j=f.styleClasses,k=i.classes;k?f.styleClasses=k:j&&(f.styleClasses=null);for(var l=!g||g.length!=f.styles.length||j!=k&&(!j||!k||j.bgClass!=k.bgClass||j.textClass!=k.textClass),m=0;!l&&m<g.length;++m)l=g[m]!=f.styles[m];l&&e.push(b.frontier),f.stateAfter=h?d:hg(b.mode,d)}else f.text.length<=a.options.maxHighlightLength&&Jd(a,f.text,d),f.stateAfter=b.frontier%5==0?hg(b.mode,d):null;return++b.frontier,+new Date>c?(Na(a,a.options.workDelay),!0):void 0}),e.length&&Db(a,function(){for(var b=0;b<e.length;b++)Kb(a,e[b],"text")})}}function Pa(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Yd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Ng(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Qa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Pa(a,b,c),g=f>d.first&&Yd(d,f-1).stateAfter;return g=g?hg(d.mode,g):ig(d.mode),d.iter(f,b,function(c){Jd(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?hg(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Ra(a){return a.lineSpace.offsetTop}function Sa(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Ta(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Re(a.measure,Pe("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function Ua(a){return Ig-a.display.nativeBarWidth}function Va(a){return a.display.scroller.clientWidth-Ua(a)-a.display.barWidth}function Wa(a){return a.display.scroller.clientHeight-Ua(a)-a.display.barHeight}function Xa(a,b,c){var d=a.options.lineWrapping,e=d&&Va(a);if(!b.measure.heights||d&&b.measure.width!=e){var f=b.measure.heights=[];if(d){b.measure.width=e;for(var g=b.text.firstChild.getClientRects(),h=0;h<g.length-1;h++){var i=g[h],j=g[h+1];Math.abs(i.bottom-j.bottom)>2&&f.push((i.bottom+j.top)/2-c.top)}}f.push(c.bottom-c.top)}}function Ya(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(var d=0;d<a.rest.length;d++)if(ae(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Za(a,b){b=rd(b);var c=ae(b),d=a.display.externalMeasured=new Hb(a.doc,b,c);d.lineN=c;var e=d.built=Ld(a,d);return d.text=e.pre,Re(a.display.lineMeasure,e.pre),d}function $a(a,b,c,d){return bb(a,ab(a,b),c,d)}function _a(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Mb(a,b)];var c=a.display.externalMeasured;return c&&b>=c.lineN&&b<c.lineN+c.size?c:void 0}function ab(a,b){var c=ae(b),d=_a(a,c);d&&!d.text?d=null:d&&d.changes&&(J(a,d,c,H(a)),a.curOp.forceUpdate=!0),d||(d=Za(a,b));var e=Ya(d,b,c);return{line:b,view:d,rect:null,map:e.map,cache:e.cache,before:e.before,hasHeights:!1}}function bb(a,b,c,d,e){b.before&&(c=-1);var f,g=c+(d||"");return b.cache.hasOwnProperty(g)?f=b.cache[g]:(b.rect||(b.rect=b.view.text.getBoundingClientRect()),b.hasHeights||(Xa(a,b.view,b.rect),b.hasHeights=!0),f=db(a,b,c,d),f.bogus||(b.cache[g]=f)),{left:f.left,right:f.right,top:e?f.rtop:f.top,bottom:e?f.rbottom:f.bottom}}function cb(a,b,c){for(var d,e,f,g,h=0;h<a.length;h+=3){var i=a[h],j=a[h+1];if(i>b?(e=0,f=1,g="left"):j>b?(e=b-i,
|
2 |
+
f=e+1):(h==a.length-3||b==j&&a[h+3]>b)&&(f=j-i,e=f-1,b>=j&&(g="right")),null!=e){if(d=a[h+2],i==j&&c==(d.insertLeft?"left":"right")&&(g=c),"left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==j-i)for(;h<a.length-3&&a[h+3]==a[h+4]&&!a[h+5].insertLeft;)d=a[(h+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:i,coverEnd:j}}function db(a,b,c,d){var e,f=cb(b.map,c,d),g=f.node,h=f.start,i=f.end,j=f.collapse;if(3==g.nodeType){for(var k=0;4>k;k++){for(;h&&Oe(b.line.text.charAt(f.coverStart+h));)--h;for(;f.coverStart+i<f.coverEnd&&Oe(b.line.text.charAt(f.coverStart+i));)++i;if(sf&&9>tf&&0==h&&i==f.coverEnd-f.coverStart)e=g.parentNode.getBoundingClientRect();else if(sf&&a.options.lineWrapping){var l=Rg(g,h,i).getClientRects();e=l.length?l["right"==d?l.length-1:0]:Rf}else e=Rg(g,h,i).getBoundingClientRect()||Rf;if(e.left||e.right||0==h)break;i=h,h-=1,j="right"}sf&&11>tf&&(e=eb(a.display.measure,e))}else{h>0&&(j=d="right");var l;e=a.options.lineWrapping&&(l=g.getClientRects()).length>1?l["right"==d?l.length-1:0]:g.getBoundingClientRect()}if(sf&&9>tf&&!h&&(!e||!e.left&&!e.right)){var m=g.parentNode.getClientRects()[0];e=m?{left:m.left,right:m.left+tb(a.display),top:m.top,bottom:m.bottom}:Rf}for(var n=e.top-b.rect.top,o=e.bottom-b.rect.top,p=(n+o)/2,q=b.view.measure.heights,k=0;k<q.length-1&&!(p<q[k]);k++);var r=k?q[k-1]:0,s=q[k],t={left:("right"==j?e.right:e.left)-b.rect.left,right:("left"==j?e.left:e.right)-b.rect.left,top:r,bottom:s};return e.left||e.right||(t.bogus=!0),a.options.singleCursorHeightPerLine||(t.rtop=n,t.rbottom=o),t}function eb(a,b){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!$e(a))return b;var c=screen.logicalXDPI/screen.deviceXDPI,d=screen.logicalYDPI/screen.deviceYDPI;return{left:b.left*c,right:b.right*c,top:b.top*d,bottom:b.bottom*d}}function fb(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function gb(a){a.display.externalMeasure=null,Qe(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)fb(a.display.view[b])}function hb(a){gb(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function ib(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function jb(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function kb(a,b,c,d){if(b.widgets)for(var e=0;e<b.widgets.length;++e)if(b.widgets[e].above){var f=yd(b.widgets[e]);c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=ce(b);if("local"==d?g+=Ra(a.display):g-=a.display.viewOffset,"page"==d||"window"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+("window"==d?0:jb());var i=h.left+("window"==d?0:ib());c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function lb(a,b,c){if("div"==c)return b;var d=b.left,e=b.top;if("page"==c)d-=ib(),e-=jb();else if("local"==c||!c){var f=a.display.sizer.getBoundingClientRect();d+=f.left,e+=f.top}var g=a.display.lineSpace.getBoundingClientRect();return{left:d-g.left,top:e-g.top}}function mb(a,b,c,d,e){return d||(d=Yd(a.doc,b.line)),kb(a,d,$a(a,d,b.ch,e),c)}function nb(a,b,c,d,e,f){function g(b,g){var h=bb(a,e,b,g?"right":"left",f);return g?h.left=h.right:h.right=h.left,kb(a,d,h,c)}function h(a,b){var c=i[b],d=c.level%2;return a==af(c)&&b&&c.level<i[b-1].level?(c=i[--b],a=bf(c)-(c.level%2?0:1),d=!0):a==bf(c)&&b<i.length-1&&c.level<i[b+1].level&&(c=i[++b],a=af(c)-c.level%2,d=!1),d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||Yd(a.doc,b.line),e||(e=ab(a,d));var i=de(d),j=b.ch;if(!i)return g(j);var k=jf(i,j),l=h(j,k);return null!=fh&&(l.other=h(j,fh)),l}function ob(a,b){var c=0,b=pa(a.doc,b);a.options.lineWrapping||(c=tb(a.display)*b.ch);var d=Yd(a.doc,b.line),e=ce(d)+Ra(a.display);return{left:c,right:c,top:e,bottom:e+d.height}}function pb(a,b,c,d){var e=Lf(a,b);return e.xRel=d,c&&(e.outside=!0),e}function qb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return pb(d.first,0,!0,-1);var e=be(d,c),f=d.first+d.size-1;if(e>f)return pb(d.first+d.size-1,Yd(d,f).text.length,!0,1);0>b&&(b=0);for(var g=Yd(d,e);;){var h=rb(a,g,e,b,c),i=pd(g),j=i&&i.find(0,!0);if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=ae(g=j.to.line)}}function rb(a,b,c,d,e){function f(d){var e=nb(a,Lf(c,d),"line",b,j);return h=!0,g>e.bottom?e.left-i:g<e.top?e.left+i:(h=!1,e.left)}var g=e-ce(b),h=!1,i=2*a.display.wrapper.clientWidth,j=ab(a,b),k=de(b),l=b.text.length,m=cf(b),n=df(b),o=f(m),p=h,q=f(n),r=h;if(d>q)return pb(c,n,r,1);for(;;){if(k?n==m||n==lf(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);Oe(b.text.charAt(s));)++s;var u=pb(c,s,s==m?p:r,-1>t?-1:t>1?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=lf(b,w,1)}var y=f(w);y>d?(n=w,q=y,(r=h)&&(q+=1e3),l=v):(m=w,o=y,p=h,l-=v)}}function sb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Of){Of=Pe("pre");for(var b=0;49>b;++b)Of.appendChild(document.createTextNode("x")),Of.appendChild(Pe("br"));Of.appendChild(document.createTextNode("x"))}Re(a.measure,Of);var c=Of.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),Qe(a.measure),c||1}function tb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=Pe("span","xxxxxxxxxx"),c=Pe("pre",[b]);Re(a.measure,c);var d=b.getBoundingClientRect(),e=(d.right-d.left)/10;return e>2&&(a.cachedCharWidth=e),e||10}function ub(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Tf},Sf?Sf.ops.push(a.curOp):a.curOp.ownsGroup=Sf={ops:[a.curOp],delayedCallbacks:[]}}function vb(a){var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c].call(null);for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++].call(null,e.cm)}}while(c<b.length)}function wb(a){var b=a.curOp,c=b.ownsGroup;if(c)try{vb(c)}finally{Sf=null;for(var d=0;d<c.ops.length;d++)c.ops[d].cm.curOp=null;xb(c)}}function xb(a){for(var b=a.ops,c=0;c<b.length;c++)yb(b[c]);for(var c=0;c<b.length;c++)zb(b[c]);for(var c=0;c<b.length;c++)Ab(b[c]);for(var c=0;c<b.length;c++)Bb(b[c]);for(var c=0;c<b.length;c++)Cb(b[c])}function yb(a){var b=a.cm,c=b.display;A(b),a.updateMaxLine&&m(b),a.mustUpdate=a.viewChanged||a.forceUpdate||null!=a.scrollTop||a.scrollToPos&&(a.scrollToPos.from.line<c.viewFrom||a.scrollToPos.to.line>=c.viewTo)||c.maxLineChanged&&b.options.lineWrapping,a.update=a.mustUpdate&&new z(b,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function zb(a){a.updatedDisplay=a.mustUpdate&&B(a.cm,a.update)}function Ab(a){var b=a.cm,c=b.display;a.updatedDisplay&&F(b),a.barMeasure=o(b),c.maxLineChanged&&!b.options.lineWrapping&&(a.adjustWidthTo=$a(b,c.maxLine,c.maxLine.text.length).left+3,b.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+a.adjustWidthTo+Ua(b)+b.display.barWidth),a.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+a.adjustWidthTo-Va(b))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=c.input.prepareSelection(a.focus))}function Bb(a){var b=a.cm;null!=a.adjustWidthTo&&(b.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<b.doc.scrollLeft&&ec(b,Math.min(b.display.scroller.scrollLeft,a.maxScrollLeft),!0),b.display.maxLineChanged=!1);var c=a.focus&&a.focus==Se()&&(!document.hasFocus||document.hasFocus());a.preparedSelection&&b.display.input.showSelection(a.preparedSelection,c),(a.updatedDisplay||a.startHeight!=b.doc.height)&&s(b,a.barMeasure),a.updatedDisplay&&E(b,a.barMeasure),a.selectionChanged&&Ma(b),b.state.focused&&a.updateInput&&b.display.input.reset(a.typing),c&&Y(a.cm)}function Cb(a){var b=a.cm,c=b.display,d=b.doc;if(a.updatedDisplay&&C(b,a.update),null==c.wheelStartX||null==a.scrollTop&&null==a.scrollLeft&&!a.scrollToPos||(c.wheelStartX=c.wheelStartY=null),null==a.scrollTop||c.scroller.scrollTop==a.scrollTop&&!a.forceScroll||(d.scrollTop=Math.max(0,Math.min(c.scroller.scrollHeight-c.scroller.clientHeight,a.scrollTop)),c.scrollbars.setScrollTop(d.scrollTop),c.scroller.scrollTop=d.scrollTop),null==a.scrollLeft||c.scroller.scrollLeft==a.scrollLeft&&!a.forceScroll||(d.scrollLeft=Math.max(0,Math.min(c.scroller.scrollWidth-c.scroller.clientWidth,a.scrollLeft)),c.scrollbars.setScrollLeft(d.scrollLeft),c.scroller.scrollLeft=d.scrollLeft,v(b)),a.scrollToPos){var e=Hc(b,pa(d,a.scrollToPos.from),pa(d,a.scrollToPos.to),a.scrollToPos.margin);a.scrollToPos.isCursor&&b.state.focused&&Gc(b,e)}var f=a.maybeHiddenMarkers,g=a.maybeUnhiddenMarkers;if(f)for(var h=0;h<f.length;++h)f[h].lines.length||Gg(f[h],"hide");if(g)for(var h=0;h<g.length;++h)g[h].lines.length&&Gg(g[h],"unhide");c.wrapper.offsetHeight&&(d.scrollTop=b.display.scroller.scrollTop),a.changeObjs&&Gg(b,"changes",b,a.changeObjs),a.update&&a.update.finish()}function Db(a,b){if(a.curOp)return b();ub(a);try{return b()}finally{wb(a)}}function Eb(a,b){return function(){if(a.curOp)return b.apply(a,arguments);ub(a);try{return b.apply(a,arguments)}finally{wb(a)}}}function Fb(a){return function(){if(this.curOp)return a.apply(this,arguments);ub(this);try{return a.apply(this,arguments)}finally{wb(this)}}}function Gb(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);ub(b);try{return a.apply(this,arguments)}finally{wb(b)}}}function Hb(a,b,c){this.line=b,this.rest=sd(b),this.size=this.rest?ae(Fe(this.rest))-c+1:1,this.node=this.text=null,this.hidden=vd(a,b)}function Ib(a,b,c){for(var d,e=[],f=b;c>f;f=d){var g=new Hb(a.doc,Yd(a.doc,f),f);d=f+g.size,e.push(g)}return e}function Jb(a,b,c,d){null==b&&(b=a.doc.first),null==c&&(c=a.doc.first+a.doc.size),d||(d=0);var e=a.display;if(d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b),a.curOp.viewChanged=!0,b>=e.viewTo)Kf&&td(a.doc,b)<e.viewTo&&Lb(a);else if(c<=e.viewFrom)Kf&&ud(a.doc,c+d)>e.viewFrom?Lb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)Lb(a);else if(b<=e.viewFrom){var f=Nb(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):Lb(a)}else if(c>=e.viewTo){var f=Nb(a,b,b,-1);f?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):Lb(a)}else{var g=Nb(a,b,b,-1),h=Nb(a,c,c+d,1);g&&h?(e.view=e.view.slice(0,g.index).concat(Ib(a,g.lineN,h.lineN)).concat(e.view.slice(h.index)),e.viewTo+=d):Lb(a)}var i=e.externalMeasured;i&&(c<i.lineN?i.lineN+=d:b<i.lineN+i.size&&(e.externalMeasured=null))}function Kb(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;if(e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null),!(b<d.viewFrom||b>=d.viewTo)){var f=d.view[Mb(a,b)];if(null!=f.node){var g=f.changes||(f.changes=[]);-1==Ge(g,c)&&g.push(c)}}}function Lb(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Mb(a,b){if(b>=a.display.viewTo)return null;if(b-=a.display.viewFrom,0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function Nb(a,b,c,d){var e,f=Mb(a,b),g=a.display.view;if(!Kf||c==a.doc.first+a.doc.size)return{index:f,lineN:c};for(var h=0,i=a.display.viewFrom;f>h;h++)i+=g[h].size;if(i!=b){if(d>0){if(f==g.length-1)return null;e=i+g[f].size-b,f++}else e=i-b;b+=e,c+=e}for(;td(a.doc,c)!=c;){if(f==(0>d?0:g.length-1))return null;c+=d*g[f-(0>d?1:0)].size,f+=d}return{index:f,lineN:c}}function Ob(a,b,c){var d=a.display,e=d.view;0==e.length||b>=d.viewTo||c<=d.viewFrom?(d.view=Ib(a,b,c),d.viewFrom=b):(d.viewFrom>b?d.view=Ib(a,b,d.viewFrom).concat(d.view):d.viewFrom<b&&(d.view=d.view.slice(Mb(a,b))),d.viewFrom=b,d.viewTo<c?d.view=d.view.concat(Ib(a,d.viewTo,c)):d.viewTo>c&&(d.view=d.view.slice(0,Mb(a,c)))),d.viewTo=c}function Pb(a){for(var b=a.display.view,c=0,d=0;d<b.length;d++){var e=b[d];e.hidden||e.node&&!e.changes||++c}return c}function Qb(a){function b(){e.activeTouch&&(f=setTimeout(function(){e.activeTouch=null},1e3),g=e.activeTouch,g.end=+new Date)}function c(a){if(1!=a.touches.length)return!1;var b=a.touches[0];return b.radiusX<=1&&b.radiusY<=1}function d(a,b){if(null==b.left)return!0;var c=b.left-a.left,d=b.top-a.top;return c*c+d*d>400}var e=a.display;Dg(e.scroller,"mousedown",Eb(a,Vb)),sf&&11>tf?Dg(e.scroller,"dblclick",Eb(a,function(b){if(!ze(a,b)){var c=Ub(a,b);if(c&&!$b(a,b)&&!Tb(a.display,b)){Ag(b);var d=a.findWordAt(c);ua(a.doc,d.anchor,d.head)}}})):Dg(e.scroller,"dblclick",function(b){ze(a,b)||Ag(b)}),If||Dg(e.scroller,"contextmenu",function(b){sc(a,b)});var f,g={end:0};Dg(e.scroller,"touchstart",function(b){if(!ze(a,b)&&!c(b)){clearTimeout(f);var d=+new Date;e.activeTouch={start:d,moved:!1,prev:d-g.end<=300?g:null},1==b.touches.length&&(e.activeTouch.left=b.touches[0].pageX,e.activeTouch.top=b.touches[0].pageY)}}),Dg(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),Dg(e.scroller,"touchend",function(c){var f=e.activeTouch;if(f&&!Tb(e,c)&&null!=f.left&&!f.moved&&new Date-f.start<300){var g,h=a.coordsChar(e.activeTouch,"page");g=!f.prev||d(f,f.prev)?new la(h,h):!f.prev.prev||d(f,f.prev.prev)?a.findWordAt(h):new la(Lf(h.line,0),pa(a.doc,Lf(h.line+1,0))),a.setSelection(g.anchor,g.head),a.focus(),Ag(c)}b()}),Dg(e.scroller,"touchcancel",b),Dg(e.scroller,"scroll",function(){e.scroller.clientHeight&&(dc(a,e.scroller.scrollTop),ec(a,e.scroller.scrollLeft,!0),Gg(a,"scroll",a))}),Dg(e.scroller,"mousewheel",function(b){fc(a,b)}),Dg(e.scroller,"DOMMouseScroll",function(b){fc(a,b)}),Dg(e.wrapper,"scroll",function(){e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(b){ze(a,b)||Cg(b)},over:function(b){ze(a,b)||(bc(a,b),Cg(b))},start:function(b){ac(a,b)},drop:Eb(a,_b),leave:function(b){ze(a,b)||cc(a)}};var h=e.input.getField();Dg(h,"keyup",function(b){nc.call(a,b)}),Dg(h,"keydown",Eb(a,lc)),Dg(h,"keypress",Eb(a,oc)),Dg(h,"focus",Le(qc,a)),Dg(h,"blur",Le(rc,a))}function Rb(b,c,d){var e=d&&d!=a.Init;if(!c!=!e){var f=b.display.dragFunctions,g=c?Dg:Fg;g(b.display.scroller,"dragstart",f.start),g(b.display.scroller,"dragenter",f.enter),g(b.display.scroller,"dragover",f.over),g(b.display.scroller,"dragleave",f.leave),g(b.display.scroller,"drop",f.drop)}}function Sb(a){var b=a.display;b.lastWrapHeight==b.wrapper.clientHeight&&b.lastWrapWidth==b.wrapper.clientWidth||(b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize())}function Tb(a,b){for(var c=ue(b);c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Ub(a,b,c,d){var e=a.display;if(!c&&"true"==ue(b).getAttribute("cm-not-content"))return null;var f,g,h=e.lineSpace.getBoundingClientRect();try{f=b.clientX-h.left,g=b.clientY-h.top}catch(b){return null}var i,j=qb(a,f,g);if(d&&1==j.xRel&&(i=Yd(a.doc,j.line).text).length==j.ch){var k=Ng(i,i.length,a.options.tabSize)-i.length;j=Lf(j.line,Math.max(0,Math.round((f-Ta(a.display).left)/tb(a.display))-k))}return j}function Vb(a){var b=this,c=b.display;if(!(ze(b,a)||c.activeTouch&&c.input.supportsTouch())){if(c.shift=a.shiftKey,Tb(c,a))return void(uf||(c.scroller.draggable=!1,setTimeout(function(){c.scroller.draggable=!0},100)));if(!$b(b,a)){var d=Ub(b,a);switch(window.focus(),ve(a)){case 1:b.state.selectingText?b.state.selectingText(a):d?Wb(b,a,d):ue(a)==c.scroller&&Ag(a);break;case 2:uf&&(b.state.lastMiddleDown=+new Date),d&&ua(b.doc,d),setTimeout(function(){c.input.focus()},20),Ag(a);break;case 3:If?sc(b,a):pc(b)}}}}function Wb(a,b,c){sf?setTimeout(Le(Y,a),0):a.curOp.focus=Se();var d,e=+new Date;Qf&&Qf.time>e-400&&0==Mf(Qf.pos,c)?d="triple":Pf&&Pf.time>e-400&&0==Mf(Pf.pos,c)?(d="double",Qf={time:e,pos:c}):(d="single",Pf={time:e,pos:c});var f,g=a.doc.sel,h=Df?b.metaKey:b.ctrlKey;a.options.dragDrop&&_g&&!a.isReadOnly()&&"single"==d&&(f=g.contains(c))>-1&&(Mf((f=g.ranges[f]).from(),c)<0||c.xRel>0)&&(Mf(f.to(),c)>0||c.xRel<0)?Xb(a,b,c,h):Yb(a,b,c,d,h)}function Xb(a,b,c,d){var e=a.display,f=+new Date,g=Eb(a,function(h){uf&&(e.scroller.draggable=!1),a.state.draggingText=!1,Fg(document,"mouseup",g),Fg(e.scroller,"drop",g),Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)<10&&(Ag(h),!d&&+new Date-200<f&&ua(a.doc,c),uf||sf&&9==tf?setTimeout(function(){document.body.focus(),e.input.focus()},20):e.input.focus())});uf&&(e.scroller.draggable=!0),a.state.draggingText=g,e.scroller.dragDrop&&e.scroller.dragDrop(),Dg(document,"mouseup",g),Dg(e.scroller,"drop",g)}function Yb(a,b,c,d,e){function f(b){if(0!=Mf(q,b))if(q=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=Ng(Yd(j,c.line).text,c.ch,f),h=Ng(Yd(j,b.line).text,b.ch,f),i=Math.min(g,h),n=Math.max(g,h),o=Math.min(c.line,b.line),p=Math.min(a.lastLine(),Math.max(c.line,b.line));p>=o;o++){var r=Yd(j,o).text,s=Og(r,i,f);i==n?e.push(new la(Lf(o,s),Lf(o,s))):r.length>s&&e.push(new la(Lf(o,s),Lf(o,Og(r,n,f))))}e.length||e.push(new la(c,c)),Aa(j,ma(m.ranges.slice(0,l).concat(e),l),{origin:"*mouse",scroll:!1}),a.scrollIntoView(b)}else{var t=k,u=t.anchor,v=b;if("single"!=d){if("double"==d)var w=a.findWordAt(b);else var w=new la(Lf(b.line,0),pa(j,Lf(b.line+1,0)));Mf(w.anchor,u)>0?(v=w.head,u=X(t.from(),w.anchor)):(v=w.anchor,u=W(t.to(),w.head))}var e=m.ranges.slice(0);e[l]=new la(pa(j,u),v),Aa(j,ma(e,l),Lg)}}function g(b){var c=++s,e=Ub(a,b,!0,"rect"==d);if(e)if(0!=Mf(e,q)){a.curOp.focus=Se(),f(e);var h=u(i,j);(e.line>=h.to||e.line<h.from)&&setTimeout(Eb(a,function(){s==c&&g(b)}),150)}else{var k=b.clientY<r.top?-20:b.clientY>r.bottom?20:0;k&&setTimeout(Eb(a,function(){s==c&&(i.scroller.scrollTop+=k,g(b))}),50)}}function h(b){a.state.selectingText=!1,s=1/0,Ag(b),i.input.focus(),Fg(document,"mousemove",t),Fg(document,"mouseup",v),j.history.lastSelOrigin=null}var i=a.display,j=a.doc;Ag(b);var k,l,m=j.sel,n=m.ranges;if(e&&!b.shiftKey?(l=j.sel.contains(c),k=l>-1?n[l]:new la(c,c)):(k=j.sel.primary(),l=j.sel.primIndex),Ef?b.shiftKey&&b.metaKey:b.altKey)d="rect",e||(k=new la(c,c)),c=Ub(a,b,!0,!0),l=-1;else if("double"==d){var o=a.findWordAt(c);k=a.display.shift||j.extend?ta(j,k,o.anchor,o.head):o}else if("triple"==d){var p=new la(Lf(c.line,0),pa(j,Lf(c.line+1,0)));k=a.display.shift||j.extend?ta(j,k,p.anchor,p.head):p}else k=ta(j,k,c);e?-1==l?(l=n.length,Aa(j,ma(n.concat([k]),l),{scroll:!1,origin:"*mouse"})):n.length>1&&n[l].empty()&&"single"==d&&!b.shiftKey?(Aa(j,ma(n.slice(0,l).concat(n.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),m=j.sel):wa(j,l,k,Lg):(l=0,Aa(j,new ka([k],0),Lg),m=j.sel);var q=c,r=i.wrapper.getBoundingClientRect(),s=0,t=Eb(a,function(a){ve(a)?g(a):h(a)}),v=Eb(a,h);a.state.selectingText=v,Dg(document,"mousemove",t),Dg(document,"mouseup",v)}function Zb(a,b,c,d){try{var e=b.clientX,f=b.clientY}catch(b){return!1}if(e>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&Ag(b);var g=a.display,h=g.lineDiv.getBoundingClientRect();if(f>h.bottom||!Be(a,c))return te(b);f-=h.top-g.viewOffset;for(var i=0;i<a.options.gutters.length;++i){var j=g.gutters.childNodes[i];if(j&&j.getBoundingClientRect().right>=e){var k=be(a.doc,f),l=a.options.gutters[i];return Gg(a,c,a,k,l,b),te(b)}}}function $b(a,b){return Zb(a,b,"gutterClick",!0)}function _b(a){var b=this;if(cc(b),!ze(b,a)&&!Tb(b.display,a)){Ag(a),sf&&(Uf=+new Date);var c=Ub(b,a,!0),d=a.dataTransfer.files;if(c&&!b.isReadOnly())if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,f=Array(e),g=0,h=function(a,d){if(!b.options.allowDropFileTypes||-1!=Ge(b.options.allowDropFileTypes,a.type)){var h=new FileReader;h.onload=Eb(b,function(){var a=h.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(a)&&(a=""),f[d]=a,++g==e){c=pa(b.doc,c);var i={from:c,to:c,text:b.doc.splitLines(f.join(b.doc.lineSeparator())),origin:"paste"};zc(b.doc,i),za(b.doc,na(c,$f(i)))}}),h.readAsText(a)}},i=0;e>i;++i)h(d[i],i);else{if(b.state.draggingText&&b.doc.sel.contains(c)>-1)return b.state.draggingText(a),void setTimeout(function(){b.display.input.focus()},20);try{var f=a.dataTransfer.getData("Text");if(f){if(b.state.draggingText&&!(Df?a.altKey:a.ctrlKey))var j=b.listSelections();if(Ba(b.doc,na(c,c)),j)for(var i=0;i<j.length;++i)Fc(b.doc,"",j[i].anchor,j[i].head,"drag");b.replaceSelection(f,"around","paste"),b.display.input.focus()}}catch(a){}}}}function ac(a,b){if(sf&&(!a.state.draggingText||+new Date-Uf<100))return void Cg(b);if(!ze(a,b)&&!Tb(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.effectAllowed="copyMove",b.dataTransfer.setDragImage&&!yf)){var c=Pe("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",xf&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop),b.dataTransfer.setDragImage(c,0,0),xf&&c.parentNode.removeChild(c)}}function bc(a,b){var c=Ub(a,b);if(c){var d=document.createDocumentFragment();Ka(a,c,d),a.display.dragCursor||(a.display.dragCursor=Pe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Re(a.display.dragCursor,d)}}function cc(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function dc(a,b){Math.abs(a.doc.scrollTop-b)<2||(a.doc.scrollTop=b,pf||D(a,{top:b}),a.display.scroller.scrollTop!=b&&(a.display.scroller.scrollTop=b),a.display.scrollbars.setScrollTop(b),pf&&D(a),Na(a,100))}function ec(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,v(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function fc(a,b){var c=Xf(b),d=c.x,e=c.y,f=a.display,g=f.scroller,h=g.scrollWidth>g.clientWidth,i=g.scrollHeight>g.clientHeight;if(d&&h||e&&i){if(e&&Df&&uf)a:for(var j=b.target,k=f.view;j!=g;j=j.parentNode)for(var l=0;l<k.length;l++)if(k[l].node==j){a.display.currentWheelTarget=j;break a}if(d&&!pf&&!xf&&null!=Wf)return e&&i&&dc(a,Math.max(0,Math.min(g.scrollTop+e*Wf,g.scrollHeight-g.clientHeight))),ec(a,Math.max(0,Math.min(g.scrollLeft+d*Wf,g.scrollWidth-g.clientWidth))),(!e||e&&i)&&Ag(b),void(f.wheelStartX=null);if(e&&null!=Wf){var m=e*Wf,n=a.doc.scrollTop,o=n+f.wrapper.clientHeight;0>m?n=Math.max(0,n+m-50):o=Math.min(a.doc.height,o+m+50),D(a,{top:n,bottom:o})}20>Vf&&(null==f.wheelStartX?(f.wheelStartX=g.scrollLeft,f.wheelStartY=g.scrollTop,f.wheelDX=d,f.wheelDY=e,setTimeout(function(){if(null!=f.wheelStartX){var a=g.scrollLeft-f.wheelStartX,b=g.scrollTop-f.wheelStartY,c=b&&f.wheelDY&&b/f.wheelDY||a&&f.wheelDX&&a/f.wheelDX;f.wheelStartX=f.wheelStartY=null,c&&(Wf=(Wf*Vf+c)/(Vf+1),++Vf)}},200)):(f.wheelDX+=d,f.wheelDY+=e))}}function gc(a,b,c){if("string"==typeof b&&(b=jg[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=Jg}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function hc(a,b,c){for(var d=0;d<a.state.keyMaps.length;d++){var e=lg(b,a.state.keyMaps[d],c,a);if(e)return e}return a.options.extraKeys&&lg(b,a.options.extraKeys,c,a)||lg(b,a.options.keyMap,c,a)}function ic(a,b,c,d){var e=a.state.keySeq;if(e){if(mg(b))return"handled";Yf.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())}),b=e+" "+b}var f=hc(a,b,d);return"multi"==f&&(a.state.keySeq=b),"handled"==f&&xe(a,"keyHandled",a,b,c),"handled"!=f&&"multi"!=f||(Ag(c),Ma(a)),e&&!f&&/\'$/.test(b)?(Ag(c),!0):!!f}function jc(a,b){var c=ng(b,!0);return c?b.shiftKey&&!a.state.keySeq?ic(a,"Shift-"+c,b,function(b){return gc(a,b,!0)})||ic(a,c,b,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?gc(a,b):void 0}):ic(a,c,b,function(b){return gc(a,b)}):!1}function kc(a,b,c){return ic(a,"'"+c+"'",b,function(b){return gc(a,b,!0)})}function lc(a){var b=this;if(b.curOp.focus=Se(),!ze(b,a)){sf&&11>tf&&27==a.keyCode&&(a.returnValue=!1);var c=a.keyCode;b.display.shift=16==c||a.shiftKey;var d=jc(b,a);xf&&(Zf=d?c:null,!d&&88==c&&!ch&&(Df?a.metaKey:a.ctrlKey)&&b.replaceSelection("",null,"cut")),18!=c||/\bCodeMirror-crosshair\b/.test(b.display.lineDiv.className)||mc(b)}}function mc(a){function b(a){18!=a.keyCode&&a.altKey||(Yg(c,"CodeMirror-crosshair"),Fg(document,"keyup",b),Fg(document,"mouseover",b))}var c=a.display.lineDiv;Zg(c,"CodeMirror-crosshair"),Dg(document,"keyup",b),Dg(document,"mouseover",b)}function nc(a){16==a.keyCode&&(this.doc.sel.shift=!1),ze(this,a)}function oc(a){var b=this;if(!(Tb(b.display,a)||ze(b,a)||a.ctrlKey&&!a.altKey||Df&&a.metaKey)){var c=a.keyCode,d=a.charCode;if(xf&&c==Zf)return Zf=null,void Ag(a);if(!xf||a.which&&!(a.which<10)||!jc(b,a)){var e=String.fromCharCode(null==d?c:d);kc(b,a,e)||b.display.input.onKeyPress(a)}}}function pc(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,rc(a))},100)}function qc(a){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),"nocursor"!=a.options.readOnly&&(a.state.focused||(Gg(a,"focus",a),a.state.focused=!0,Zg(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),uf&&setTimeout(function(){a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Ma(a))}function rc(a){a.state.delayingBlurEvent||(a.state.focused&&(Gg(a,"blur",a),a.state.focused=!1,Yg(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function sc(a,b){Tb(a.display,b)||tc(a,b)||ze(a,b,"contextmenu")||a.display.input.onContextMenu(b)}function tc(a,b){return Be(a,"gutterContextMenu")?Zb(a,b,"gutterContextMenu",!1):!1}function uc(a,b){if(Mf(a,b.from)<0)return a;if(Mf(a,b.to)<=0)return $f(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;return a.line==b.to.line&&(d+=$f(b).ch-b.to.ch),Lf(c,d)}function vc(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new la(uc(e.anchor,b),uc(e.head,b)))}return ma(c,a.sel.primIndex)}function wc(a,b,c){return a.line==b.line?Lf(c.line,a.ch-b.ch+c.ch):Lf(c.line+(a.line-b.line),a.ch)}function xc(a,b,c){for(var d=[],e=Lf(a.first,0),f=e,g=0;g<b.length;g++){var h=b[g],i=wc(h.from,e,f),j=wc($f(h),e,f);if(e=h.to,f=j,"around"==c){var k=a.sel.ranges[g],l=Mf(k.head,k.anchor)<0;d[g]=new la(l?j:i,l?i:j)}else d[g]=new la(i,i)}return new ka(d,a.sel.primIndex)}function yc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=pa(a,b)),c&&(this.to=pa(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),Gg(a,"beforeChange",a,d),a.cm&&Gg(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function zc(a,b,c){if(a.cm){if(!a.cm.curOp)return Eb(a.cm,zc)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(Be(a,"beforeChange")||a.cm&&Be(a.cm,"beforeChange"))||(b=yc(a,b,!0))){var d=Jf&&!c&&hd(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)Ac(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else Ac(a,b)}}function Ac(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Mf(b.from,b.to)){var c=vc(a,b);ie(a,b,c,a.cm?a.cm.curOp.id:NaN),Dc(a,b,c,ed(a,b));var d=[];Wd(a,function(a,c){c||-1!=Ge(d,a.history)||(se(a.history,b),d.push(a.history)),Dc(a,b,null,ed(a,b))})}}function Bc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i<g.length&&(d=g[i],c?!d.ranges||d.equals(a.sel):d.ranges);i++);if(i!=g.length){for(e.lastOrigin=e.lastSelOrigin=null;d=g.pop(),d.ranges;){if(le(d,h),c&&!d.equals(a.sel))return void Aa(a,d,{clearRedo:!1});f=d}var j=[];le(f,h),h.push({changes:j,generation:e.generation}),e.generation=d.generation||++e.maxGeneration;for(var k=Be(a,"beforeChange")||a.cm&&Be(a.cm,"beforeChange"),i=d.changes.length-1;i>=0;--i){var l=d.changes[i];if(l.origin=b,k&&!yc(a,l,!1))return void(g.length=0);j.push(fe(a,l));var m=i?vc(a,l):Fe(g);Dc(a,l,m,gd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:$f(l)});var n=[];Wd(a,function(a,b){b||-1!=Ge(n,a.history)||(se(a.history,l),n.push(a.history)),Dc(a,l,null,gd(a,l))})}}}}function Cc(a,b){if(0!=b&&(a.first+=b,a.sel=new ka(He(a.sel.ranges,function(a){return new la(Lf(a.anchor.line+b,a.anchor.ch),Lf(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Jb(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Kb(a.cm,d,"gutter")}}function Dc(a,b,c,d){if(a.cm&&!a.cm.curOp)return Eb(a.cm,Dc)(a,b,c,d);if(b.to.line<a.first)return void Cc(a,b.text.length-1-(b.to.line-b.from.line));if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Cc(a,e),b={from:Lf(a.first,0),to:Lf(b.to.line+e,b.to.ch),text:[Fe(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:Lf(f,Yd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Zd(a,b.from,b.to),c||(c=vc(a,b)),a.cm?Ec(a.cm,b,d):Td(a,b,d),Ba(a,c,Kg)}}function Ec(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=ae(rd(Yd(d,g.line))),d.iter(j,h.line+1,function(a){return a==e.maxLine?(i=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&Ae(a),Td(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Na(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Jb(a):g.line!=h.line||1!=b.text.length||Sd(a.doc,b)?Jb(a,g.line,h.line+1,k):Kb(a,g.line,"text");var m=Be(a,"changes"),n=Be(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&xe(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Fc(a,b,c,d,e){if(d||(d=c),Mf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=a.splitLines(b)),zc(a,{from:c,to:d,text:b,origin:e})}function Gc(a,b){if(!ze(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!Af){var f=Pe("div","",null,"position: absolute; top: "+(b.top-c.viewOffset-Ra(a.display))+"px; height: "+(b.bottom-b.top+Ua(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.scrollIntoView(e),a.display.lineSpace.removeChild(f)}}}function Hc(a,b,c,d){null==d&&(d=0);for(var e=0;5>e;e++){var f=!1,g=nb(a,b),h=c&&c!=b?nb(a,c):g,i=Jc(a,Math.min(g.left,h.left),Math.min(g.top,h.top)-d,Math.max(g.left,h.left),Math.max(g.bottom,h.bottom)+d),j=a.doc.scrollTop,k=a.doc.scrollLeft;if(null!=i.scrollTop&&(dc(a,i.scrollTop),Math.abs(a.doc.scrollTop-j)>1&&(f=!0)),null!=i.scrollLeft&&(ec(a,i.scrollLeft),Math.abs(a.doc.scrollLeft-k)>1&&(f=!0)),!f)break}return g}function Ic(a,b,c,d,e){var f=Jc(a,b,c,d,e);null!=f.scrollTop&&dc(a,f.scrollTop),null!=f.scrollLeft&&ec(a,f.scrollLeft)}function Jc(a,b,c,d,e){var f=a.display,g=sb(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,i=Wa(a),j={};e-c>i&&(e=c+i);var k=a.doc.height+Sa(f),l=g>c,m=e>k-g;if(h>c)j.scrollTop=l?0:c;else if(e>h+i){var n=Math.min(c,(m?k:e)-i);n!=h&&(j.scrollTop=n)}var o=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft,p=Va(a)-(a.options.fixedGutter?f.gutters.offsetWidth:0),q=d-b>p;return q&&(d=b+p),10>b?j.scrollLeft=0:o>b?j.scrollLeft=Math.max(0,b-(q?0:10)):d>p+o-3&&(j.scrollLeft=d+(q?0:10)-p),j}function Kc(a,b,c){null==b&&null==c||Mc(a),null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b),null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c);
|
3 |
+
}function Lc(a){Mc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?Lf(b.line,b.ch-1):b,d=Lf(b.line,b.ch+1)),a.curOp.scrollToPos={from:c,to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function Mc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=ob(a,b.from),d=ob(a,b.to),e=Jc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(e.scrollLeft,e.scrollTop)}}function Nc(a,b,c,d){var e,f=a.doc;null==c&&(c="add"),"smart"==c&&(f.mode.indent?e=Qa(a,b):c="prev");var g=a.options.tabSize,h=Yd(f,b),i=Ng(h.text,null,g);h.stateAfter&&(h.stateAfter=null);var j,k=h.text.match(/^\s*/)[0];if(d||/\S/.test(h.text)){if("smart"==c&&(j=f.mode.indent(e,h.text.slice(k.length),h.text),j==Jg||j>150)){if(!d)return;c="prev"}}else j=0,c="not";"prev"==c?j=b>f.first?Ng(Yd(f,b-1).text,null,g):0:"add"==c?j=i+a.options.indentUnit:"subtract"==c?j=i-a.options.indentUnit:"number"==typeof c&&(j=i+c),j=Math.max(0,j);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(j/g);n;--n)m+=g,l+=" ";if(j>m&&(l+=Ee(j-m)),l!=k)return Fc(f,l,Lf(b,0),Lf(b,k.length),"+input"),h.stateAfter=null,!0;for(var n=0;n<f.sel.ranges.length;n++){var o=f.sel.ranges[n];if(o.head.line==b&&o.head.ch<k.length){var m=Lf(b,k.length);wa(f,n,new la(m,m));break}}}function Oc(a,b,c,d){var e=b,f=b;return"number"==typeof b?f=Yd(a,oa(a,b)):e=ae(b),null==e?null:(d(f,e)&&a.cm&&Kb(a.cm,e,c),f)}function Pc(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&Mf(f.from,Fe(d).to)<=0;){var g=d.pop();if(Mf(g.from,f.from)<0){f.from=g.from;break}}d.push(f)}Db(a,function(){for(var b=d.length-1;b>=0;b--)Fc(a.doc,"",d[b].from,d[b].to,"+delete");Lc(a)})}function Qc(a,b,c,d,e){function f(){var b=h+c;return b<a.first||b>=a.first+a.size?!1:(h=b,k=Yd(a,b))}function g(a){var b=(e?lf:mf)(k,i,c,!0);if(null==b){if(a||!f())return!1;i=e?(0>c?df:cf)(k):0>c?k.text.length:0}else i=b;return!0}var h=b.line,i=b.ch,j=c,k=Yd(a,h);if("char"==d)g();else if("column"==d)g(!0);else if("word"==d||"group"==d)for(var l=null,m="group"==d,n=a.cm&&a.cm.getHelper(b,"wordChars"),o=!0;!(0>c)||g(!o);o=!1){var p=k.text.charAt(i)||"\n",q=Me(p,n)?"w":m&&"\n"==p?"n":!m||/\s/.test(p)?null:"p";if(!m||o||q||(q="s"),l&&l!=q){0>c&&(c=1,g());break}if(q&&(l=q),c>0&&!g(!o))break}var r=Ga(a,Lf(h,i),b,j,!0);return Mf(b,r)||(r.hitSide=!0),r}function Rc(a,b,c,d){var e,f=a.doc,g=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);e=b.top+c*(h-(0>c?1.5:.5)*sb(a.display))}else"line"==d&&(e=c>0?b.bottom+3:b.top-3);for(;;){var i=qb(a,g,e);if(!i.outside)break;if(0>c?0>=e:e>=f.height){i.hitSide=!0;break}e+=5*c}return i}function Sc(b,c,d,e){a.defaults[b]=c,d&&(ag[b]=e?function(a,b,c){c!=bg&&d(a,b,c)}:d)}function Tc(a){for(var b,c,d,e,f=a.split(/-(?!$)/),a=f[f.length-1],g=0;g<f.length-1;g++){var h=f[g];if(/^(cmd|meta|m)$/i.test(h))e=!0;else if(/^a(lt)?$/i.test(h))b=!0;else if(/^(c|ctrl|control)$/i.test(h))c=!0;else{if(!/^s(hift)$/i.test(h))throw new Error("Unrecognized modifier name: "+h);d=!0}}return b&&(a="Alt-"+a),c&&(a="Ctrl-"+a),e&&(a="Cmd-"+a),d&&(a="Shift-"+a),a}function Uc(a){return"string"==typeof a?kg[a]:a}function Vc(a,b,c,d,e){if(d&&d.shared)return Wc(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return Eb(a.cm,Vc)(a,b,c,d,e);var f=new qg(a,e),g=Mf(b,c);if(d&&Ke(d,f,!1),g>0||0==g&&f.clearWhenEmpty!==!1)return f;if(f.replacedWith&&(f.collapsed=!0,f.widgetNode=Pe("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0)),f.collapsed){if(qd(a,b.line,b,c,f)||b.line!=c.line&&qd(a,c.line,b,c,f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Kf=!0}f.addToHistory&&ie(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var h,i=b.line,j=a.cm;if(a.iter(i,c.line+1,function(a){j&&f.collapsed&&!j.options.lineWrapping&&rd(a)==j.display.maxLine&&(h=!0),f.collapsed&&i!=b.line&&_d(a,0),bd(a,new $c(f,i==b.line?b.ch:null,i==c.line?c.ch:null)),++i}),f.collapsed&&a.iter(b.line,c.line+1,function(b){vd(a,b)&&_d(b,0)}),f.clearOnEnter&&Dg(f,"beforeCursorEnter",function(){f.clear()}),f.readOnly&&(Jf=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory()),f.collapsed&&(f.id=++pg,f.atomic=!0),j){if(h&&(j.curOp.updateMaxLine=!0),f.collapsed)Jb(j,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(var k=b.line;k<=c.line;k++)Kb(j,k,"text");f.atomic&&Da(j.doc),xe(j,"markerAdded",j,f)}return f}function Wc(a,b,c,d,e){d=Ke(d),d.shared=!1;var f=[Vc(a,b,c,d,e)],g=f[0],h=d.widgetNode;return Wd(a,function(a){h&&(d.widgetNode=h.cloneNode(!0)),f.push(Vc(a,pa(a,b),pa(a,c),d,e));for(var i=0;i<a.linked.length;++i)if(a.linked[i].isParent)return;g=Fe(f)}),new rg(f,g)}function Xc(a){return a.findMarks(Lf(a.first,0),a.clipPos(Lf(a.lastLine())),function(a){return a.parent})}function Yc(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=d.find(),f=a.clipPos(e.from),g=a.clipPos(e.to);if(Mf(f,g)){var h=Vc(a,f,g,d.primary,d.primary.type);d.markers.push(h),h.parent=d}}}function Zc(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Wd(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];-1==Ge(d,f.doc)&&(f.parent=null,c.markers.splice(e--,1))}}}function $c(a,b,c){this.marker=a,this.from=b,this.to=c}function _c(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function ad(a,b){for(var c,d=0;d<a.length;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function bd(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.attachLine(a)}function cd(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);if(h||f.from==b&&"bookmark"==g.type&&(!c||!f.marker.insertLeft)){var i=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);(d||(d=[])).push(new $c(g,f.from,i?null:f.to))}}return d}function dd(a,b,c){if(a)for(var d,e=0;e<a.length;++e){var f=a[e],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=b:f.to>b);if(h||f.from==b&&"bookmark"==g.type&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from<b);(d||(d=[])).push(new $c(g,i?null:f.from-b,null==f.to?null:f.to-b))}}return d}function ed(a,b){if(b.full)return null;var c=ra(a,b.from.line)&&Yd(a,b.from.line).markedSpans,d=ra(a,b.to.line)&&Yd(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==Mf(b.from,b.to),h=cd(c,e,g),i=dd(d,f,g),j=1==b.text.length,k=Fe(b.text).length+(j?e:0);if(h)for(var l=0;l<h.length;++l){var m=h[l];if(null==m.to){var n=_c(i,m.marker);n?j&&(m.to=null==n.to?null:n.to+k):m.to=e}}if(i)for(var l=0;l<i.length;++l){var m=i[l];if(null!=m.to&&(m.to+=k),null==m.from){var n=_c(h,m.marker);n||(m.from=k,j&&(h||(h=[])).push(m))}else m.from+=k,j&&(h||(h=[])).push(m)}h&&(h=fd(h)),i&&i!=h&&(i=fd(i));var o=[h];if(!j){var p,q=b.text.length-2;if(q>0&&h)for(var l=0;l<h.length;++l)null==h[l].to&&(p||(p=[])).push(new $c(h[l].marker,null,null));for(var l=0;q>l;++l)o.push(p);o.push(i)}return o}function fd(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&c.marker.clearWhenEmpty!==!1&&a.splice(b--,1)}return a.length?a:null}function gd(a,b){var c=oe(a,b),d=ed(a,b);if(!c)return d;if(!d)return c;for(var e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g)a:for(var h=0;h<g.length;++h){for(var i=g[h],j=0;j<f.length;++j)if(f[j].marker==i.marker)continue a;f.push(i)}else g&&(c[e]=g)}return c}function hd(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=Ge(d,c)||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;f<d.length;++f)for(var g=d[f],h=g.find(0),i=0;i<e.length;++i){var j=e[i];if(!(Mf(j.to,h.from)<0||Mf(j.from,h.to)>0)){var k=[i,1],l=Mf(j.from,h.from),m=Mf(j.to,h.to);(0>l||!g.inclusiveLeft&&!l)&&k.push({from:j.from,to:h.from}),(m>0||!g.inclusiveRight&&!m)&&k.push({from:h.to,to:j.to}),e.splice.apply(e,k),i+=k.length-1}}return e}function id(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function jd(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function kd(a){return a.inclusiveLeft?-1:0}function ld(a){return a.inclusiveRight?1:0}function md(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var d=a.find(),e=b.find(),f=Mf(d.from,e.from)||kd(a)-kd(b);if(f)return-f;var g=Mf(d.to,e.to)||ld(a)-ld(b);return g?g:b.id-a.id}function nd(a,b){var c,d=Kf&&a.markedSpans;if(d)for(var e,f=0;f<d.length;++f)e=d[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!c||md(c,e.marker)<0)&&(c=e.marker);return c}function od(a){return nd(a,!0)}function pd(a){return nd(a,!1)}function qd(a,b,c,d,e){var f=Yd(a,b),g=Kf&&f.markedSpans;if(g)for(var h=0;h<g.length;++h){var i=g[h];if(i.marker.collapsed){var j=i.marker.find(0),k=Mf(j.from,c)||kd(i.marker)-kd(e),l=Mf(j.to,d)||ld(i.marker)-ld(e);if(!(k>=0&&0>=l||0>=k&&l>=0)&&(0>=k&&(i.marker.inclusiveRight&&e.inclusiveLeft?Mf(j.to,c)>=0:Mf(j.to,c)>0)||k>=0&&(i.marker.inclusiveRight&&e.inclusiveLeft?Mf(j.from,d)<=0:Mf(j.from,d)<0)))return!0}}}function rd(a){for(var b;b=od(a);)a=b.find(-1,!0).line;return a}function sd(a){for(var b,c;b=pd(a);)a=b.find(1,!0).line,(c||(c=[])).push(a);return c}function td(a,b){var c=Yd(a,b),d=rd(c);return c==d?b:ae(d)}function ud(a,b){if(b>a.lastLine())return b;var c,d=Yd(a,b);if(!vd(a,d))return b;for(;c=pd(d);)d=c.find(1,!0).line;return ae(d)+1}function vd(a,b){var c=Kf&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed){if(null==d.from)return!0;if(!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&wd(a,b,d))return!0}}function wd(a,b,c){if(null==c.to){var d=c.marker.find(1,!0);return wd(a,d.line,_c(d.line.markedSpans,c.marker))}if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var e,f=0;f<b.markedSpans.length;++f)if(e=b.markedSpans[f],e.marker.collapsed&&!e.marker.widgetNode&&e.from==c.to&&(null==e.to||e.to!=c.from)&&(e.marker.inclusiveLeft||c.marker.inclusiveRight)&&wd(a,b,e))return!0}function xd(a,b,c){ce(b)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&Kc(a,null,c)}function yd(a){if(null!=a.height)return a.height;var b=a.doc.cm;if(!b)return 0;if(!Vg(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;"),a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;"),Re(b.display.measure,Pe("div",[a.node],null,c))}return a.height=a.node.parentNode.offsetHeight}function zd(a,b,c,d){var e=new sg(a,c,d),f=a.cm;return f&&e.noHScroll&&(f.display.alignWidgets=!0),Oc(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);if(null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e),e.line=b,f&&!vd(a,b)){var d=ce(b)<a.scrollTop;_d(b,b.height+yd(e)),d&&Kc(f,null,e.height),f.curOp.forceUpdate=!0}return!0}),e}function Ad(a,b,c,d){a.text=b,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),null!=a.order&&(a.order=null),id(a),jd(a,c);var e=d?d(a):1;e!=a.height&&_d(a,e)}function Bd(a){a.parent=null,id(a)}function Cd(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:new RegExp("(?:^|s)"+c[2]+"(?:$|s)").test(b[d])||(b[d]+=" "+c[2])}return a}function Dd(b,c){if(b.blankLine)return b.blankLine(c);if(b.innerMode){var d=a.innerMode(b,c);return d.mode.blankLine?d.mode.blankLine(d.state):void 0}}function Ed(b,c,d,e){for(var f=0;10>f;f++){e&&(e[0]=a.innerMode(b,d).mode);var g=b.token(c,d);if(c.pos>c.start)return g}throw new Error("Mode "+b.name+" failed to advance stream.")}function Fd(a,b,c,d){function e(a){return{start:l.start,end:l.pos,string:l.current(),type:f||null,state:a?hg(g.mode,k):k}}var f,g=a.doc,h=g.mode;b=pa(g,b);var i,j=Yd(g,b.line),k=Qa(a,b.line,c),l=new og(j.text,a.options.tabSize);for(d&&(i=[]);(d||l.pos<b.ch)&&!l.eol();)l.start=l.pos,f=Ed(h,l,k),d&&i.push(e(!0));return d?i:e()}function Gd(a,b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var i,j=0,k=null,l=new og(b,a.options.tabSize),m=a.options.addModeClass&&[null];for(""==b&&Cd(Dd(c,d),f);!l.eol();){if(l.pos>a.options.maxHighlightLength?(h=!1,g&&Jd(a,b,d,l.pos),l.pos=b.length,i=null):i=Cd(Ed(c,l,d,m),f),m){var n=m[0].name;n&&(i="m-"+(i?n+" "+i:n))}if(!h||k!=i){for(;j<l.start;)j=Math.min(l.start,j+5e4),e(j,k);k=i}l.start=l.pos}for(;j<l.pos;){var o=Math.min(l.pos,j+5e4);e(o,k),j=o}}function Hd(a,b,c,d){var e=[a.state.modeGen],f={};Gd(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(var g=0;g<a.state.overlays.length;++g){var h=a.state.overlays[g],i=1,j=0;Gd(a,b.text,h.mode,!0,function(a,b){for(var c=i;a>j;){var d=e[i];d>a&&e.splice(i,1,a,e[i+1],d),i+=2,j=Math.min(a,d)}if(b)if(h.opaque)e.splice(c,i-c,a,"cm-overlay "+b),i=c+2;else for(;i>c;c+=2){var f=e[c+1];e[c+1]=(f?f+" ":"")+"cm-overlay "+b}},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function Id(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=Qa(a,ae(b)),e=Hd(a,b,b.text.length>a.options.maxHighlightLength?hg(a.doc.mode,d):d);b.stateAfter=d,b.styles=e.styles,e.classes?b.styleClasses=e.classes:b.styleClasses&&(b.styleClasses=null),c===a.doc.frontier&&a.doc.frontier++}return b.styles}function Jd(a,b,c,d){var e=a.doc.mode,f=new og(b,a.options.tabSize);for(f.start=f.pos=d||0,""==b&&Dd(e,c);!f.eol();)Ed(e,f,c),f.start=f.pos}function Kd(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?vg:ug;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function Ld(a,b){var c=Pe("span",null,null,uf?"padding-right: .1px":null),d={pre:Pe("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,splitSpaces:(sf||uf)&&a.getOption("lineWrapping")};b.measure={};for(var e=0;e<=(b.rest?b.rest.length:0);e++){var f,g=e?b.rest[e-1]:b.line;d.pos=0,d.addToken=Nd,Ze(a.display.measure)&&(f=de(g))&&(d.addToken=Pd(d.addToken,f)),d.map=[];var h=b!=a.display.externalMeasured&&ae(g);Rd(g,d,Id(a,g,h)),g.styleClasses&&(g.styleClasses.bgClass&&(d.bgClass=Ue(g.styleClasses.bgClass,d.bgClass||"")),g.styleClasses.textClass&&(d.textClass=Ue(g.styleClasses.textClass,d.textClass||""))),0==d.map.length&&d.map.push(0,0,d.content.appendChild(Ye(a.display.measure))),0==e?(b.measure.map=d.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(d.map),(b.measure.caches||(b.measure.caches=[])).push({}))}if(uf){var i=d.content.lastChild;(/\bcm-tab\b/.test(i.className)||i.querySelector&&i.querySelector(".cm-tab"))&&(d.content.className="cm-tab-wrap-hack")}return Gg(a,"renderLine",a,b.line,d.pre),d.pre.className&&(d.textClass=Ue(d.pre.className,d.textClass||"")),d}function Md(a){var b=Pe("span","•","cm-invalidchar");return b.title="\\u"+a.charCodeAt(0).toString(16),b.setAttribute("aria-label",b.title),b}function Nd(a,b,c,d,e,f,g){if(b){var h=a.splitSpaces?b.replace(/ {3,}/g,Od):b,i=a.cm.state.specialChars,j=!1;if(i.test(b))for(var k=document.createDocumentFragment(),l=0;;){i.lastIndex=l;var m=i.exec(b),n=m?m.index-l:b.length-l;if(n){var o=document.createTextNode(h.slice(l,l+n));sf&&9>tf?k.appendChild(Pe("span",[o])):k.appendChild(o),a.map.push(a.pos,a.pos+n,o),a.col+=n,a.pos+=n}if(!m)break;if(l+=n+1," "==m[0]){var p=a.cm.options.tabSize,q=p-a.col%p,o=k.appendChild(Pe("span",Ee(q),"cm-tab"));o.setAttribute("role","presentation"),o.setAttribute("cm-text"," "),a.col+=q}else if("\r"==m[0]||"\n"==m[0]){var o=k.appendChild(Pe("span","\r"==m[0]?"␍":"","cm-invalidchar"));o.setAttribute("cm-text",m[0]),a.col+=1}else{var o=a.cm.options.specialCharPlaceholder(m[0]);o.setAttribute("cm-text",m[0]),sf&&9>tf?k.appendChild(Pe("span",[o])):k.appendChild(o),a.col+=1}a.map.push(a.pos,a.pos+1,o),a.pos++}else{a.col+=b.length;var k=document.createTextNode(h);a.map.push(a.pos,a.pos+b.length,k),sf&&9>tf&&(j=!0),a.pos+=b.length}if(c||d||e||j||g){var r=c||"";d&&(r+=d),e&&(r+=e);var s=Pe("span",[k],r,g);return f&&(s.title=f),a.content.appendChild(s)}a.content.appendChild(k)}}function Od(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":" ";return b+=" "}function Pd(a,b){return function(c,d,e,f,g,h,i){e=e?e+" cm-force-border":"cm-force-border";for(var j=c.pos,k=j+d.length;;){for(var l=0;l<b.length;l++){var m=b[l];if(m.to>j&&m.from<=j)break}if(m.to>=k)return a(c,d,e,f,g,h,i);a(c,d.slice(0,m.to-j),e,f,null,h,i),f=null,d=d.slice(m.to-j),j=m.to}}}function Qd(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e),!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id)),e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e)),a.pos+=b}function Rd(a,b,c){var d=a.markedSpans,e=a.text,f=0;if(d)for(var g,h,i,j,k,l,m,n=e.length,o=0,p=1,q="",r=0;;){if(r==o){i=j=k=l=h="",m=null,r=1/0;for(var s,t=[],u=0;u<d.length;++u){var v=d[u],w=v.marker;"bookmark"==w.type&&v.from==o&&w.widgetNode?t.push(w):v.from<=o&&(null==v.to||v.to>o||w.collapsed&&v.to==o&&v.from==o)?(null!=v.to&&v.to!=o&&r>v.to&&(r=v.to,j=""),w.className&&(i+=" "+w.className),w.css&&(h=(h?h+";":"")+w.css),w.startStyle&&v.from==o&&(k+=" "+w.startStyle),w.endStyle&&v.to==r&&(s||(s=[])).push(w.endStyle,v.to),w.title&&!l&&(l=w.title),w.collapsed&&(!m||md(m.marker,w)<0)&&(m=v)):v.from>o&&r>v.from&&(r=v.from)}if(s)for(var u=0;u<s.length;u+=2)s[u+1]==r&&(j+=" "+s[u]);if(!m||m.from==o)for(var u=0;u<t.length;++u)Qd(b,0,t[u]);if(m&&(m.from||0)==o){if(Qd(b,(null==m.to?n+1:m.to)-o,m.marker,null==m.from),null==m.to)return;m.to==o&&(m=!1)}}if(o>=n)break;for(var x=Math.min(n,r);;){if(q){var y=o+q.length;if(!m){var z=y>x?q.slice(0,x-o):q;b.addToken(b,z,g?g+i:i,k,o+z.length==r?j:"",l,h)}if(y>=x){q=q.slice(x-o),o=x;break}o=y,k=""}q=e.slice(f,f=c[p++]),g=Kd(c[p++],b.cm.options)}}else for(var p=1;p<c.length;p+=2)b.addToken(b,e.slice(f,f=c[p]),Kd(c[p+1],b.cm.options))}function Sd(a,b){return 0==b.from.ch&&0==b.to.ch&&""==Fe(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Td(a,b,c,d){function e(a){return c?c[a]:null}function f(a,c,e){Ad(a,c,e,d),xe(a,"change",a,b)}function g(a,b){for(var c=a,f=[];b>c;++c)f.push(new tg(j[c],e(c),d));return f}var h=b.from,i=b.to,j=b.text,k=Yd(a,h.line),l=Yd(a,i.line),m=Fe(j),n=e(j.length-1),o=i.line-h.line;if(b.full)a.insert(0,g(0,j.length)),a.remove(j.length,a.size-j.length);else if(Sd(a,b)){var p=g(0,j.length-1);f(l,l.text,n),o&&a.remove(h.line,o),p.length&&a.insert(h.line,p)}else if(k==l)if(1==j.length)f(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{var p=g(1,j.length-1);p.push(new tg(m+k.text.slice(i.ch),n,d)),f(k,k.text.slice(0,h.ch)+j[0],e(0)),a.insert(h.line+1,p)}else if(1==j.length)f(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),e(0)),a.remove(h.line+1,o);else{f(k,k.text.slice(0,h.ch)+j[0],e(0)),f(l,m+l.text.slice(i.ch),n);var p=g(1,j.length-1);o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,p)}xe(a,"change",a,b)}function Ud(a){this.lines=a,this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Vd(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize(),c+=e.height,e.parent=this}this.size=b,this.height=c,this.parent=null}function Wd(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;g<a.linked.length;++g){var h=a.linked[g];if(h.doc!=e){var i=f&&h.sharedHist;c&&!i||(b(h.doc,i),d(h.doc,a,i))}}}d(a,null,!0)}function Xd(a,b){if(b.cm)throw new Error("This document is already in use.");a.doc=b,b.cm=a,g(a),c(a),a.options.lineWrapping||m(a),a.options.mode=b.modeOption,Jb(a)}function Yd(a,b){if(b-=a.first,0>b||b>=a.size)throw new Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(f>b){c=e;break}b-=f}return c.lines[b]}function Zd(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function $d(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function _d(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function ae(a){if(null==a.parent)return null;for(var b=a.parent,c=Ge(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function be(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(f>b){a=e;continue a}b-=f,c+=e.chunkSize()}return c}while(!a.lines);for(var d=0;d<a.lines.length;++d){var g=a.lines[d],h=g.height;if(h>b)break;b-=h}return c+d}function ce(a){a=rd(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;b+=e.height}for(var f=c.parent;f;c=f,f=c.parent)for(var d=0;d<f.children.length;++d){var g=f.children[d];if(g==c)break;b+=g.height}return b}function de(a){var b=a.order;return null==b&&(b=a.order=gh(a.text)),b}function ee(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function fe(a,b){var c={from:V(b.from),to:$f(b),text:Zd(a,b.from,b.to)};return me(a,c,b.from.line,b.to.line+1),Wd(a,function(a){me(a,c,b.from.line,b.to.line+1)},!0),c}function ge(a){for(;a.length;){var b=Fe(a);if(!b.ranges)break;a.pop()}}function he(a,b){return b?(ge(a.done),Fe(a.done)):a.done.length&&!Fe(a.done).ranges?Fe(a.done):a.done.length>1&&!a.done[a.done.length-2].ranges?(a.done.pop(),Fe(a.done)):void 0}function ie(a,b,c,d){var e=a.history;e.undone.length=0;var f,g=+new Date;if((e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>g-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))&&(f=he(e,e.lastOp==d))){var h=Fe(f.changes);0==Mf(b.from,b.to)&&0==Mf(b.from,h.to)?h.to=$f(b):f.changes.push(fe(a,b))}else{var i=Fe(e.done);for(i&&i.ranges||le(a.sel,e.done),f={changes:[fe(a,b)],generation:e.generation},e.done.push(f);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift()}e.done.push(c),e.generation=++e.maxGeneration,e.lastModTime=e.lastSelTime=g,e.lastOp=e.lastSelOp=d,e.lastOrigin=e.lastSelOrigin=b.origin,h||Gg(a,"historyAdded")}function je(a,b,c,d){var e=b.charAt(0);return"*"==e||"+"==e&&c.ranges.length==d.ranges.length&&c.somethingSelected()==d.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function ke(a,b,c,d){var e=a.history,f=d&&d.origin;c==e.lastSelOp||f&&e.lastSelOrigin==f&&(e.lastModTime==e.lastSelTime&&e.lastOrigin==f||je(a,f,Fe(e.done),b))?e.done[e.done.length-1]=b:le(b,e.done),e.lastSelTime=+new Date,e.lastSelOrigin=f,e.lastSelOp=c,d&&d.clearRedo!==!1&&ge(e.undone)}function le(a,b){var c=Fe(b);c&&c.ranges&&c.equals(a)||b.push(a)}function me(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 ne(a){if(!a)return null;for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function oe(a,b){var c=b["spans_"+a.id];if(!c)return null;for(var d=0,e=[];d<b.text.length;++d)e.push(ne(c[d]));return e}function pe(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?ka.prototype.deepCopy.call(f):f);else{var g=f.changes,h=[];e.push({changes:h});for(var i=0;i<g.length;++i){var j,k=g[i];if(h.push({from:k.from,to:k.to,text:k.text}),b)for(var l in k)(j=l.match(/^spans_(\d+)$/))&&Ge(b,Number(j[1]))>-1&&(Fe(h)[l]=k[l],delete k[l])}}}return e}function qe(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function re(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)qe(f.ranges[h].anchor,b,c,d),qe(f.ranges[h].head,b,c,d)}else{for(var h=0;h<f.changes.length;++h){var i=f.changes[h];if(c<i.from.line)i.from=Lf(i.from.line+d,i.from.ch),i.to=Lf(i.to.line+d,i.to.ch);else if(b<=i.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function se(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;re(a.done,c,d,e),re(a.undone,c,d,e)}function te(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function ue(a){return a.target||a.srcElement}function ve(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),Df&&a.ctrlKey&&1==b&&(b=3),b}function we(a,b,c){var d=a._handlers&&a._handlers[b];return c?d&&d.length>0?d.slice():Eg:d||Eg}function xe(a,b){function c(a){return function(){a.apply(null,f)}}var d=we(a,b,!1);if(d.length){var e,f=Array.prototype.slice.call(arguments,2);Sf?e=Sf.delayedCallbacks:Hg?e=Hg:(e=Hg=[],setTimeout(ye,0));for(var g=0;g<d.length;++g)e.push(c(d[g]))}}function ye(){var a=Hg;Hg=null;for(var b=0;b<a.length;++b)a[b]()}function ze(a,b,c){return"string"==typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}}),Gg(a,c||b.type,a,b),te(b)||b.codemirrorIgnore}function Ae(a){var b=a._handlers&&a._handlers.cursorActivity;if(b)for(var c=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),d=0;d<b.length;++d)-1==Ge(c,b[d])&&c.push(b[d])}function Be(a,b){return we(a,b).length>0}function Ce(a){a.prototype.on=function(a,b){Dg(this,a,b)},a.prototype.off=function(a,b){Fg(this,a,b)}}function De(){this.id=null}function Ee(a){for(;Pg.length<=a;)Pg.push(Fe(Pg)+" ");return Pg[a]}function Fe(a){return a[a.length-1]}function Ge(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function He(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Ie(){}function Je(a,b){var c;return Object.create?c=Object.create(a):(Ie.prototype=a,c=new Ie),b&&Ke(b,c),c}function Ke(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||c===!1&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function Le(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Me(a,b){return b?b.source.indexOf("\\w")>-1&&Tg(a)?!0:b.test(a):Tg(a)}function Ne(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function Oe(a){return a.charCodeAt(0)>=768&&Ug.test(a)}function Pe(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)e.appendChild(document.createTextNode(b));else if(b)for(var f=0;f<b.length;++f)e.appendChild(b[f]);return e}function Qe(a){for(var b=a.childNodes.length;b>0;--b)a.removeChild(a.firstChild);return a}function Re(a,b){return Qe(a).appendChild(b)}function Se(){for(var a=document.activeElement;a&&a.root&&a.root.activeElement;)a=a.root.activeElement;return a}function Te(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function Ue(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Te(c[d]).test(b)&&(b+=" "+c[d]);return b}function Ve(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function We(){$g||(Xe(),$g=!0)}function Xe(){var a;Dg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,Ve(Sb)},100))}),Dg(window,"blur",function(){Ve(rc)})}function Ye(a){if(null==Wg){var b=Pe("span","");Re(a,Pe("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Wg=b.offsetWidth<=1&&b.offsetHeight>2&&!(sf&&8>tf))}var c=Wg?Pe("span",""):Pe("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function Ze(a){if(null!=Xg)return Xg;var b=Re(a,document.createTextNode("AخA")),c=Rg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Rg(b,1,2).getBoundingClientRect();return Xg=d.right-c.right<3}function $e(a){if(null!=dh)return dh;var b=Re(a,Pe("span","x")),c=b.getBoundingClientRect(),d=Rg(b,0,1).getBoundingClientRect();return dh=Math.abs(c.left-d.left)>1}function _e(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function af(a){return a.level%2?a.to:a.from}function bf(a){return a.level%2?a.from:a.to}function cf(a){var b=de(a);return b?af(b[0]):0}function df(a){var b=de(a);return b?bf(Fe(b)):a.text.length}function ef(a,b){var c=Yd(a.doc,b),d=rd(c);d!=c&&(b=ae(d));var e=de(d),f=e?e[0].level%2?df(d):cf(d):0;return Lf(b,f)}function ff(a,b){for(var c,d=Yd(a.doc,b);c=pd(d);)d=c.find(1,!0).line,b=null;var e=de(d),f=e?e[0].level%2?cf(d):df(d):d.text.length;return Lf(null==b?ae(d):b,f)}function gf(a,b){var c=ef(a,b.line),d=Yd(a.doc,c.line),e=de(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Lf(c.line,g?0:f)}return c}function hf(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function jf(a,b){fh=null;for(var c,d=0;d<a.length;++d){var e=a[d];if(e.from<b&&e.to>b)return d;if(e.from==b||e.to==b){if(null!=c)return hf(a,e.level,a[c].level)?(e.from!=e.to&&(fh=c),d):(e.from!=e.to&&(fh=d),c);c=d}}return c}function kf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Oe(a.text.charAt(b)));return b}function lf(a,b,c,d){var e=de(a);if(!e)return mf(a,b,c,d);for(var f=jf(e,b),g=e[f],h=kf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return jf(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?kf(a,g.to,-1,d):kf(a,g.from,1,d)}}function mf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Oe(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var nf=navigator.userAgent,of=navigator.platform,pf=/gecko\/\d/i.test(nf),qf=/MSIE \d/.test(nf),rf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(nf),sf=qf||rf,tf=sf&&(qf?document.documentMode||6:rf[1]),uf=/WebKit\//.test(nf),vf=uf&&/Qt\/\d+\.\d+/.test(nf),wf=/Chrome\//.test(nf),xf=/Opera\//.test(nf),yf=/Apple Computer/.test(navigator.vendor),zf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(nf),Af=/PhantomJS/.test(nf),Bf=/AppleWebKit/.test(nf)&&/Mobile\/\w+/.test(nf),Cf=Bf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(nf),Df=Bf||/Mac/.test(of),Ef=/\bCrOS\b/.test(nf),Ff=/win/i.test(of),Gf=xf&&nf.match(/Version\/(\d*\.\d*)/);Gf&&(Gf=Number(Gf[1])),Gf&&Gf>=15&&(xf=!1,uf=!0);var Hf=Df&&(vf||xf&&(null==Gf||12.11>Gf)),If=pf||sf&&tf>=9,Jf=!1,Kf=!1;p.prototype=Ke({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(b){this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px";var f=a.viewWidth-a.barLeft-(c?d:0);this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+f+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(0==d&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var a=Df&&!zf?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new De,this.disableVert=new De},enableZeroWidthBar:function(a,b){function c(){var d=a.getBoundingClientRect(),e=document.elementFromPoint(d.left+1,d.bottom-1);e!=a?a.style.pointerEvents="none":b.set(1e3,c)}a.style.pointerEvents="auto",b.set(1e3,c)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)}},p.prototype),q.prototype=Ke({update:function(){
|
4 |
+
return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},q.prototype),a.scrollbarModel={"native":p,"null":q},z.prototype.signal=function(a,b){Be(a,b)&&this.events.push(arguments)},z.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Gg.apply(null,this.events[a])};var Lf=a.Pos=function(a,b){return this instanceof Lf?(this.line=a,void(this.ch=b)):new Lf(a,b)},Mf=a.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},Nf=null;ca.prototype=Ke({init:function(a){function b(a){if(!ze(d,a)){if(d.somethingSelected())Nf={lineWise:!1,text:d.getSelections()},c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,f.value=Nf.text.join("\n"),Qg(f));else{if(!d.options.lineWiseCopyCut)return;var b=aa(d);Nf={lineWise:!0,text:b.text},"cut"==a.type?d.setSelections(b.ranges,null,Kg):(c.prevInput="",f.value=b.text.join("\n"),Qg(f))}"cut"==a.type&&(d.state.cutIncoming=!0)}}var c=this,d=this.cm,e=this.wrapper=da(),f=this.textarea=e.firstChild;a.wrapper.insertBefore(e,a.wrapper.firstChild),Bf&&(f.style.width="0px"),Dg(f,"input",function(){sf&&tf>=9&&c.hasSelection&&(c.hasSelection=null),c.poll()}),Dg(f,"paste",function(a){ze(d,a)||$(a,d)||(d.state.pasteIncoming=!0,c.fastPoll())}),Dg(f,"cut",b),Dg(f,"copy",b),Dg(a.scroller,"paste",function(b){Tb(a,b)||ze(d,b)||(d.state.pasteIncoming=!0,c.focus())}),Dg(a.lineSpace,"selectstart",function(b){Tb(a,b)||Ag(b)}),Dg(f,"compositionstart",function(){var a=d.getCursor("from");c.composing&&c.composing.range.clear(),c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}}),Dg(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=this.cm,b=a.display,c=a.doc,d=Ja(a);if(a.options.moveInputWithCursor){var e=nb(a,c.sel.primary().head,"div"),f=b.wrapper.getBoundingClientRect(),g=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,e.top+g.top-f.top)),d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,e.left+g.left-f.left))}return d},showSelection:function(a){var b=this.cm,c=b.display;Re(c.cursorDiv,a.cursors),Re(c.selectionDiv,a.selection),null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;if(d.somethingSelected()){this.prevInput="";var f=e.sel.primary();b=ch&&(f.to().line-f.from().line>100||(c=d.getSelection()).length>1e3);var g=b?"-":c||d.getSelection();this.textarea.value=g,d.state.focused&&Qg(this.textarea),sf&&tf>=9&&(this.hasSelection=g)}else a||(this.prevInput=this.textarea.value="",sf&&tf>=9&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Cf||Se()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){var d=c.poll();d||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0,c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(this.contextMenuPending||!a.state.focused||bh(b)&&!c&&!this.composing||a.isReadOnly()||a.options.disableInput||a.state.keySeq)return!1;var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(sf&&tf>=9&&this.hasSelection===d||Df&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==a.display.selForContextMenu){var e=d.charCodeAt(0);if(8203!=e||c||(c=""),8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,g=Math.min(c.length,d.length);g>f&&c.charCodeAt(f)==d.charCodeAt(f);)++f;var h=this;return Db(a,function(){Z(a,d.slice(f),c.length-f,null,h.composing?"*compose":null),d.length>1e3||d.indexOf("\n")>-1?b.value=h.prevInput="":h.prevInput=d,h.composing&&(h.composing.range.clear(),h.composing.range=a.markText(h.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){sf&&tf>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b=""+(a?g.value:"");g.value="⇚",g.value=b,d.prevInput=a?"":"",g.selectionStart=1,g.selectionEnd=b.length,f.selForContextMenu=e.doc.sel}}function c(){if(d.contextMenuPending=!1,d.wrapper.style.cssText=l,g.style.cssText=k,sf&&9>tf&&f.scrollbars.setScrollTop(f.scroller.scrollTop=i),null!=g.selectionStart){(!sf||sf&&9>tf)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&g.selectionEnd>0&&""==d.prevInput?Eb(e,jg.selectAll)(e):a++<10?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Ub(e,a),i=f.scroller.scrollTop;if(h&&!xf){var j=e.options.resetSelectionOnContextMenu;j&&-1==e.doc.sel.contains(h)&&Eb(e,Aa)(e.doc,na(h),Kg);var k=g.style.cssText,l=d.wrapper.style.cssText;d.wrapper.style.cssText="position: absolute";var m=d.wrapper.getBoundingClientRect();if(g.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(a.clientY-m.top-5)+"px; left: "+(a.clientX-m.left-5)+"px; z-index: 1000; background: "+(sf?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",uf)var n=window.scrollY;if(f.input.focus(),uf&&window.scrollTo(null,n),f.input.reset(),e.somethingSelected()||(g.value=d.prevInput=" "),d.contextMenuPending=!0,f.selForContextMenu=e.doc.sel,clearTimeout(f.detectingSelectAll),sf&&tf>=9&&b(),If){Cg(a);var o=function(){Fg(window,"mouseup",o),setTimeout(c,20)};Dg(window,"mouseup",o)}else setTimeout(c,50)}},readOnlyChanged:function(a){a||this.reset()},setUneditable:Ie,needsContentAttribute:!1},ca.prototype),ea.prototype=Ke({init:function(a){function b(a){if(!ze(d,a)){if(d.somethingSelected())Nf={lineWise:!1,text:d.getSelections()},"cut"==a.type&&d.replaceSelection("",null,"cut");else{if(!d.options.lineWiseCopyCut)return;var b=aa(d);Nf={lineWise:!0,text:b.text},"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,Kg),d.replaceSelection("",null,"cut")})}if(a.clipboardData&&!Bf)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",Nf.text.join("\n"));else{var c=da(),e=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild),e.value=Nf.text.join("\n");var f=document.activeElement;Qg(e),setTimeout(function(){d.display.lineSpace.removeChild(c),f.focus()},50)}}}var c=this,d=c.cm,e=c.div=a.lineDiv;ba(e),Dg(e,"paste",function(a){ze(d,a)||$(a,d)}),Dg(e,"compositionstart",function(a){var b=a.data;if(c.composing={sel:d.doc.sel,data:b,startData:b},b){var e=d.doc.sel.primary(),f=d.getLine(e.head.line),g=f.indexOf(b,Math.max(0,e.head.ch-b.length));g>-1&&g<=e.head.ch&&(c.composing.sel=na(Lf(e.head.line,g),Lf(e.head.line,g+b.length)))}}),Dg(e,"compositionupdate",function(a){c.composing.data=a.data}),Dg(e,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=a.data),setTimeout(function(){b.handled||c.applyComposition(b),c.composing==b&&(c.composing=null)},50))}),Dg(e,"touchstart",function(){c.forceCompositionEnd()}),Dg(e,"input",function(){c.composing||!d.isReadOnly()&&c.pollContent()||Db(c.cm,function(){Jb(d)})}),Dg(e,"copy",b),Dg(e,"cut",b)},prepareSelection:function(){var a=Ja(this.cm,!1);return a.focus=this.cm.state.focused,a},showSelection:function(a,b){a&&this.cm.display.view.length&&((a.focus||b)&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=window.getSelection(),b=this.cm.doc.sel.primary(),c=ha(this.cm,a.anchorNode,a.anchorOffset),d=ha(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=Mf(X(c,d),b.from())||0!=Mf(W(c,d),b.to())){var e=fa(this.cm,b.from()),f=fa(this.cm,b.to());if(e||f){var g=this.cm.display.view,h=a.rangeCount&&a.getRangeAt(0);if(e){if(!f){var i=g[g.length-1].measure,j=i.maps?i.maps[i.maps.length-1]:i.map;f={node:j[j.length-1],offset:j[j.length-2]-j[j.length-3]}}}else e={node:g[0].measure.map[2],offset:0};try{var k=Rg(e.node,e.offset,f.offset,f.node)}catch(l){}k&&(!pf&&this.cm.state.focused?(a.collapse(e.node,e.offset),k.collapsed||a.addRange(k)):(a.removeAllRanges(),a.addRange(k)),h&&null==a.anchorNode?a.addRange(h):pf&&this.startGracePeriod()),this.rememberSelection()}}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){Re(this.cm.display.cursorDiv,a.cursors),Re(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;var b=a.getRangeAt(0).commonAncestorContainer;return Vg(this.div,b)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():Db(this.cm,function(){b.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=window.getSelection(),b=this.cm;this.rememberSelection();var c=ha(b,a.anchorNode,a.anchorOffset),d=ha(b,a.focusNode,a.focusOffset);c&&d&&Db(b,function(){Aa(b.doc,na(c,d),Kg),(c.bad||d.bad)&&(b.curOp.selectionChanged=!0)})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var f;if(d.line==b.viewFrom||0==(f=Mb(a,d.line)))var g=ae(b.view[0].line),h=b.view[0].node;else var g=ae(b.view[f].line),h=b.view[f-1].node.nextSibling;var i=Mb(a,e.line);if(i==b.view.length-1)var j=b.viewTo-1,k=b.lineDiv.lastChild;else var j=ae(b.view[i+1].line)-1,k=b.view[i+1].node.previousSibling;for(var l=a.doc.splitLines(ja(a,h,k,g,j)),m=Zd(a.doc,Lf(g,0),Lf(j,Yd(a.doc,j).text.length));l.length>1&&m.length>1;)if(Fe(l)==Fe(m))l.pop(),m.pop(),j--;else{if(l[0]!=m[0])break;l.shift(),m.shift(),g++}for(var n=0,o=0,p=l[0],q=m[0],r=Math.min(p.length,q.length);r>n&&p.charCodeAt(n)==q.charCodeAt(n);)++n;for(var s=Fe(l),t=Fe(m),u=Math.min(s.length-(1==l.length?n:0),t.length-(1==m.length?n:0));u>o&&s.charCodeAt(s.length-o-1)==t.charCodeAt(t.length-o-1);)++o;l[l.length-1]=s.slice(0,s.length-o),l[0]=l[0].slice(n);var v=Lf(g,n),w=Lf(j,m.length?Fe(m).length-o:0);return l.length>1||l[0]||Mf(v,w)?(Fc(a.doc,l,v,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){this.cm.isReadOnly()?Eb(this.cm,Jb)(this.cm):a.data&&a.data!=a.startData&&Eb(this.cm,Z)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.contentEditable="false"},onKeyPress:function(a){a.preventDefault(),this.cm.isReadOnly()||Eb(this.cm,Z)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},readOnlyChanged:function(a){this.div.contentEditable=String("nocursor"!=a)},onContextMenu:Ie,resetPosition:Ie,needsContentAttribute:!0},ea.prototype),a.inputStyles={textarea:ca,contenteditable:ea},ka.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=Mf(c.anchor,d.anchor)||0!=Mf(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new la(V(this.ranges[b].anchor),V(this.ranges[b].head));return new ka(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(Mf(b,d.from())>=0&&Mf(a,d.to())<=0)return c}return-1}},la.prototype={from:function(){return X(this.anchor,this.head)},to:function(){return W(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var Of,Pf,Qf,Rf={left:0,right:0,top:0,bottom:0},Sf=null,Tf=0,Uf=0,Vf=0,Wf=null;sf?Wf=-.53:pf?Wf=15:wf?Wf=-.7:yf&&(Wf=-1/3);var Xf=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;return null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail),null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta),{x:b,y:c}};a.wheelEventPixels=function(a){var b=Xf(a);return b.x*=Wf,b.y*=Wf,b};var Yf=new De,Zf=null,$f=a.changeEnd=function(a){return a.text?Lf(a.from.line+a.text.length-1,Fe(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];c[a]==b&&"mode"!=a||(c[a]=b,ag.hasOwnProperty(a)&&Eb(this,ag[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](Uc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:Fb(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:d,modeSpec:b,opaque:c&&c.opaque}),this.state.modeGen++,Jb(this)}),removeOverlay:Fb(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a)return b.splice(c,1),this.state.modeGen++,void Jb(this)}}),indentLine:Fb(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),ra(this.doc,a)&&Nc(this,a,b,c)}),indentSelection:Fb(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=b[d];if(e.empty())e.head.line>c&&(Nc(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Lc(this));else{var f=e.from(),g=e.to(),h=Math.max(c,f.line);c=Math.min(this.lastLine(),g.line-(g.ch?0:1))+1;for(var i=h;c>i;++i)Nc(this,i,a);var j=this.doc.sel.ranges;0==f.ch&&b.length==j.length&&j[d].from().ch>0&&wa(this.doc,d,new la(f,j[d].to()),Kg)}}}),getTokenAt:function(a,b){return Fd(this,a,b)},getLineTokens:function(a,b){return Fd(this,Lf(a),b,!0)},getTokenTypeAt:function(a){a=pa(this.doc,a);var b,c=Id(this,Yd(this.doc,a.line)),d=0,e=(c.length-1)/2,f=a.ch;if(0==f)b=c[2];else for(;;){var g=d+e>>1;if((g?c[2*g-1]:0)>=f)e=g;else{if(!(c[2*g+1]<f)){b=c[2*g+2];break}d=g+1}}var h=b?b.indexOf("cm-overlay "):-1;return 0>h?b:0==h?null:b.slice(0,h-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!gg.hasOwnProperty(b))return c;var d=gg[b],e=this.getModeAt(a);if("string"==typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(var f=0;f<d._global.length;f++){var h=d._global[f];h.pred(e,this)&&-1==Ge(c,h.val)&&c.push(h.val)}return c},getStateAfter:function(a,b){var c=this.doc;return a=oa(c,null==a?c.first+c.size-1:a),Qa(this,a+1,b)},cursorCoords:function(a,b){var c,d=this.doc.sel.primary();return c=null==a?d.head:"object"==typeof a?pa(this.doc,a):a?d.from():d.to(),nb(this,c,b||"page")},charCoords:function(a,b){return mb(this,pa(this.doc,a),b||"page")},coordsChar:function(a,b){return a=lb(this,a,b||"page"),qb(this,a.left,a.top)},lineAtHeight:function(a,b){return a=lb(this,{top:a,left:0},b||"page").top,be(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c,d=!1;if("number"==typeof a){var e=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0),c=Yd(this.doc,a)}else c=a;return kb(this,c,{top:0,left:0},b||"page").top+(d?this.doc.height-ce(c):0)},defaultTextHeight:function(){return sb(this.display)},defaultCharWidth:function(){return tb(this.display)},setGutterMarker:Fb(function(a,b,c){return Oc(this.doc,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Ne(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Fb(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Kb(b,d,"gutter"),Ne(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),lineInfo:function(a){if("number"==typeof a){if(!ra(this.doc,a))return null;var b=a;if(a=Yd(this.doc,a),!a)return null}else{var b=ae(a);if(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.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=nb(this,pa(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",b.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(b),f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=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>j&&(h=j-b.offsetWidth)}b.style.top=g+"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&&Ic(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Fb(lc),triggerOnKeyPress:Fb(oc),triggerOnKeyUp:nc,execCommand:function(a){return jg.hasOwnProperty(a)?jg[a].call(null,this):void 0},triggerElectric:Fb(function(a){_(this,a)}),findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=pa(this.doc,a);b>f&&(g=Qc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Fb(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?Qc(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Mg)}),deleteH:Fb(function(a,b){var c=this.doc.sel,d=this.doc;c.somethingSelected()?d.replaceSelection("",null,"+delete"):Pc(this,function(c){var e=Qc(d,c.head,a,b,!1);return 0>a?{from:e,to:c.head}:{from:c.head,to:e}})}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=pa(this.doc,a);b>g;++g){var i=nb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Rc(this,i,e,c),h.hitSide)break}return h},moveV:Fb(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();if(d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var h=nb(c,g.head,"div");null!=g.goalColumn&&(h.left=g.goalColumn),e.push(h.left);var i=Rc(c,h,a,b);return"page"==b&&g==d.sel.primary()&&Kc(c,null,mb(c,i,"div").top-h.top),i},Mg),e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=this.doc,c=Yd(b,a.line).text,d=a.ch,e=a.ch;if(c){var f=this.getHelper(a,"wordChars");(a.xRel<0||e==c.length)&&d?--d:++e;for(var g=c.charAt(d),h=Me(g,f)?function(a){return Me(a,f)}:/\s/.test(g)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Me(a)};d>0&&h(c.charAt(d-1));)--d;for(;e<c.length&&h(c.charAt(e));)++e}return new la(Lf(a.line,d),Lf(a.line,e))},toggleOverwrite:function(a){null!=a&&a==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Zg(this.display.cursorDiv,"CodeMirror-overwrite"):Yg(this.display.cursorDiv,"CodeMirror-overwrite"),Gg(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Se()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Fb(function(a,b){null==a&&null==b||Mc(this),null!=a&&(this.curOp.scrollLeft=a),null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Ua(this)-this.display.barHeight,width:a.scrollWidth-Ua(this)-this.display.barWidth,clientHeight:Wa(this),clientWidth:Va(this)}},scrollIntoView:Fb(function(a,b){if(null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:Lf(a,0),to:null}:null==a.from&&(a={from:a,to:null}),a.to||(a.to=a.from),a.margin=b||0,null!=a.from.line)Mc(this),this.curOp.scrollToPos=a;else{var c=Jc(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:Fb(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var d=this;null!=a&&(d.display.wrapper.style.width=c(a)),null!=b&&(d.display.wrapper.style.height=c(b)),d.options.lineWrapping&&gb(this);var e=d.display.viewFrom;d.doc.iter(e,d.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){Kb(d,e,"widget");break}++e}),d.curOp.forceUpdate=!0,Gg(d,"refresh",this)}),operation:function(a){return Db(this,a)},refresh:Fb(function(){var a=this.display.cachedTextHeight;Jb(this),this.curOp.forceUpdate=!0,hb(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),k(this),(null==a||Math.abs(a-sb(this.display))>.5)&&g(this),Gg(this,"refresh",this)}),swapDoc:Fb(function(a){var b=this.doc;return b.cm=null,Xd(this,a),hb(this),this.display.input.reset(),this.scrollTo(a.scrollLeft,a.scrollTop),this.curOp.forceScroll=!0,xe(this,"swapDoc",this,b),b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Ce(a);var _f=a.defaults={},ag=a.optionHandlers={},bg=a.Init={toString:function(){return"CodeMirror.Init"}};Sc("value","",function(a,b){a.setValue(b)},!0),Sc("mode",null,function(a,b){a.doc.modeOption=b,c(a)},!0),Sc("indentUnit",2,c,!0),Sc("indentWithTabs",!1),Sc("smartIndent",!0),Sc("tabSize",4,function(a){d(a),hb(a),Jb(a)},!0),Sc("lineSeparator",null,function(a,b){if(a.doc.lineSep=b,b){var c=[],d=a.doc.first;a.doc.iter(function(a){for(var e=0;;){var f=a.text.indexOf(b,e);if(-1==f)break;e=f+b.length,c.push(Lf(d,f))}d++});for(var e=c.length-1;e>=0;e--)Fc(a.doc,b,c[e],Lf(c[e].line,c[e].ch+b.length))}}),Sc("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(b,c,d){b.state.specialChars=new RegExp(c.source+(c.test(" ")?"":"| "),"g"),d!=a.Init&&b.refresh()}),Sc("specialCharPlaceholder",Md,function(a){a.refresh()},!0),Sc("electricChars",!0),Sc("inputStyle",Cf?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Sc("rtlMoveVisually",!Ff),Sc("wholeLineUpdateBefore",!0),Sc("theme","default",function(a){h(a),i(a)},!0),Sc("keyMap","default",function(b,c,d){var e=Uc(c),f=d!=a.Init&&Uc(d);f&&f.detach&&f.detach(b,e),e.attach&&e.attach(b,f||null)}),Sc("extraKeys",null),Sc("lineWrapping",!1,e,!0),Sc("gutters",[],function(a){n(a.options),i(a)},!0),Sc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?y(a.display)+"px":"0",a.refresh()},!0),Sc("coverGutterNextToScrollbar",!1,function(a){s(a)},!0),Sc("scrollbarStyle","native",function(a){r(a),s(a),a.display.scrollbars.setScrollTop(a.doc.scrollTop),a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},!0),Sc("lineNumbers",!1,function(a){n(a.options),i(a)},!0),Sc("firstLineNumber",1,i,!0),Sc("lineNumberFormatter",function(a){return a},i,!0),Sc("showCursorWhenSelecting",!1,Ia,!0),Sc("resetSelectionOnContextMenu",!0),Sc("lineWiseCopyCut",!0),Sc("readOnly",!1,function(a,b){"nocursor"==b?(rc(a),a.display.input.blur(),a.display.disabled=!0):a.display.disabled=!1,a.display.input.readOnlyChanged(b)}),Sc("disableInput",!1,function(a,b){b||a.display.input.reset()},!0),Sc("dragDrop",!0,Rb),Sc("allowDropFileTypes",null),Sc("cursorBlinkRate",530),Sc("cursorScrollMargin",0),Sc("cursorHeight",1,Ia,!0),Sc("singleCursorHeightPerLine",!0,Ia,!0),Sc("workTime",100),Sc("workDelay",100),Sc("flattenSpans",!0,d,!0),Sc("addModeClass",!1,d,!0),Sc("pollInterval",100),Sc("undoDepth",200,function(a,b){a.doc.history.undoDepth=b}),Sc("historyEventDelay",1250),Sc("viewportMargin",10,function(a){a.refresh()},!0),Sc("maxHighlightLength",1e4,d,!0),Sc("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()}),Sc("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""}),Sc("autofocus",null);var cg=a.modes={},dg=a.mimeModes={};a.defineMode=function(b,c){a.defaults.mode||"null"==b||(a.defaults.mode=b),arguments.length>2&&(c.dependencies=Array.prototype.slice.call(arguments,2)),cg[b]=c},a.defineMIME=function(a,b){dg[a]=b},a.resolveMode=function(b){if("string"==typeof b&&dg.hasOwnProperty(b))b=dg[b];else if(b&&"string"==typeof b.name&&dg.hasOwnProperty(b.name)){var c=dg[b.name];"string"==typeof c&&(c={name:c}),b=Je(c,b),b.name=c.name}else if("string"==typeof b&&/^[\w\-]+\/[\w\-]+\+xml$/.test(b))return a.resolveMode("application/xml");return"string"==typeof b?{name:b}:b||{name:"null"}},a.getMode=function(b,c){var c=a.resolveMode(c),d=cg[c.name];if(!d)return a.getMode(b,"text/plain");var e=d(b,c);if(eg.hasOwnProperty(c.name)){var f=eg[c.name];for(var g in f)f.hasOwnProperty(g)&&(e.hasOwnProperty(g)&&(e["_"+g]=e[g]),e[g]=f[g])}if(e.name=c.name,c.helperType&&(e.helperType=c.helperType),c.modeProps)for(var g in c.modeProps)e[g]=c.modeProps[g];return e},a.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),a.defineMIME("text/plain","null");var eg=a.modeExtensions={};a.extendMode=function(a,b){var c=eg.hasOwnProperty(a)?eg[a]:eg[a]={};Ke(b,c)},a.defineExtension=function(b,c){a.prototype[b]=c},a.defineDocExtension=function(a,b){xg.prototype[a]=b},a.defineOption=Sc;var fg=[];a.defineInitHook=function(a){fg.push(a)};var gg=a.helpers={};a.registerHelper=function(b,c,d){gg.hasOwnProperty(b)||(gg[b]=a[b]={_global:[]}),gg[b][c]=d},a.registerGlobalHelper=function(b,c,d,e){a.registerHelper(b,c,e),gg[b]._global.push({pred:d,val:e})};var hg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},ig=a.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var jg=a.commands={selectAll:function(a){a.setSelection(Lf(a.firstLine(),0),Lf(a.lastLine()),Kg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Kg)},killLine:function(a){Pc(a,function(b){if(b.empty()){var c=Yd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:Lf(b.head.line+1,0)}:{from:b.head,to:Lf(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Pc(a,function(b){return{from:Lf(b.from().line,0),to:pa(a.doc,Lf(b.to().line+1,0))}})},delLineLeft:function(a){Pc(a,function(a){return{from:Lf(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Pc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){Pc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(Lf(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(Lf(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return ef(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return gf(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return ff(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Mg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Mg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?gf(a,b.head):d},Mg)},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")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection(" ")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Ng(a.getLine(f.line),f.ch,d);b.push(Ee(d-g%d))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Db(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Yd(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new Lf(e.line,e.ch-1)),e.ch>0)e=new Lf(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Lf(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=Yd(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+a.doc.lineSeparator()+g.charAt(g.length-1),Lf(e.line-1,g.length-1),Lf(e.line,1),"+transpose")}c.push(new la(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){Db(a,function(){for(var b=a.listSelections().length,c=0;b>c;c++){var d=a.listSelections()[c];a.replaceRange(a.doc.lineSeparator(),d.anchor,d.head,"+input"),a.indentLine(d.from().line+1,null,!0)}Lc(a)})},openLine:function(a){a.replaceSelection("\n","start")},toggleOverwrite:function(a){
|
5 |
+
a.toggleOverwrite()}},kg=a.keyMap={};kg.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},kg.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},kg.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},kg.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},kg["default"]=Df?kg.macDefault:kg.pcDefault,a.normalizeKeyMap=function(a){var b={};for(var c in a)if(a.hasOwnProperty(c)){var d=a[c];if(/^(name|fallthrough|(de|at)tach)$/.test(c))continue;if("..."==d){delete a[c];continue}for(var e=He(c.split(" "),Tc),f=0;f<e.length;f++){var g,h;f==e.length-1?(h=e.join(" "),g=d):(h=e.slice(0,f+1).join(" "),g="...");var i=b[h];if(i){if(i!=g)throw new Error("Inconsistent bindings for "+h)}else b[h]=g}delete a[c]}for(var j in b)a[j]=b[j];return a};var lg=a.lookupKey=function(a,b,c,d){b=Uc(b);var e=b.call?b.call(a,d):b[a];if(e===!1)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=Object.prototype.toString.call(b.fallthrough))return lg(a,b.fallthrough,c,d);for(var f=0;f<b.fallthrough.length;f++){var g=lg(a,b.fallthrough[f],c,d);if(g)return g}}},mg=a.isModifierKey=function(a){var b="string"==typeof a?a:eh[a.keyCode];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b},ng=a.keyName=function(a,b){if(xf&&34==a.keyCode&&a["char"])return!1;var c=eh[a.keyCode],d=c;return null==d||a.altGraphKey?!1:(a.altKey&&"Alt"!=c&&(d="Alt-"+d),(Hf?a.metaKey:a.ctrlKey)&&"Ctrl"!=c&&(d="Ctrl-"+d),(Hf?a.ctrlKey:a.metaKey)&&"Cmd"!=c&&(d="Cmd-"+d),!b&&a.shiftKey&&"Shift"!=c&&(d="Shift-"+d),d)};a.fromTextArea=function(b,c){function d(){b.value=j.getValue()}if(c=c?Ke(c):{},c.value=b.value,!c.tabindex&&b.tabIndex&&(c.tabindex=b.tabIndex),!c.placeholder&&b.placeholder&&(c.placeholder=b.placeholder),null==c.autofocus){var e=Se();c.autofocus=e==b||null!=b.getAttribute("autofocus")&&e==document.body}if(b.form&&(Dg(b.form,"submit",d),!c.leaveSubmitMethodAlone)){var f=b.form,g=f.submit;try{var h=f.submit=function(){d(),f.submit=g,f.submit(),f.submit=h}}catch(i){}}c.finishInit=function(a){a.save=d,a.getTextArea=function(){return b},a.toTextArea=function(){a.toTextArea=isNaN,d(),b.parentNode.removeChild(a.getWrapperElement()),b.style.display="",b.form&&(Fg(b.form,"submit",d),"function"==typeof b.form.submit&&(b.form.submit=g))}},b.style.display="none";var j=a(function(a){b.parentNode.insertBefore(a,b.nextSibling)},c);return j};var og=a.StringStream=function(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};og.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));return 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=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ng(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ng(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return Ng(this.string,null,this.tabSize)-(this.lineStart?Ng(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"!=typeof a){var d=this.string.slice(this.pos).match(a);return d&&d.index>0?null:(d&&b!==!1&&(this.pos+=d[0].length),d)}var e=function(a){return c?a.toLowerCase():a},f=this.string.substr(this.pos,a.length);return e(f)==e(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var pg=0,qg=a.TextMarker=function(a,b){this.lines=[],this.type=b,this.doc=a,this.id=++pg};Ce(qg),qg.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&ub(a),Be(this,"clear")){var c=this.find();c&&xe(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;f<this.lines.length;++f){var g=this.lines[f],h=_c(g.markedSpans,this);a&&!this.collapsed?Kb(a,ae(g),"text"):a&&(null!=h.to&&(e=ae(g)),null!=h.from&&(d=ae(g))),g.markedSpans=ad(g.markedSpans,h),null==h.from&&this.collapsed&&!vd(this.doc,g)&&a&&_d(g,sb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var f=0;f<this.lines.length;++f){var i=rd(this.lines[f]),j=l(i);j>a.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&this.collapsed&&Jb(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Da(a.doc)),a&&xe(a,"markerCleared",a,this),b&&wb(a),this.parent&&this.parent.clear()}},qg.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=_c(f.markedSpans,this);if(null!=g.from&&(c=Lf(b?f:ae(f),g.from),-1==a))return c;if(null!=g.to&&(d=Lf(b?f:ae(f),g.to),1==a))return d}return c&&{from:c,to:d}},qg.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;a&&c&&Db(c,function(){var d=a.line,e=ae(a.line),f=_a(c,e);if(f&&(fb(f),c.curOp.selectionChanged=c.curOp.forceUpdate=!0),c.curOp.updateMaxLine=!0,!vd(b.doc,d)&&null!=b.height){var g=b.height;b.height=null;var h=yd(b)-g;h&&_d(d,d.height+h)}})},qg.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=Ge(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},qg.prototype.detachLine=function(a){if(this.lines.splice(Ge(this.lines,a),1),!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;(b.maybeHiddenMarkers||(b.maybeHiddenMarkers=[])).push(this)}};var pg=0,rg=a.SharedTextMarker=function(a,b){this.markers=a,this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};Ce(rg),rg.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();xe(this,"clear")}},rg.prototype.find=function(a,b){return this.primary.find(a,b)};var sg=a.LineWidget=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a,this.node=b};Ce(sg),sg.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=ae(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=yd(this);_d(c,Math.max(0,c.height-f)),a&&Db(a,function(){xd(a,c,-f),Kb(a,d,"widget")})}},sg.prototype.changed=function(){var a=this.height,b=this.doc.cm,c=this.line;this.height=null;var d=yd(this)-a;d&&(_d(c,c.height+d),b&&Db(b,function(){b.curOp.forceUpdate=!0,xd(b,c,d)}))};var tg=a.Line=function(a,b,c){this.text=a,jd(this,b),this.height=c?c(this):1};Ce(tg),tg.prototype.lineNo=function(){return ae(this)};var ug={},vg={};Ud.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;d>c;++c){var e=this.lines[c];this.height-=e.height,Bd(e),xe(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0;d<b.length;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},Vd.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(e>a){var f=Math.min(b,e-a),g=d.height;if(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}if(this.size-b<25&&(this.children.length>1||!(this.children[0]instanceof Ud))){var h=[];this.collapse(h),this.children=[new Ud(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>=a){if(e.insertInner(a,b,c),e.lines&&e.lines.length>50){for(var g=e.lines.length%25+25,h=g;h<e.lines.length;){var i=new Ud(e.lines.slice(h,h+=25));e.height-=i.height,this.children.splice(++d,0,i),i.parent=this}e.lines=e.lines.slice(0,g),this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new Vd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var d=Ge(a.parent.children,a);a.parent.children.splice(d+1,0,c)}else{var e=new Vd(a.children);e.parent=a,a.children=[e,c],a=e}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(f>a){var g=Math.min(b,f-a);if(e.iterN(a,g,c))return!0;if(0==(b-=g))break;a=0}else a-=f}}};var wg=0,xg=a.Doc=function(a,b,c,d){if(!(this instanceof xg))return new xg(a,b,c,d);null==c&&(c=0),Vd.call(this,[new Ud([new tg("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=c;var e=Lf(c,0);this.sel=na(e),this.history=new ee(null),this.id=++wg,this.modeOption=b,this.lineSep=d,this.extend=!1,"string"==typeof a&&(a=this.splitLines(a)),Td(this,{from:e,to:e,text:a}),Aa(this,na(e),Kg)};xg.prototype=Je(Vd.prototype,{constructor:xg,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;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=$d(this,this.first,this.first+this.size);return a===!1?b:b.join(a||this.lineSeparator())},setValue:Gb(function(a){var b=Lf(this.first,0),c=this.first+this.size-1;zc(this,{from:b,to:Lf(c,Yd(this,c).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),Aa(this,na(b))}),replaceRange:function(a,b,c,d){b=pa(this,b),c=c?pa(this,c):b,Fc(this,a,b,c,d)},getRange:function(a,b,c){var d=Zd(this,pa(this,a),pa(this,b));return c===!1?d:d.join(c||this.lineSeparator())},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){return ra(this,a)?Yd(this,a):void 0},getLineNumber:function(a){return ae(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=Yd(this,a)),rd(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return pa(this,a)},getCursor:function(a){var b,c=this.sel.primary();return b=null==a||"head"==a?c.head:"anchor"==a?c.anchor:"end"==a||"to"==a||a===!1?c.to():c.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Gb(function(a,b,c){xa(this,pa(this,"number"==typeof a?Lf(a,b||0):a),null,c)}),setSelection:Gb(function(a,b,c){xa(this,pa(this,a),pa(this,b||a),c)}),extendSelection:Gb(function(a,b,c){ua(this,pa(this,a),b&&pa(this,b),c)}),extendSelections:Gb(function(a,b){va(this,sa(this,a),b)}),extendSelectionsBy:Gb(function(a,b){var c=He(this.sel.ranges,a);va(this,sa(this,c),b)}),setSelections:Gb(function(a,b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new la(pa(this,a[d].anchor),pa(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex)),Aa(this,ma(e,b),c)}}),addSelection:Gb(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new la(pa(this,a),pa(this,b||a))),Aa(this,ma(d,d.length-1),c)}),getSelection:function(a){for(var b,c=this.sel.ranges,d=0;d<c.length;d++){var e=Zd(this,c[d].from(),c[d].to());b=b?b.concat(e):e}return a===!1?b:b.join(a||this.lineSeparator())},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=Zd(this,c[d].from(),c[d].to());a!==!1&&(e=e.join(a||this.lineSeparator())),b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:Gb(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:this.splitLines(a[f]),origin:c}}for(var h=b&&"end"!=b&&xc(this,d,b),f=d.length-1;f>=0;f--)zc(this,d[f]);h?za(this,h):this.cm&&Lc(this.cm)}),undo:Gb(function(){Bc(this,"undo")}),redo:Gb(function(){Bc(this,"redo")}),undoSelection:Gb(function(){Bc(this,"undo",!0)}),redoSelection:Gb(function(){Bc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(var d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new ee(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:pe(this.history.done),undone:pe(this.history.undone)}},setHistory:function(a){var b=this.history=new ee(this.history.maxGeneration);b.done=pe(a.done.slice(0),null,!0),b.undone=pe(a.undone.slice(0),null,!0)},addLineClass:Gb(function(a,b,c){return Oc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(Te(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Gb(function(a,b,c){return Oc(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(Te(c));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Gb(function(a,b,c){return zd(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return Vc(this,pa(this,a),pa(this,b),c,c&&c.type||"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};return a=pa(this,a),Vc(this,a,a,c,"bookmark")},findMarksAt:function(a){a=pa(this,a);var b=[],c=Yd(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=pa(this,a),b=pa(this,b);var d=[],e=a.line;return this.iter(a.line,b.line+1,function(f){var g=f.markedSpans;if(g)for(var h=0;h<g.length;h++){var i=g[h];null!=i.to&&e==a.line&&a.ch>=i.to||null==i.from&&e!=a.line||null!=i.from&&e==b.line&&i.from>=b.ch||c&&!c(i.marker)||d.push(i.marker.parent||i.marker)}++e}),d},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;d<c.length;++d)null!=c[d].from&&a.push(c[d].marker)}),a},posFromIndex:function(a){var b,c=this.first,d=this.lineSeparator().length;return this.iter(function(e){var f=e.text.length+d;return f>a?(b=a,!0):(a-=f,void++c)}),pa(this,Lf(c,b))},indexFromPos:function(a){a=pa(this,a);var b=a.ch;if(a.line<this.first||a.ch<0)return 0;var c=this.lineSeparator().length;return this.iter(this.first,a.line,function(a){b+=a.text.length+c}),b},copy:function(a){var b=new xg($d(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);return b.scrollTop=this.scrollTop,b.scrollLeft=this.scrollLeft,b.sel=this.sel,b.extend=!1,a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory())),b},linkedDoc:function(a){a||(a={});var 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);var d=new xg($d(this,b,c),a.mode||this.modeOption,b,this.lineSep);return 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}],Yc(d,Xc(this)),d},unlinkDoc:function(b){if(b instanceof a&&(b=b.doc),this.linked)for(var c=0;c<this.linked.length;++c){var d=this.linked[c];if(d.doc==b){this.linked.splice(c,1),b.unlinkDoc(this),Zc(Xc(this));break}}if(b.history==this.history){var e=[b.id];Wd(b,function(a){e.push(a.id)},!0),b.history=new ee(null),b.history.done=pe(this.history.done,e),b.history.undone=pe(this.history.undone,e)}},iterLinkedDocs:function(a){Wd(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):ah(a)},lineSeparator:function(){return this.lineSep||"\n"}}),xg.prototype.eachLine=xg.prototype.iter;var yg="iter insert remove copy getEditor constructor".split(" ");for(var zg in xg.prototype)xg.prototype.hasOwnProperty(zg)&&Ge(yg,zg)<0&&(a.prototype[zg]=function(a){return function(){return a.apply(this.doc,arguments)}}(xg.prototype[zg]));Ce(xg);var Ag=a.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},Bg=a.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},Cg=a.e_stop=function(a){Ag(a),Bg(a)},Dg=a.on=function(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}},Eg=[],Fg=a.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else for(var d=we(a,b,!1),e=0;e<d.length;++e)if(d[e]==c){d.splice(e,1);break}},Gg=a.signal=function(a,b){var c=we(a,b,!0);if(c.length)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},Hg=null,Ig=30,Jg=a.Pass={toString:function(){return"CodeMirror.Pass"}},Kg={scroll:!1},Lg={origin:"*mouse"},Mg={origin:"+move"};De.prototype.set=function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)};var Ng=a.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;;){var h=a.indexOf(" ",f);if(0>h||h>=b)return g+(b-f);g+=h-f,g+=c-g%c,f=h+1}},Og=a.findColumn=function(a,b,c){for(var d=0,e=0;;){var f=a.indexOf(" ",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);if(e+=f-d,e+=c-e%c,d=f+1,e>=b)return d}},Pg=[""],Qg=function(a){a.select()};Bf?Qg=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:sf&&(Qg=function(a){try{a.select()}catch(b){}});var Rg,Sg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Tg=a.isWordChar=function(a){return/\w/.test(a)||a>""&&(a.toUpperCase()!=a.toLowerCase()||Sg.test(a))},Ug=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;Rg=document.createRange?function(a,b,c,d){var e=document.createRange();return e.setEnd(d||a,c),e.setStart(a,b),e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}return d.collapse(!0),d.moveEnd("character",c),d.moveStart("character",b),d};var Vg=a.contains=function(a,b){if(3==b.nodeType&&(b=b.parentNode),a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};sf&&11>tf&&(Se=function(){try{return document.activeElement}catch(a){return document.body}});var Wg,Xg,Yg=a.rmClass=function(a,b){var c=a.className,d=Te(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},Zg=a.addClass=function(a,b){var c=a.className;Te(b).test(c)||(a.className+=(c?" ":"")+b)},$g=!1,_g=function(){if(sf&&9>tf)return!1;var a=Pe("div");return"draggable"in a||"dragDrop"in a}(),ah=a.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var 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/)},bh=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?0!=b.compareEndPoints("StartToEnd",b):!1},ch=function(){var a=Pe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),dh=null,eh=a.keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};!function(){for(var a=0;10>a;a++)eh[a+48]=eh[a+96]=String(a);for(var a=65;90>=a;a++)eh[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)eh[a+111]=eh[a+63235]="F"+a}();var fh,gh=function(){function a(a){return 247>=a?c.charAt(a):a>=1424&&1524>=a?"R":a>=1536&&1773>=a?d.charAt(a-1536):a>=1774&&2220>=a?"r":a>=8192&&8203>=a?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a,this.from=b,this.to=c}var c="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,h=/[Lb1n]/,i=/[1n]/,j="L";return function(c){if(!e.test(c))return!1;for(var d,k=c.length,l=[],m=0;k>m;++m)l.push(d=a(c.charCodeAt(m)));for(var m=0,n=j;k>m;++m){var d=l[m];"m"==d?l[m]=n:n=d}for(var m=0,o=j;k>m;++m){var d=l[m];"1"==d&&"r"==o?l[m]="n":g.test(d)&&(o=d,"r"==d&&(l[m]="R"))}for(var m=1,n=l[0];k-1>m;++m){var d=l[m];"+"==d&&"1"==n&&"1"==l[m+1]?l[m]="1":","!=d||n!=l[m+1]||"1"!=n&&"n"!=n||(l[m]=n),n=d}for(var m=0;k>m;++m){var d=l[m];if(","==d)l[m]="N";else if("%"==d){for(var p=m+1;k>p&&"%"==l[p];++p);for(var q=m&&"!"==l[m-1]||k>p&&"1"==l[p]?"1":"N",r=m;p>r;++r)l[r]=q;m=p-1}}for(var m=0,o=j;k>m;++m){var d=l[m];"L"==o&&"1"==d?l[m]="L":g.test(d)&&(o=d)}for(var m=0;k>m;++m)if(f.test(l[m])){for(var p=m+1;k>p&&f.test(l[p]);++p);for(var s="L"==(m?l[m-1]:j),t="L"==(k>p?l[p]:j),q=s||t?"L":"R",r=m;p>r;++r)l[r]=q;m=p-1}for(var u,v=[],m=0;k>m;)if(h.test(l[m])){var w=m;for(++m;k>m&&h.test(l[m]);++m);v.push(new b(0,w,m))}else{var x=m,y=v.length;for(++m;k>m&&"L"!=l[m];++m);for(var r=x;m>r;)if(i.test(l[r])){r>x&&v.splice(y,0,new b(1,x,r));var z=r;for(++r;m>r&&i.test(l[r]);++r);v.splice(y,0,new b(2,z,r)),x=r}else++r;m>x&&v.splice(y,0,new b(1,x,m))}return 1==v[0].level&&(u=c.match(/^\s+/))&&(v[0].from=u[0].length,v.unshift(new b(0,0,u[0].length))),1==Fe(v).level&&(u=c.match(/\s+$/))&&(Fe(v).to-=u[0].length,v.push(new b(0,k-u[0].length,k))),2==v[0].level&&v.unshift(new b(1,v[0].to,v[0].to)),v[0].level!=Fe(v).level&&v.push(new b(v[0].level,k,k)),v}}();return a.version="5.15.2",a});
|
lib/hesh.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.CodeMirror{font-family:
|
1 |
+
.CodeMirror{font-family:Menlo Regular,Consolas,Monaco,monospace;line-height:150%;font-size:12px;height:500px}#ed_toolbar input.cm_ed_button#cm_content_p,#qt_content_block,#qt_content_close,#qt_content_code,#qt_content_del,#qt_content_em,#qt_content_fullscreen,#qt_content_img,#qt_content_ins,#qt_content_li,#qt_content_link,#qt_content_more,#qt_content_ol,#qt_content_strong,#qt_content_ul,#wp-content-editor-container .wp-editor-area,#wp-fullscreen-modes,.heshFullscreen #content_wp_fullscreen,.wp-fullscreen-both{display:none!important}#ed_toolbar input.cm_ed_button,.quicktags-toolbar input#cm_content_fullscreen{display:inline-block!important}.CodeMirror-matchingbracket{position:relative;color:inherit!important;text-decoration:none!important}.CodeMirror-matchingbracket:after{content:'';position:absolute;right:0;bottom:-2px;left:0;height:1px;background-color:currentColor}.cm-s-mbo .CodeMirror-matchingbracket{color:#000!important;text-decoration:none}.content-resize-handle{width:14px;height:24px;cursor:ns-resize;right:1px;position:absolute}#content-resize-handle{display:table-cell!important}.tmce-active .content-resize-handle,.wp-editor-expand .html-active #qt_content_dfw{display:none}.has-dfw .quicktags-toolbar{padding-right:3px!important}.has-dfw .quicktags-toolbar .button:not(:first-child){margin-right:3px}#cm_content_fullscreen,#cm_font_size,#cm_select_theme{float:right}#cm_select_theme{max-width:7em}@-moz-document url-prefix(){#cm_font_size,#cm_select_theme{-moz-appearance:none;text-indent:.01px}#cm_font_size:active,#cm_select_theme:active{transform:unset}}@media screen and (max-width:782px){select#cm_font_size,select#cm_select_theme{font-size:14px;height:auto}}.heshFullscreen{z-index:99999;position:fixed!important;top:0;left:0;right:0;bottom:0;height:100%;background:#fff;padding:2% 2% 0}.heshFullscreen .CodeMirror{border:1px solid #ccc;border-radius:0 0 4px 4px;height:85%!important}.heshFullscreen #ed_toolbar{border:1px solid #ccc;border-bottom:0;border-radius:4px 4px 0 0}@media only screen and (max-height:550px),only screen and (max-device-height:550px){.heshFullscreen .CodeMirror{height:75%!important}}.wp-editor-expand .html-active #ed_toolbar{z-index:2}.wp-editor-expand .html-active .CodeMirror{position:relative;z-index:1;margin-top:35px;min-height:500px}.postarea:not(.wp-editor-expand) .CodeMirror,.wp-editor-expand .html-active .heshFullscreen .CodeMirror{margin-top:0!important}.wp-editor-expand .html-active .heshFullscreen .quicktags-toolbar{top:0!important;position:static!important;width:auto!important}.wp-editor-expand #content-resize-handle,.wp-editor-expand .content-resize-handle{display:none!important}.visual-editor-is-disabled #ed_toolbar input.cm_ed_button#cm_content_p{display:inline-block!important}
|
lib/hesh.min.js
CHANGED
@@ -1,6 +1,2 @@
|
|
1 |
-
function heshPlugin(){var e=null,t=0,r=0,n=document.getElementById("content"),i=null!==document.getElementById("post_ID")?document.getElementById("post_ID").value:0,o=document.getElementById("content-html"),a=document.getElementById("content-tmce"),l=-1!==document.cookie.indexOf("hesh_plugin_theme=mbo")?"mbo":"default",s=-1!==document.cookie.indexOf("editor%3Dtinymce")?!0:!1,u=null!==document.getElementById("content-tmce")?!0:!1,c=document.getElementById("ed_toolbar"),d=document.getElementById("wp-content-editor-container"),f="heshFullscreen",h=document.getElementById("publish"),p={mode:"text/html",tabMode:"indent",theme:l,lineNumbers:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!0,enterMode:"keep",lineWrapping:!0,autofocus:!0,styleActiveLine:!0,electricChars:!1,extraKeys:{F11:function(){A()},Esc:function(){A()},"Ctrl-S":function(){h.click()},"Cmd-S":function(){h.click()}}},m=function(e){var t="; "+document.cookie,r=t.split("; "+e+"=");return 2==r.length?r.pop().split(";").shift():void 0},g=m("hesh_plugin_font_size")||"12",v=function(){C(),e=CodeMirror.fromTextArea(n,p),e.on("change",function(){e.save(),clearTimeout(x),x=setTimeout(k,3e3)}),e.on("cursorActivity",function(){var t=e.getCursor();document.cookie="hesh_plugin_pos="+i+","+t.line+","+t.ch});var r=(m("hesh_plugin_pos")||"0,0,0").split(",");i===r[0]&&e.setCursor(parseFloat(r[1]),parseFloat(r[2])),T(),E(),t=1,y(),window.addEventListener("resize",w),window.setTimeout(k,3e3)},y=function(){document.querySelector(".CodeMirror").style.marginTop=c.clientHeight+"px"},b,w=function(){clearTimeout(b),b=setTimeout(y,250)},x,k=function(){null!=document.querySelector(".CodeMirror")&&(document.querySelector("textarea.wp-editor-area").style.height=document.querySelector(".CodeMirror").clientHeight+"px")},C=function(){if(!r){var e={more:["<!--more-->",""],comment:["<!-- "," -->"],code:["<code>","</code>"],li:["<li>","</li>"],ol:["<ol>","</ol>"],ul:["<ul>","</ul>"],img:['<img src="$" alt="','">',"Enter the URL of the image"],ins:["<ins>","</ins>"],del:["<del>","</del>"],link:['<a href="$">',"</a>","Enter the destination URL"],blockquote:["\r<blockquote>","</blockquote>\r"],h3:["<h3>","</h3>"],h2:["<h2>","</h2>"],h1:["<h1>","</h1>"],p:["<p>","</p>"],i:["<em>","</em>"],b:["<strong>","</strong>"]};for(var t in e){var n=e[t],i=n[2]?'data-prompt="'+n[2]+'"':"";c.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_'+t+"\" data-start='"+n[0]+"' data-end='"+n[1]+"' "+i+' class="ed_button button cm_ed_button" value="'+t+'">'),document.getElementById("cm_content_"+t).onclick=L}H(),z(),N(),r=1}},L=function(){var t=e.getCursor("start"),r=this.getAttribute("data-start"),n=this.getAttribute("data-end"),i=this.getAttribute("data-prompt")||null,o=e.getSelection();"cm_content_link"===this.id&&wpLink?(wpLink.open(),document.getElementById("wp-link-submit").onclick=function(){var n=wpLink.getAttrs();r='<a href="'+n.href+'" title="'+n.title+'" target="'+n.target+'">',e.replaceSelection(r+o+"</a>"),wpLink.close(),e.setCursor(t.line,t.ch+r.length),e.focus()}):(i&&(r=r.replace("$",prompt(i,""))),e.replaceSelection(r+o+n),e.setCursor(t.line,t.ch+r.length),e.focus())},S=function(){t&&(switchEditors.switchto&&switchEditors.switchto(this),e.toTextArea(),o.onclick=M,t=0,window.removeEventListener("resize",w))},M=function(){t||(switchEditors.switchto&&switchEditors.switchto(this),window.setTimeout(v,300),a.onclick=S)},T=function(){var e=document.querySelector(".CodeMirror"),t=document.createElement("div"),r=document.getElementById("wp-content-wrap"),n=e.getBoundingClientRect().top,i=function(t){t=t||window.event;var r=(t.pageY||t.clientY+document.body.scrollTop+document.documentElement.scrollTop)-n;e.style.height=(r>10?r:10)+"px",window.getSelection().removeAllRanges()};t.className="content-resize-handle",r.appendChild(t),t.onmousedown=function(){document.onmousemove=i},document.onmouseup=function(){document.onmousemove=null}},A=function(){d.className=-1===d.className.indexOf(f)?d.className+" "+f:d.className.replace(f,"");var t=document.getElementById("cm_content_fullscreen");t.value="fullscreen"===t.value?"exit fullscreen":"fullscreen",e.focus()},N=function(){c.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_fullscreen" class="ed_button button" title="Toggle fullscreen mode" value="fullscreen">'),document.getElementById("cm_content_fullscreen").onclick=A},H=function(){var t=function(){return"mbo"===l?"light":"dark"};c.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_select_theme" class="ed_button button" title="Change editor colour scheme" value="'+t()+'">'),document.getElementById("cm_select_theme").onclick=function(){l="mbo"===l?"default":"mbo",e.setOption("theme",l),document.cookie="hesh_plugin_theme="+l,this.value=t()}},O=function(){var e=document.getElementById("hesh-style"),t=".CodeMirror {font-size: "+g+"px !important;}";e?e.innerHTML=t:document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend",'<style id="hesh-style">'+t+"</style>")},z=function(){c.insertAdjacentHTML("afterbegin",'<select id="cm_font_size" class="button"><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="16">16</option><option value="18">18</option><option value="20">20</option><option value="22">22</option></select>');var t=document.getElementById("cm_font_size");O(),t.value=g,t.onchange=function(){g=this.value,O(),e.toTextArea(),v(),e.focus(),document.cookie="hesh_plugin_font_size="+g}},E=function(){window.send_to_editor_wp||(window.send_to_editor_wp=send_to_editor,send_to_editor=function(r){t&&"content"===wpActiveEditor?(e.replaceSelection(r),e.save()):window.send_to_editor_wp(r)})};s&&u?o.onclick=M:(v(),u?a.onclick=S:document.body.className+=" visual-editor-is-disabled")}!function(e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else{if("function"==typeof define&&define.amd)return define([],e);this.CodeMirror=e()}}(function(){"use strict";function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n||{},ii(vo,n,!1),p(n);var i=n.value;"string"==typeof i&&(i=new Ro(i,n.mode)),this.doc=i;var o=this.display=new t(r,i);o.wrapper.CodeMirror=this,c(this),s(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n.autofocus&&!$i&&pt(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new Zn},Ei&&setTimeout(oi(ht,this,!0),20),vt(this);var a=this;Ze(this,function(){a.curOp.forceUpdate=!0,yn(a,i),n.autofocus&&!$i||fi()==o.input?setTimeout(oi(Ft,a),20):Bt(a);for(var e in yo)yo.hasOwnProperty(e)&&yo[e](a,n[e],bo);for(var t=0;t<Co.length;++t)Co[t](a)})}function t(e,t){var r=this,n=r.input=si("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");Fi?n.style.width="1000px":n.setAttribute("wrap","off"),Ki&&(n.style.border="1px solid black"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),r.inputDiv=si("div",[n],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),r.scrollbarH=si("div",[si("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar"),r.scrollbarV=si("div",[si("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r.scrollbarFiller=si("div",null,"CodeMirror-scrollbar-filler"),r.gutterFiller=si("div",null,"CodeMirror-gutter-filler"),r.lineDiv=si("div",null,"CodeMirror-code"),r.selectionDiv=si("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=si("div",null,"CodeMirror-cursors"),r.measure=si("div",null,"CodeMirror-measure"),r.lineMeasure=si("div",null,"CodeMirror-measure"),r.lineSpace=si("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=si("div",[si("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=si("div",[r.mover],"CodeMirror-sizer"),r.heightForcer=si("div",null,null,"position: absolute; height: "+Qo+"px; width: 1px;"),r.gutters=si("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=si("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=si("div",[r.inputDiv,r.scrollbarH,r.scrollbarV,r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),Wi&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),Ki&&(n.style.width="0px"),Fi||(r.scroller.draggable=!0),qi&&(r.inputDiv.style.height="1px",r.inputDiv.style.position="absolute"),Wi&&(r.scrollbarH.style.minHeight=r.scrollbarV.style.minWidth="18px"),e.appendChild?e.appendChild(r.wrapper):e(r.wrapper),r.viewFrom=r.viewTo=t.first,r.view=[],r.externalMeasured=null,r.viewOffset=0,r.lastSizeC=0,r.updateLineNumbers=null,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.prevInput="",r.alignWidgets=!1,r.pollingFast=!1,r.poll=new Zn,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.inaccurateSelection=!1,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,be(e,100),e.state.modeGen++,e.curOp&&nt(e)}function i(e){e.options.lineWrapping?(mi(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth=""):(pi(e.display.wrapper,"CodeMirror-wrap"),h(e)),a(e),nt(e),De(e),setTimeout(function(){g(e)},100)}function o(e){var t=Ke(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/$e(e.display)-3);return function(i){if(qr(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function a(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&kn(e,t)})}function l(e){var t=Ao[e.options.keyMap],r=t.style;e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(r?" cm-keymap-"+r:"")}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),De(e)}function u(e){c(e),nt(e),setTimeout(function(){y(e)},20)}function c(e){var t=e.display.gutters,r=e.options.gutters;ui(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(si("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",d(e)}function d(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px",e.display.scrollbarH.style.left=e.options.fixedGutter?t+"px":0}function f(e){if(0==e.height)return 0;for(var t=e.text.length,r,n=e;r=Pr(n);){var i=r.find(0,!0);n=i.from.line,t+=i.from.ch-i.to.ch}for(n=e;r=_r(n);){var i=r.find(0,!0);t-=n.text.length-i.from.ch,n=i.to.line,t+=n.text.length-i.to.ch}return t}function h(e){var t=e.display,r=e.doc;t.maxLine=bn(r,r.first),t.maxLineLength=f(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=f(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function p(e){var t=ti(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function m(e){var t=e.display.scroller;return{clientHeight:t.clientHeight,barHeight:e.display.scrollbarV.clientHeight,scrollWidth:t.scrollWidth,clientWidth:t.clientWidth,barWidth:e.display.scrollbarH.clientWidth,docHeight:Math.round(e.doc.height+Le(e.display))}}function g(e,t){t||(t=m(e));var r=e.display,n=t.docHeight+Qo,i=t.scrollWidth>t.clientWidth,o=n>t.clientHeight;if(o?(r.scrollbarV.style.display="block",r.scrollbarV.style.bottom=i?vi(r.measure)+"px":"0",r.scrollbarV.firstChild.style.height=Math.max(0,n-t.clientHeight+(t.barHeight||r.scrollbarV.clientHeight))+"px"):(r.scrollbarV.style.display="",r.scrollbarV.firstChild.style.height="0"),i?(r.scrollbarH.style.display="block",r.scrollbarH.style.right=o?vi(r.measure)+"px":"0",r.scrollbarH.firstChild.style.width=t.scrollWidth-t.clientWidth+(t.barWidth||r.scrollbarH.clientWidth)+"px"):(r.scrollbarH.style.display="",r.scrollbarH.firstChild.style.width="0"),i&&o?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=r.scrollbarFiller.style.width=vi(r.measure)+"px"):r.scrollbarFiller.style.display="",i&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=vi(r.measure)+"px",r.gutterFiller.style.width=r.gutters.offsetWidth+"px"):r.gutterFiller.style.display="",!e.state.checkedOverlayScrollbar&&t.clientHeight>0){if(0===vi(r.measure)){var a=Yi&&!Gi?"12px":"18px";r.scrollbarV.style.minWidth=r.scrollbarH.style.minHeight=a;var l=function(t){Vn(t)!=r.scrollbarV&&Vn(t)!=r.scrollbarH&&Qe(e,wt)(t)};Ko(r.scrollbarV,"mousedown",l),Ko(r.scrollbarH,"mousedown",l)}e.state.checkedOverlayScrollbar=!0}}function v(e,t,r){var n=r&&null!=r.top?r.top:e.scroller.scrollTop;n=Math.floor(n-Ce(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=Ln(t,n),a=Ln(t,i);if(r&&r.ensure){var l=r.ensure.from.line,s=r.ensure.to.line;if(o>l)return{from:l,to:Ln(t,Sn(bn(t,l))+e.wrapper.clientHeight)};if(Math.min(s,t.lastLine())>=a)return{from:Ln(t,Sn(bn(t,s))-e.wrapper.clientHeight),to:s}}return{from:o,to:a}}function y(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=x(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",a=0;a<r.length;a++)if(!r[a].hidden){e.options.fixedGutter&&r[a].gutter&&(r[a].gutter.style.left=o);var l=r[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function b(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=w(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(si("div",[si("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a),n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",d(e),!0}return!1}function w(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function x(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function k(e,t,r){for(var n=e.display.viewFrom,i=e.display.viewTo,o,a=v(e.display,e.doc,t),l=!0;;l=!1){var s=e.display.scroller.clientWidth;if(!C(e,a,r))break;o=!0,e.display.maxLineChanged&&!e.options.lineWrapping&&L(e);var u=m(e);if(me(e),S(e,u),g(e,u),Fi&&e.options.lineWrapping&&M(e,u),l&&e.options.lineWrapping&&s!=e.display.scroller.clientWidth)r=!0;else if(r=!1,t&&null!=t.top&&(t={top:Math.min(u.docHeight-Qo-u.clientHeight,t.top)}),a=v(e.display,e.doc,t),a.from>=e.display.viewFrom&&a.to<=e.display.viewTo)break}return e.display.updateLineNumbers=null,o&&(Gn(e,"update",e),(e.display.viewFrom!=n||e.display.viewTo!=i)&&Gn(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo)),o}function C(e,t,r){var n=e.display,i=e.doc;if(!n.wrapper.offsetWidth)return void ot(e);if(!(!r&&t.from>=n.viewFrom&&t.to<=n.viewTo&&0==ut(e))){b(e)&&ot(e);var o=N(e),a=i.first+i.size,l=Math.max(t.from-e.options.viewportMargin,i.first),s=Math.min(a,t.to+e.options.viewportMargin);n.viewFrom<l&&l-n.viewFrom<20&&(l=Math.max(i.first,n.viewFrom)),n.viewTo>s&&n.viewTo-s<20&&(s=Math.min(a,n.viewTo)),to&&(l=jr(e.doc,l),s=Vr(e.doc,s));var u=l!=n.viewFrom||s!=n.viewTo||n.lastSizeC!=n.wrapper.clientHeight;st(e,l,s),n.viewOffset=Sn(bn(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=ut(e);if(u||0!=c||r){var d=fi();return c>4&&(n.lineDiv.style.display="none"),H(e,n.updateLineNumbers,o),c>4&&(n.lineDiv.style.display=""),d&&fi()!=d&&d.offsetHeight&&d.focus(),ui(n.cursorDiv),ui(n.selectionDiv),u&&(n.lastSizeC=n.wrapper.clientHeight,be(e,400)),T(e),!0}}}function L(e){var t=e.display,r=Ne(e,t.maxLine,t.maxLine.text.length).left;t.maxLineChanged=!1;var n=Math.max(0,r+3),i=Math.max(0,t.sizer.offsetLeft+n+Qo-t.scroller.clientWidth);t.sizer.style.minWidth=n+"px",i<e.doc.scrollLeft&&Nt(e,Math.min(t.scroller.scrollLeft,i),!0)}function S(e,t){e.display.sizer.style.minHeight=e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=Math.max(t.docHeight,t.clientHeight-Qo)+"px"}function M(e,t){e.display.sizer.offsetWidth+e.display.gutters.offsetWidth<e.display.scroller.clientWidth-1&&(e.display.sizer.style.minHeight=e.display.heightForcer.style.top="0px",e.display.gutters.style.height=t.docHeight+"px")}function T(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o;if(!i.hidden){if(Wi){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var l=i.node.getBoundingClientRect();o=l.bottom-l.top}var s=i.line.height-o;if(2>o&&(o=Ke(t)),(s>.001||-.001>s)&&(kn(i.line,o),A(i.line),i.rest))for(var u=0;u<i.rest.length;u++)A(i.rest[u])}}}function A(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.offsetHeight}function N(e){for(var t=e.display,r={},n={},i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o)r[e.options.gutters[o]]=i.offsetLeft,n[e.options.gutters[o]]=i.offsetWidth;return{fixedPos:x(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function H(e,t,r){function n(t){var r=t.nextSibling;return Fi&&Yi&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var i=e.display,o=e.options.lineNumbers,a=i.lineDiv,l=a.firstChild,s=i.view,u=i.viewFrom,c=0;c<s.length;c++){var d=s[c];if(d.hidden);else if(d.node){for(;l!=d.node;)l=n(l);var f=o&&null!=t&&u>=t&&d.lineNumber;d.changes&&(ti(d.changes,"gutter")>-1&&(f=!1),O(e,d,u,r)),f&&(ui(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(w(e.options,u)))),l=d.node.nextSibling}else{var h=F(e,d,u,r);a.insertBefore(h,l)}u+=d.size}for(;l;)l=n(l)}function O(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?I(e,t):"gutter"==o?P(e,t,r,n):"class"==o?D(t):"widget"==o&&_(t,n)}t.changes=null}function z(e){return e.node==e.text&&(e.node=si("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Wi&&(e.node.style.zIndex=2)),e.node}function E(e){var t=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(t&&(t+=" CodeMirror-linebackground"),e.background)t?e.background.className=t:(e.background.parentNode.removeChild(e.background),e.background=null);else if(t){var r=z(e);e.background=r.insertBefore(si("div",null,t),r.firstChild)}}function W(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):an(e,t)}function I(e,t){var r=t.text.className,n=W(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,D(t)):r&&(t.text.className=r)}function D(e){E(e),e.line.wrapClass?z(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var t=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=t||""}function P(e,t,r,n){t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null);var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var o=z(t),a=t.gutter=o.insertBefore(si("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px"),t.text);if(!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(si("div",w(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.options.gutters.length;++l){var s=e.options.gutters[l],u=i.hasOwnProperty(s)&&i[s];u&&a.appendChild(si("div",[u],"CodeMirror-gutter-elt","left: "+n.gutterLeft[s]+"px; width: "+n.gutterWidth[s]+"px"))}}}function _(e,t){e.alignable&&(e.alignable=null);for(var r=e.node.firstChild,n;r;r=n){var n=r.nextSibling;"CodeMirror-linewidget"==r.className&&e.node.removeChild(r)}B(e,t)}function F(e,t,r,n){var i=W(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),D(t),P(e,t,r,n),B(t,n),t.node}function B(e,t){if(R(e.line,e,t,!0),e.rest)for(var r=0;r<e.rest.length;r++)R(e.rest[r],e,t,!1)}function R(e,t,r,n){if(e.widgets)for(var i=z(t),o=0,a=e.widgets;o<a.length;++o){var l=a[o],s=si("div",[l.node],"CodeMirror-linewidget");l.handleMouseEvents||(s.ignoreEvents=!0),j(l,s,t,r),n&&l.above?i.insertBefore(s,t.gutter||t.text):i.appendChild(s),Gn(l,"redraw")}}function j(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function V(e){return ro(e.line,e.ch)}function q(e,t){return no(e,t)<0?t:e}function G(e,t){return no(e,t)<0?e:t}function U(e,t){this.ranges=e,this.primIndex=t}function K(e,t){this.anchor=e,this.head=t}function Y(e,t){var r=e[t];e.sort(function(e,t){return no(e.from(),t.from())}),t=ti(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(no(o.to(),i.from())>=0){var a=G(o.from(),i.from()),l=q(o.to(),i.to()),s=o.empty()?i.from()==i.head:o.from()==o.head;t>=n&&--t,e.splice(--n,2,new K(s?l:a,s?a:l))}}return new U(e,t)}function X(e,t){return new U([new K(e,t||e)],0)}function Z(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Q(e,t){if(t.line<e.first)return ro(e.first,0);var r=e.first+e.size-1;return t.line>r?ro(r,bn(e,r).text.length):J(t,bn(e,t.line).text.length)}function J(e,t){var r=e.ch;return null==r||r>t?ro(e.line,t):0>r?ro(e.line,0):e}function ee(e,t){return t>=e.first&&t<e.first+e.size}function te(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Q(e,t[n]);return r}function re(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=no(r,i)<0;o!=no(n,i)<0?(i=r,r=n):o!=no(r,n)<0&&(r=n)}return new K(i,r)}return new K(n||r,r)}function ne(e,t,r,n){ue(e,new U([re(e,e.sel.primary(),t,r)],0),n)}function ie(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=re(e,e.sel.ranges[i],t[i],null);var o=Y(n,e.sel.primIndex);ue(e,o,r)}function oe(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,ue(e,Y(i,e.sel.primIndex),n)}function ae(e,t,r,n){ue(e,X(t,r),n)}function le(e,t){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new K(Q(e,t[r].anchor),Q(e,t[r].head))}};return Yo(e,"beforeSelectionChange",e,r),e.cm&&Yo(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Y(r.ranges,r.ranges.length-1):t}function se(e,t,r){var n=e.history.done,i=ei(n);i&&i.ranges?(n[n.length-1]=t,ce(e,t,r)):ue(e,t,r)}function ue(e,t,r){ce(e,t,r),En(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function ce(e,t,r){(Yn(e,"beforeSelectionChange")||e.cm&&Yn(e.cm,"beforeSelectionChange"))&&(t=le(e,t));var n=no(t.primary().head,e.sel.primary().head)<0?-1:1;de(e,he(e,t,n,!0)),r&&r.scroll===!1||!e.cm||ar(e.cm)}function de(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,$n(e.cm)),Gn(e,"cursorActivity",e))}function fe(e){de(e,he(e,e.sel,null,!1),ea)}function he(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=pe(e,a.anchor,r,n),s=pe(e,a.head,r,n);(i||l!=a.anchor||s!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new K(l,s))}return i?Y(i,t.primIndex):t}function pe(e,t,r,n){var i=!1,o=t,a=r||1;e.cantEdit=!1;e:for(;;){var l=bn(e,o.line);if(l.markedSpans)for(var s=0;s<l.markedSpans.length;++s){var u=l.markedSpans[s],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(n&&(Yo(c,"beforeCursorEnter"),c.explicitlyCleared)){if(l.markedSpans){--s;continue}break}if(!c.atomic)continue;var d=c.find(0>a?-1:1);if(0==no(d,o)&&(d.ch+=a,d.ch<0?d=d.line>e.first?Q(e,ro(d.line-1)):null:d.ch>l.text.length&&(d=d.line<e.first+e.size-1?ro(d.line+1,0):null),!d)){if(i)return n?(e.cantEdit=!0,ro(e.first,0)):pe(e,t,r,!0);i=!0,d=t,a=-a}o=d;continue e}}return o}}function me(e){for(var t=e.display,r=e.doc,n=document.createDocumentFragment(),i=document.createDocumentFragment(),o=0;o<r.sel.ranges.length;o++){var a=r.sel.ranges[o],l=a.empty();(l||e.options.showCursorWhenSelecting)&&ge(e,a,n),l||ve(e,a,i)}if(e.options.moveInputWithCursor){var s=je(e,r.sel.primary().head,"div"),u=t.wrapper.getBoundingClientRect(),c=t.lineDiv.getBoundingClientRect(),d=Math.max(0,Math.min(t.wrapper.clientHeight-10,s.top+c.top-u.top)),f=Math.max(0,Math.min(t.wrapper.clientWidth-10,s.left+c.left-u.left));t.inputDiv.style.top=d+"px",t.inputDiv.style.left=f+"px"}ci(t.cursorDiv,n),ci(t.selectionDiv,i)}function ge(e,t,r){var n=je(e,t.head,"div"),i=r.appendChild(si("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(si("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function ve(e,t,r){function n(e,t,r,n){0>t&&(t=0),t=Math.round(t),n=Math.round(n),l.appendChild(si("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?c-e:r)+"px; height: "+(n-t)+"px"))}function i(t,r,i){function o(r,n){return Re(e,ro(t,r),"div",l,n)}var l=bn(a,t),s=l.text.length,d,f;return wi(Mn(l),r||0,null==i?s:i,function(e,t,a){var l=o(e,"left"),h,p,m;if(e==t)h=l,p=m=l.left;else{if(h=o(t-1,"right"),"rtl"==a){var g=l;l=h,h=g}p=l.left,m=h.right}null==r&&0==e&&(p=u),h.top-l.top>3&&(n(p,l.top,null,l.bottom),p=u,l.bottom<h.top&&n(p,l.bottom,null,h.top)),null==i&&t==s&&(m=c),(!d||l.top<d.top||l.top==d.top&&l.left<d.left)&&(d=l),(!f||h.bottom>f.bottom||h.bottom==f.bottom&&h.right>f.right)&&(f=h),u+1>p&&(p=u),n(p,h.top,m-p,h.bottom)}),{start:d,end:f}}var o=e.display,a=e.doc,l=document.createDocumentFragment(),s=Se(e.display),u=s.left,c=o.lineSpace.offsetWidth-s.right,d=t.from(),f=t.to();if(d.line==f.line)i(d.line,d.ch,f.ch);else{var h=bn(a,d.line),p=bn(a,f.line),m=Br(h)==Br(p),g=i(d.line,d.ch,m?h.text.length+1:null).end,v=i(f.line,m?0:null,f.ch).start;m&&(g.top<v.top-2?(n(g.right,g.top,null,g.bottom),n(u,v.top,v.left,v.bottom)):n(g.right,g.top,v.left-g.right,g.bottom)),g.bottom<v.top&&n(u,g.bottom,null,v.top)}r.appendChild(l)}function ye(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0&&(t.blinker=setInterval(function(){t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate))}}function be(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,oi(we,e))}function we(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=So(t.mode,ke(e,t.frontier));Ze(e,function(){t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(i){if(t.frontier>=e.display.viewFrom){var o=i.styles,a=tn(e,i,n,!0);i.styles=a.styles,a.classes?i.styleClasses=a.classes:i.styleClasses&&(i.styleClasses=null);for(var l=!o||o.length!=i.styles.length,s=0;!l&&s<o.length;++s)l=o[s]!=i.styles[s];l&&it(e,t.frontier,"text"),i.stateAfter=So(t.mode,n)}else nn(e,i.text,n),i.stateAfter=t.frontier%5==0?So(t.mode,n):null;return++t.frontier,+new Date>r?(be(e,e.options.workDelay),!0):void 0})})}}function xe(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=bn(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var u=na(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}function ke(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=xe(e,t,r),a=o>n.first&&bn(n,o-1).stateAfter;return a=a?So(n.mode,a):Mo(n.mode),n.iter(o,t,function(r){nn(e,r.text,a);var l=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=l?So(n.mode,a):null,++o}),r&&(n.frontier=o),a}function Ce(e){return e.lineSpace.offsetTop}function Le(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Se(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=ci(e.measure,si("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function Me(e,t,r){var n=e.options.lineWrapping,i=n&&e.display.scroller.clientWidth;if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],u=a[l+1];Math.abs(s.bottom-u.bottom)>2&&o.push((s.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Te(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var n=0;n<e.rest.length;n++)if(Cn(e.rest[n])>r)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}function Ae(e,t){t=Br(t);var r=Cn(t),n=e.display.externalMeasured=new tt(e.doc,t,r);n.lineN=r;var i=n.built=an(e,n);return n.text=i.pre,ci(e.display.lineMeasure,i.pre),n}function Ne(e,t,r,n){return ze(e,Oe(e,t),r,n)}function He(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[at(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Oe(e,t){var r=Cn(t),n=He(e,r);n&&!n.text?n=null:n&&n.changes&&O(e,n,r,N(e)),n||(n=Ae(e,t));var i=Te(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function ze(e,t,r,n){t.before&&(r=-1);var i=r+(n||""),o;return t.cache.hasOwnProperty(i)?o=t.cache[i]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Me(e,t.view,t.rect),t.hasHeights=!0),o=Ee(e,t,r,n),o.bogus||(t.cache[i]=o)),{left:o.left,right:o.right,top:o.top,bottom:o.bottom}}function Ee(e,t,r,n){for(var i=t.map,o,a,l,s,u=0;u<i.length;u+=3){var c=i[u],d=i[u+1];if(c>r?(a=0,l=1,s="left"):d>r?(a=r-c,l=a+1):(u==i.length-3||r==d&&i[u+3]>r)&&(l=d-c,a=l-1,r>=d&&(s="right")),null!=a){if(o=i[u+2],c==d&&n==(o.insertLeft?"left":"right")&&(s=n),"left"==n&&0==a)for(;u&&i[u-2]==i[u-3]&&i[u-1].insertLeft;)o=i[(u-=3)+2],s="left";if("right"==n&&a==d-c)for(;u<i.length-3&&i[u+3]==i[u+4]&&!i[u+5].insertLeft;)o=i[(u+=3)+2],s="right";break}}var f;if(3==o.nodeType){for(;a&&li(t.line.text.charAt(c+a));)--a;for(;d>c+l&&li(t.line.text.charAt(c+l));)++l;if(Ii&&0==a&&l==d-c)f=o.parentNode.getBoundingClientRect();else if(_i&&e.options.lineWrapping){var h=ua(o,a,l).getClientRects();f=h.length?h["right"==n?h.length-1:0]:io}else f=ua(o,a,l).getBoundingClientRect()}else{a>0&&(s=n="right");var h;f=e.options.lineWrapping&&(h=o.getClientRects()).length>1?h["right"==n?h.length-1:0]:o.getBoundingClientRect()}if(Ii&&!a&&(!f||!f.left&&!f.right)){var p=o.parentNode.getClientRects()[0];f=p?{left:p.left,right:p.left+$e(e.display),top:p.top,bottom:p.bottom}:io}for(var m,g=(f.bottom+f.top)/2-t.rect.top,v=t.view.measure.heights,u=0;u<v.length-1&&!(g<v[u]);u++);m=u?v[u-1]:0,g=v[u];var y={left:("right"==s?f.right:f.left)-t.rect.left,right:("left"==s?f.left:f.right)-t.rect.left,top:m,bottom:g};return f.left||f.right||(y.bogus=!0),y}function We(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={};
|
2 |
-
}function Ie(e){e.display.externalMeasure=null,ui(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)We(e.display.view[t])}function De(e){Ie(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Pe(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function _e(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Fe(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=Kr(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=Sn(t);if("local"==n?a+=Ce(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==n?0:_e());var s=l.left+("window"==n?0:Pe());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function Be(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Pe(),i-=_e();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:n-a.left,top:i-a.top}}function Re(e,t,r,n,i){return n||(n=bn(e.doc,t.line)),Fe(e,n,Ne(e,n,t.ch,i),r)}function je(e,t,r,n,i){function o(t,o){var a=ze(e,i,t,o?"right":"left");return o?a.left=a.right:a.right=a.left,Fe(e,n,a,r)}function a(e,t){var r=l[t],n=r.level%2;return e==xi(r)&&t&&r.level<l[t-1].level?(r=l[--t],e=ki(r)-(r.level%2?0:1),n=!0):e==ki(r)&&t<l.length-1&&r.level<l[t+1].level&&(r=l[++t],e=xi(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?o(e-1):o(e,n)}n=n||bn(e.doc,t.line),i||(i=Oe(e,n));var l=Mn(n),s=t.ch;if(!l)return o(s);var u=Ai(l,s),c=a(s,u);return null!=ya&&(c.other=a(s,ya)),c}function Ve(e,t){var r=0,t=Q(e.doc,t);e.options.lineWrapping||(r=$e(e.display)*t.ch);var n=bn(e.doc,t.line),i=Sn(n)+Ce(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function qe(e,t,r,n){var i=ro(e,t);return i.xRel=n,r&&(i.outside=!0),i}function Ge(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,0>r)return qe(n.first,0,!0,-1);var i=Ln(n,r),o=n.first+n.size-1;if(i>o)return qe(n.first+n.size-1,bn(n,o).text.length,!0,1);0>t&&(t=0);for(var a=bn(n,i);;){var l=Ue(e,a,i,t,r),s=_r(a),u=s&&s.find(0,!0);if(!s||!(l.ch>u.from.ch||l.ch==u.from.ch&&l.xRel>0))return l;i=Cn(a=u.to.line)}}function Ue(e,t,r,n,i){function o(n){var i=je(e,ro(r,n),"line",t,u);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-Sn(t),l=!1,s=2*e.display.wrapper.clientWidth,u=Oe(e,t),c=Mn(t),d=t.text.length,f=Ci(t),h=Li(t),p=o(f),m=l,g=o(h),v=l;if(n>g)return qe(r,h,v,1);for(;;){if(c?h==f||h==Hi(t,f,1):1>=h-f){for(var y=p>n||g-n>=n-p?f:h,b=n-(y==f?p:g);li(t.text.charAt(y));)++y;var w=qe(r,y,y==f?m:v,-1>b?-1:b>1?1:0);return w}var x=Math.ceil(d/2),k=f+x;if(c){k=f;for(var C=0;x>C;++C)k=Hi(t,k,1)}var L=o(k);L>n?(h=k,g=L,(v=l)&&(g+=1e3),d=x):(f=k,p=L,m=l,d-=x)}}function Ke(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==oo){oo=si("pre");for(var t=0;49>t;++t)oo.appendChild(document.createTextNode("x")),oo.appendChild(si("br"));oo.appendChild(document.createTextNode("x"))}ci(e.measure,oo);var r=oo.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),ui(e.measure),r||1}function $e(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=si("span","xxxxxxxxxx"),r=si("pre",[t]);ci(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function Ye(e){e.curOp={viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++ao},Zo++||(Xo=[])}function Xe(e){var t=e.curOp,r=e.doc,n=e.display;if(e.curOp=null,t.updateMaxLine&&h(e),t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping){var i=k(e,{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate);e.display.scroller.offsetHeight&&(e.doc.scrollTop=e.display.scroller.scrollTop)}if(!i&&t.selectionChanged&&me(e),i||t.startHeight==e.doc.height||g(e),null!=t.scrollTop&&n.scroller.scrollTop!=t.scrollTop){var o=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,t.scrollTop));n.scroller.scrollTop=n.scrollbarV.scrollTop=r.scrollTop=o}if(null!=t.scrollLeft&&n.scroller.scrollLeft!=t.scrollLeft){var a=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,t.scrollLeft));n.scroller.scrollLeft=n.scrollbarH.scrollLeft=r.scrollLeft=a,y(e)}if(t.scrollToPos){var l=rr(e,Q(e.doc,t.scrollToPos.from),Q(e.doc,t.scrollToPos.to),t.scrollToPos.margin);t.scrollToPos.isCursor&&e.state.focused&&tr(e,l)}t.selectionChanged&&ye(e),e.state.focused&&t.updateInput&&ht(e,t.typing);var s=t.maybeHiddenMarkers,u=t.maybeUnhiddenMarkers;if(s)for(var c=0;c<s.length;++c)s[c].lines.length||Yo(s[c],"hide");if(u)for(var c=0;c<u.length;++c)u[c].lines.length&&Yo(u[c],"unhide");var d;if(--Zo||(d=Xo,Xo=null),t.changeObjs&&Yo(e,"changes",e,t.changeObjs),d)for(var c=0;c<d.length;++c)d[c]();if(t.cursorActivityHandlers)for(var c=0;c<t.cursorActivityHandlers.length;c++)t.cursorActivityHandlers[c](e)}function Ze(e,t){if(e.curOp)return t();Ye(e);try{return t()}finally{Xe(e)}}function Qe(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Ye(e);try{return t.apply(e,arguments)}finally{Xe(e)}}}function Je(e){return function(){if(this.curOp)return e.apply(this,arguments);Ye(this);try{return e.apply(this,arguments)}finally{Xe(this)}}}function et(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Ye(t);try{return e.apply(this,arguments)}finally{Xe(t)}}}function tt(e,t,r){this.line=t,this.rest=Rr(t),this.size=this.rest?Cn(ei(this.rest))-r+1:1,this.node=this.text=null,this.hidden=qr(e,t)}function rt(e,t,r){for(var n=[],i,o=t;r>o;o=i){var a=new tt(e.doc,bn(e.doc,o),o);i=o+a.size,n.push(a)}return n}function nt(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)to&&jr(e.doc,t)<i.viewTo&&ot(e);else if(r<=i.viewFrom)to&&Vr(e.doc,r+n)>i.viewFrom?ot(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)ot(e);else if(t<=i.viewFrom){var o=lt(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):ot(e)}else if(r>=i.viewTo){var o=lt(e,t,t,-1);o?(i.view=i.view.slice(0,o.index),i.viewTo=o.lineN):ot(e)}else{var a=lt(e,t,t,-1),l=lt(e,r,r+n,1);a&&l?(i.view=i.view.slice(0,a.index).concat(rt(e,a.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=n):ot(e)}var s=i.externalMeasured;s&&(r<s.lineN?s.lineN+=n:t<s.lineN+s.size&&(i.externalMeasured=null))}function it(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[at(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==ti(a,r)&&a.push(r)}}}function ot(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function at(e,t){if(t>=e.display.viewTo)return null;if(t-=e.display.viewFrom,0>t)return null;for(var r=e.display.view,n=0;n<r.length;n++)if(t-=r[n].size,0>t)return n}function lt(e,t,r,n){var i=at(e,t),o,a=e.display.view;if(!to)return{index:i,lineN:r};for(var l=0,s=e.display.viewFrom;i>l;l++)s+=a[l].size;if(s!=t){if(n>0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,r+=o}for(;jr(e.doc,r)!=r;){if(i==(0>n?0:a.length-1))return null;r+=n*a[i-(0>n?1:0)].size,i+=n}return{index:i,lineN:r}}function st(e,t,r){var n=e.display,i=n.view;0==i.length||t>=n.viewTo||r<=n.viewFrom?(n.view=rt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=rt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(at(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(rt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,at(e,r)))),n.viewTo=r}function ut(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ct(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,function(){ft(e),e.state.focused&&ct(e)})}function dt(e){function t(){var n=ft(e);n||r?(e.display.pollingFast=!1,ct(e)):(r=!0,e.display.poll.set(60,t))}var r=!1;e.display.pollingFast=!0,e.display.poll.set(20,t)}function ft(e){var t=e.display.input,r=e.display.prevInput,n=e.doc;if(!e.state.focused||ma(t)&&!r||gt(e)||e.options.disableInput)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var i=t.value;if(i==r&&!e.somethingSelected())return!1;if(_i&&!Ii&&e.display.inputHasSelection===i)return ht(e),!1;var o=!e.curOp;o&&Ye(e),e.display.shift=!1;for(var a=0,l=Math.min(r.length,i.length);l>a&&r.charCodeAt(a)==i.charCodeAt(a);)++a;for(var s=i.slice(a),u=pa(s),c=e.state.pasteIncoming&&u.length>1&&n.sel.ranges.length==u.length,d=n.sel.ranges.length-1;d>=0;d--){var f=n.sel.ranges[d],h=f.from(),p=f.to();a<r.length?h=ro(h.line,h.ch-(r.length-a)):e.state.overwrite&&f.empty()&&!e.state.pasteIncoming&&(p=ro(p.line,Math.min(bn(n,p.line).text.length,p.ch+ei(u).length)));var m=e.curOp.updateInput,g={from:h,to:p,text:c?[u[d]]:u,origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if($t(e.doc,g),Gn(e,"inputRead",e,g),s&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&f.head.ch<100&&(!d||n.sel.ranges[d-1].head.line!=f.head.line)){var v=e.getModeAt(f.head);if(v.electricChars){for(var y=0;y<v.electricChars.length;y++)if(s.indexOf(v.electricChars.charAt(y))>-1){sr(e,f.head.line,"smart");break}}else if(v.electricInput){var b=go(g);v.electricInput.test(bn(n,b.line).text.slice(0,b.ch))&&sr(e,f.head.line,"smart")}}}return ar(e),e.curOp.updateInput=m,e.curOp.typing=!0,i.length>1e3||i.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=i,o&&Xe(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function ht(e,t){var r,n,i=e.doc;if(e.somethingSelected()){e.display.prevInput="";var o=i.sel.primary();r=ga&&(o.to().line-o.from().line>100||(n=e.getSelection()).length>1e3);var a=r?"-":n||e.getSelection();e.display.input.value=a,e.state.focused&&oa(e.display.input),_i&&!Ii&&(e.display.inputHasSelection=a)}else t||(e.display.prevInput=e.display.input.value="",_i&&!Ii&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=r}function pt(e){"nocursor"==e.options.readOnly||$i&&fi()==e.display.input||e.display.input.focus()}function mt(e){e.state.focused||(pt(e),Ft(e))}function gt(e){return e.options.readOnly||e.doc.cantEdit}function vt(e){function t(){e.state.focused&&setTimeout(oi(pt,e),0)}function r(){null==l&&(l=setTimeout(function(){l=null,a.cachedCharWidth=a.cachedTextHeight=a.cachedPaddingH=da=null,e.setSize()},100))}function n(){di(document.body,a.wrapper)?setTimeout(n,5e3):$o(window,"resize",r)}function i(t){Kn(e,t)||Uo(t)}function o(t){if(e.somethingSelected())a.inaccurateSelection&&(a.prevInput="",a.inaccurateSelection=!1,a.input.value=e.getSelection(),oa(a.input));else{for(var r="",n=[],i=0;i<e.doc.sel.ranges.length;i++){var o=e.doc.sel.ranges[i].head.line,l={anchor:ro(o,0),head:ro(o+1,0)};n.push(l),r+=e.getRange(l.anchor,l.head)}"cut"==t.type?e.setSelections(n,null,ea):(a.prevInput="",a.input.value=r,oa(a.input))}"cut"==t.type&&(e.state.cutIncoming=!0)}var a=e.display;Ko(a.scroller,"mousedown",Qe(e,wt)),Ei?Ko(a.scroller,"dblclick",Qe(e,function(t){if(!Kn(e,t)){var r=bt(e,t);if(r&&!St(e,t)&&!yt(e.display,t)){qo(t);var n=hr(e.doc,r);ne(e.doc,n.anchor,n.head)}}})):Ko(a.scroller,"dblclick",function(t){Kn(e,t)||qo(t)}),Ko(a.lineSpace,"selectstart",function(e){yt(a,e)||qo(e)}),Ji||Ko(a.scroller,"contextmenu",function(t){Rt(e,t)}),Ko(a.scroller,"scroll",function(){a.scroller.clientHeight&&(At(e,a.scroller.scrollTop),Nt(e,a.scroller.scrollLeft,!0),Yo(e,"scroll",e))}),Ko(a.scrollbarV,"scroll",function(){a.scroller.clientHeight&&At(e,a.scrollbarV.scrollTop)}),Ko(a.scrollbarH,"scroll",function(){a.scroller.clientHeight&&Nt(e,a.scrollbarH.scrollLeft)}),Ko(a.scroller,"mousewheel",function(t){Ht(e,t)}),Ko(a.scroller,"DOMMouseScroll",function(t){Ht(e,t)}),Ko(a.scrollbarH,"mousedown",t),Ko(a.scrollbarV,"mousedown",t),Ko(a.wrapper,"scroll",function(){a.wrapper.scrollTop=a.wrapper.scrollLeft=0});var l;Ko(window,"resize",r),setTimeout(n,5e3),Ko(a.input,"keyup",Qe(e,Pt)),Ko(a.input,"input",function(){_i&&!Ii&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),dt(e)}),Ko(a.input,"keydown",Qe(e,It)),Ko(a.input,"keypress",Qe(e,_t)),Ko(a.input,"focus",oi(Ft,e)),Ko(a.input,"blur",oi(Bt,e)),e.options.dragDrop&&(Ko(a.scroller,"dragstart",function(t){Tt(e,t)}),Ko(a.scroller,"dragenter",i),Ko(a.scroller,"dragover",i),Ko(a.scroller,"drop",Qe(e,Mt))),Ko(a.scroller,"paste",function(t){yt(a,t)||(e.state.pasteIncoming=!0,pt(e),dt(e))}),Ko(a.input,"paste",function(){if(Fi&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var t=a.input.selectionStart,r=a.input.selectionEnd;a.input.value+="$",a.input.selectionStart=t,a.input.selectionEnd=r,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,dt(e)}),Ko(a.input,"cut",o),Ko(a.input,"copy",o),qi&&Ko(a.sizer,"mouseup",function(){fi()==a.input&&a.input.blur(),pt(e)})}function yt(e,t){for(var r=Vn(t);r!=e.wrapper;r=r.parentNode)if(!r||r.ignoreEvents||r.parentNode==e.sizer&&r!=e.mover)return!0}function bt(e,t,r,n){var i=e.display;if(!r){var o=Vn(t);if(o==i.scrollbarH||o==i.scrollbarV||o==i.scrollbarFiller||o==i.gutterFiller)return null}var a,l,s=i.lineSpace.getBoundingClientRect();try{a=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var u=Ge(e,a,l),c;if(n&&1==u.xRel&&(c=bn(e.doc,u.line).text).length==u.ch){var d=na(c,c.length,e.options.tabSize)-c.length;u=ro(u.line,Math.max(0,Math.round((a-Se(e.display).left)/$e(e.display))-d))}return u}function wt(e){if(!Kn(this,e)){var t=this,r=t.display;if(r.shift=e.shiftKey,yt(r,e))return void(Fi||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100)));if(!St(t,e)){var n=bt(t,e);switch(window.focus(),qn(e)){case 1:n?xt(t,e,n):Vn(e)==r.scroller&&qo(e);break;case 2:Fi&&(t.state.lastMiddleDown=+new Date),n&&ne(t.doc,n),setTimeout(oi(pt,t),20),qo(e);break;case 3:Ji&&Rt(t,e)}}}}function xt(e,t,r){setTimeout(oi(mt,e),0);var n=+new Date,i;so&&so.time>n-400&&0==no(so.pos,r)?i="triple":lo&&lo.time>n-400&&0==no(lo.pos,r)?(i="double",so={time:n,pos:r}):(i="single",lo={time:n,pos:r});var o=e.doc.sel,a=Yi?t.metaKey:t.ctrlKey;e.options.dragDrop&&ca&&!a&&!gt(e)&&"single"==i&&o.contains(r)>-1&&o.somethingSelected()?kt(e,t,r):Ct(e,t,r,i,a)}function kt(e,t,r){var n=e.display,i=Qe(e,function(o){Fi&&(n.scroller.draggable=!1),e.state.draggingText=!1,$o(document,"mouseup",i),$o(n.scroller,"drop",i),Math.abs(t.clientX-o.clientX)+Math.abs(t.clientY-o.clientY)<10&&(qo(o),ne(e.doc,r),pt(e),Ei&&!Ii&&setTimeout(function(){document.body.focus(),pt(e)},20))});Fi&&(n.scroller.draggable=!0),e.state.draggingText=i,n.scroller.dragDrop&&n.scroller.dragDrop(),Ko(document,"mouseup",i),Ko(n.scroller,"drop",i)}function Ct(e,t,r,n,i){function o(t){if(0!=no(m,t))if(m=t,"rect"==n){for(var i=[],o=e.options.tabSize,a=na(bn(u,r.line).text,r.ch,o),l=na(bn(u,t.line).text,t.ch,o),s=Math.min(a,l),h=Math.max(a,l),p=Math.min(r.line,t.line),g=Math.min(e.lastLine(),Math.max(r.line,t.line));g>=p;p++){var v=bn(u,p).text,y=Qn(v,s,o);s==h?i.push(new K(ro(p,y),ro(p,y))):v.length>y&&i.push(new K(ro(p,y),ro(p,Qn(v,h,o))))}i.length||i.push(new K(r,r)),ue(u,Y(f.ranges.slice(0,d).concat(i),d),ta)}else{var b=c,w=b.anchor,x=t;if("single"!=n){if("double"==n)var k=hr(u,t);else var k=new K(ro(t.line,0),Q(u,ro(t.line+1,0)));no(k.anchor,w)>0?(x=k.head,w=G(b.from(),k.anchor)):(x=k.anchor,w=q(b.to(),k.head))}var i=f.ranges.slice(0);i[d]=new K(Q(u,w),x),ue(u,Y(i,d),ta)}}function a(t){var r=++y,i=bt(e,t,!0,"rect"==n);if(i)if(0!=no(i,m)){mt(e),o(i);var l=v(s,u);(i.line>=l.to||i.line<l.from)&&setTimeout(Qe(e,function(){y==r&&a(t)}),150)}else{var c=t.clientY<g.top?-20:t.clientY>g.bottom?20:0;c&&setTimeout(Qe(e,function(){y==r&&(s.scroller.scrollTop+=c,a(t))}),50)}}function l(t){y=1/0,qo(t),pt(e),$o(document,"mousemove",b),$o(document,"mouseup",w),u.history.lastSelOrigin=null}var s=e.display,u=e.doc;qo(t);var c,d,f=u.sel;if(i&&!t.shiftKey?(d=u.sel.contains(r),c=d>-1?u.sel.ranges[d]:new K(r,r)):c=u.sel.primary(),t.altKey)n="rect",i||(c=new K(r,r)),r=bt(e,t,!0,!0),d=-1;else if("double"==n){var h=hr(u,r);c=e.display.shift||u.extend?re(u,c,h.anchor,h.head):h}else if("triple"==n){var p=new K(ro(r.line,0),Q(u,ro(r.line+1,0)));c=e.display.shift||u.extend?re(u,c,p.anchor,p.head):p}else c=re(u,c,r);i?d>-1?oe(u,d,c,ta):(d=u.sel.ranges.length,ue(u,Y(u.sel.ranges.concat([c]),d),{scroll:!1,origin:"*mouse"})):(d=0,ue(u,new U([c],0),ta),f=u.sel);var m=r,g=s.wrapper.getBoundingClientRect(),y=0,b=Qe(e,function(e){(_i&&!Di?e.buttons:qn(e))?a(e):l(e)}),w=Qe(e,l);Ko(document,"mousemove",b),Ko(document,"mouseup",w)}function Lt(e,t,r,n,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&qo(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(a>s.bottom||!Yn(e,r))return jn(t);a-=s.top-l.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=l.gutters.childNodes[u];if(c&&c.getBoundingClientRect().right>=o){var d=Ln(e.doc,a),f=e.options.gutters[u];return i(e,r,e,d,f,t),jn(t)}}}function St(e,t){return Lt(e,t,"gutterClick",!0,Gn)}function Mt(e){var t=this;if(!Kn(t,e)&&!yt(t.display,e)){qo(e),_i&&(uo=+new Date);var r=bt(t,e,!0),n=e.dataTransfer.files;if(r&&!gt(t))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){var l=new FileReader;l.onload=Qe(t,function(){if(o[n]=l.result,++a==i){r=Q(t.doc,r);var e={from:r,to:r,text:pa(o.join("\n")),origin:"paste"};$t(t.doc,e),se(t.doc,X(r,go(e)))}}),l.readAsText(e)},s=0;i>s;++s)l(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(oi(pt,t),20);try{var o=e.dataTransfer.getData("Text");if(o){var u=t.state.draggingText&&t.listSelections();if(ce(t.doc,X(r,r)),u)for(var s=0;s<u.length;++s)er(t.doc,"",u[s].anchor,u[s].head,"drag");t.replaceSelection(o,"around","paste"),pt(t)}}catch(e){}}}}function Tt(e,t){if(_i&&(!e.state.draggingText||+new Date-uo<100))return void Uo(t);if(!Kn(e,t)&&!yt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.setDragImage&&!Vi)){var r=si("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ji&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),ji&&r.parentNode.removeChild(r)}}function At(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,zi||k(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbarV.scrollTop!=t&&(e.display.scrollbarV.scrollTop=t),zi&&k(e),be(e,100))}function Nt(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,y(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbarH.scrollLeft!=t&&(e.display.scrollbarH.scrollLeft=t))}function Ht(e,t){var r=t.wheelDeltaX,n=t.wheelDeltaY;null==r&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(r=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta);var i=e.display,o=i.scroller;if(r&&o.scrollWidth>o.clientWidth||n&&o.scrollHeight>o.clientHeight){if(n&&Yi&&Fi)e:for(var a=t.target,l=i.view;a!=o;a=a.parentNode)for(var s=0;s<l.length;s++)if(l[s].node==a){e.display.currentWheelTarget=a;break e}if(r&&!zi&&!ji&&null!=fo)return n&&At(e,Math.max(0,Math.min(o.scrollTop+n*fo,o.scrollHeight-o.clientHeight))),Nt(e,Math.max(0,Math.min(o.scrollLeft+r*fo,o.scrollWidth-o.clientWidth))),qo(t),void(i.wheelStartX=null);if(n&&null!=fo){var u=n*fo,c=e.doc.scrollTop,d=c+i.wrapper.clientHeight;0>u?c=Math.max(0,c+u-50):d=Math.min(e.doc.height,d+u+50),k(e,{top:c,bottom:d})}20>co&&(null==i.wheelStartX?(i.wheelStartX=o.scrollLeft,i.wheelStartY=o.scrollTop,i.wheelDX=r,i.wheelDY=n,setTimeout(function(){if(null!=i.wheelStartX){var e=o.scrollLeft-i.wheelStartX,t=o.scrollTop-i.wheelStartY,r=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,r&&(fo=(fo*co+r)/(co+1),++co)}},200)):(i.wheelDX+=r,i.wheelDY+=n))}}function Ot(e,t,r){if("string"==typeof t&&(t=To[t],!t))return!1;e.display.pollingFast&&ft(e)&&(e.display.pollingFast=!1);var n=e.display.shift,i=!1;try{gt(e)&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Jo}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function zt(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function Et(e,t){var r=mr(e.options.keyMap),n=r.auto;clearTimeout(ho),n&&!Ho(t)&&(ho=setTimeout(function(){mr(e.options.keyMap)==r&&(e.options.keyMap=n.call?n.call(null,e):n,l(e))},50));var i=Oo(t,!0),o=!1;if(!i)return!1;var a=zt(e);return o=t.shiftKey?No("Shift-"+i,a,function(t){return Ot(e,t,!0)})||No(i,a,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?Ot(e,t):void 0}):No(i,a,function(t){return Ot(e,t)}),o&&(qo(t),ye(e),Gn(e,"keyHandled",e,i,t)),o}function Wt(e,t,r){var n=No("'"+r+"'",zt(e),function(t){return Ot(e,t,!0)});return n&&(qo(t),ye(e),Gn(e,"keyHandled",e,"'"+r+"'",t)),n}function It(e){var t=this;if(mt(t),!Kn(t,e)){Ei&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=Et(t,e);ji&&(po=n?r:null,!n&&88==r&&!ga&&(Yi?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||Dt(t)}}function Dt(e){function t(e){18!=e.keyCode&&e.altKey||(pi(r,"CodeMirror-crosshair"),$o(document,"keyup",t),$o(document,"mouseover",t))}var r=e.display.lineDiv;mi(r,"CodeMirror-crosshair"),Ko(document,"keyup",t),Ko(document,"mouseover",t)}function Pt(e){Kn(this,e)||16==e.keyCode&&(this.doc.sel.shift=!1)}function _t(e){var t=this;if(!Kn(t,e)){var r=e.keyCode,n=e.charCode;if(ji&&r==po)return po=null,void qo(e);if(!(ji&&(!e.which||e.which<10)||qi)||!Et(t,e)){var i=String.fromCharCode(null==n?r:n);Wt(t,e,i)||(_i&&!Ii&&(t.display.inputHasSelection=null),dt(t))}}}function Ft(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(Yo(e,"focus",e),e.state.focused=!0,mi(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu!=e.doc.sel||(ht(e),Fi&&setTimeout(oi(ht,e,!0),0))),ct(e),ye(e))}function Bt(e){e.state.focused&&(Yo(e,"blur",e),e.state.focused=!1,pi(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150)}function Rt(e,t){function r(){if(null!=i.input.selectionStart){var t=e.somethingSelected(),r=i.input.value=""+(t?i.input.value:"");i.prevInput=t?"":"",i.input.selectionStart=1,i.input.selectionEnd=r.length}}function n(){if(i.inputDiv.style.position="relative",i.input.style.cssText=s,Ii&&(i.scrollbarV.scrollTop=i.scroller.scrollTop=a),ct(e),null!=i.input.selectionStart){(!_i||Ii)&&r(),clearTimeout(mo);var t=0,n=function(){i.selForContextMenu==e.doc.sel&&0==i.input.selectionStart?Qe(e,To.selectAll)(e):t++<10?mo=setTimeout(n,500):ht(e)};mo=setTimeout(n,200)}}if(!Kn(e,t,"contextmenu")){var i=e.display;if(!yt(i,t)&&!jt(e,t)){var o=bt(e,t),a=i.scroller.scrollTop;if(o&&!ji){var l=e.options.resetSelectionOnContextMenu;l&&-1==e.doc.sel.contains(o)&&Qe(e,ue)(e.doc,X(o),ea);var s=i.input.style.cssText;if(i.inputDiv.style.position="absolute",i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: "+(_i?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",pt(e),ht(e),e.somethingSelected()||(i.input.value=i.prevInput=" "),i.selForContextMenu=e.doc.sel,_i&&!Ii&&r(),Ji){Uo(t);var u=function(){$o(window,"mouseup",u),setTimeout(n,20)};Ko(window,"mouseup",u)}else setTimeout(n,50)}}}}function jt(e,t){return Yn(e,"gutterContextMenu")?Lt(e,t,"gutterContextMenu",!1,Yo):!1}function Vt(e,t){if(no(e,t.from)<0)return e;if(no(e,t.to)<=0)return go(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=go(t).ch-t.to.ch),ro(r,n)}function qt(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new K(Vt(i.anchor,t),Vt(i.head,t)))}return Y(r,e.sel.primIndex)}function Gt(e,t,r){return e.line==t.line?ro(r.line,e.ch-t.ch+r.ch):ro(r.line+(e.line-t.line),e.ch)}function Ut(e,t,r){for(var n=[],i=ro(e.first,0),o=i,a=0;a<t.length;a++){var l=t[a],s=Gt(l.from,i,o),u=Gt(go(l),i,o);if(i=l.to,o=u,"around"==r){var c=e.sel.ranges[a],d=no(c.head,c.anchor)<0;n[a]=new K(d?u:s,d?s:u)}else n[a]=new K(s,s)}return new U(n,e.sel.primIndex)}function Kt(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,i){t&&(this.from=Q(e,t)),r&&(this.to=Q(e,r)),n&&(this.text=n),void 0!==i&&(this.origin=i)}),Yo(e,"beforeChange",e,n),e.cm&&Yo(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function $t(e,t,r){if(e.cm){if(!e.cm.curOp)return Qe(e.cm,$t)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(Yn(e,"beforeChange")||e.cm&&Yn(e.cm,"beforeChange"))||(t=Kt(e,t,!0))){var n=eo&&!r&&Hr(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Yt(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Yt(e,t)}}function Yt(e,t){if(1!=t.text.length||""!=t.text[0]||0!=no(t.from,t.to)){var r=qt(e,t);On(e,t,r,e.cm?e.cm.curOp.id:NaN),Qt(e,t,r,Tr(e,t));var n=[];vn(e,function(e,r){r||-1!=ti(n,e.history)||(Rn(e.history,t),n.push(e.history)),Qt(e,t,null,Tr(e,t))})}}function Xt(e,t,r){if(!e.cm||!e.cm.state.suppressEdits){for(var n=e.history,i,o=e.sel,a="undo"==t?n.done:n.undone,l="undo"==t?n.undone:n.done,s=0;s<a.length&&(i=a[s],r?!i.ranges||i.equals(e.sel):i.ranges);s++);if(s!=a.length){for(n.lastOrigin=n.lastSelOrigin=null;i=a.pop(),i.ranges;){if(Wn(i,l),r&&!i.equals(e.sel))return void ue(e,i,{clearRedo:!1});o=i}var u=[];Wn(o,l),l.push({changes:u,generation:n.generation}),n.generation=i.generation||++n.maxGeneration;for(var c=Yn(e,"beforeChange")||e.cm&&Yn(e.cm,"beforeChange"),s=i.changes.length-1;s>=0;--s){var d=i.changes[s];if(d.origin=t,c&&!Kt(e,d,!1))return void(a.length=0);u.push(An(e,d));var f=s?qt(e,d,null):ei(a);Qt(e,d,f,Nr(e,d)),e.cm&&ar(e.cm);var h=[];vn(e,function(e,t){t||-1!=ti(h,e.history)||(Rn(e.history,d),h.push(e.history)),Qt(e,d,null,Nr(e,d))})}}}}function Zt(e,t){e.first+=t,e.sel=new U(ri(e.sel.ranges,function(e){return new K(ro(e.anchor.line+t,e.anchor.ch),ro(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm&&nt(e.cm,e.first,e.first-t,t)}function Qt(e,t,r,n){if(e.cm&&!e.cm.curOp)return Qe(e.cm,Qt)(e,t,r,n);if(t.to.line<e.first)return void Zt(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Zt(e,i),t={from:ro(e.first,0),to:ro(t.to.line+i,t.to.ch),text:[ei(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ro(o,bn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=wn(e,t.from,t.to),r||(r=qt(e,t,null)),e.cm?Jt(e.cm,t,n):pn(e,t,n),ce(e,r,ea)}}function Jt(e,t,r){var n=e.doc,i=e.display,a=t.from,l=t.to,s=!1,u=a.line;e.options.lineWrapping||(u=Cn(Br(bn(n,a.line))),n.iter(u,l.line+1,function(e){return e==i.maxLine?(s=!0,!0):void 0})),n.sel.contains(t.from,t.to)>-1&&$n(e),pn(n,t,r,o(e)),e.options.lineWrapping||(n.iter(u,a.line+t.text.length,function(e){var t=f(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,a.line),be(e,400);var c=t.text.length-(l.line-a.line)-1;a.line!=l.line||1!=t.text.length||hn(e.doc,t)?nt(e,a.line,l.line+1,c):it(e,a.line,"text");var d=Yn(e,"changes"),h=Yn(e,"change");if(h||d){var p={from:a,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&Gn(e,"change",e,p),d&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}}function er(e,t,r,n,i){if(n||(n=r),no(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=pa(t)),$t(e,{from:r,to:n,text:t,origin:i})}function tr(e,t){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Ui){var o=si("div","",null,"position: absolute; top: "+(t.top-r.viewOffset-Ce(e.display))+"px; height: "+(t.bottom-t.top+Qo)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}function rr(e,t,r,n){for(null==n&&(n=0);;){var i=!1,o=je(e,t),a=r&&r!=t?je(e,r):o,l=ir(e,Math.min(o.left,a.left),Math.min(o.top,a.top)-n,Math.max(o.left,a.left),Math.max(o.bottom,a.bottom)+n),s=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(At(e,l.scrollTop),Math.abs(e.doc.scrollTop-s)>1&&(i=!0)),null!=l.scrollLeft&&(Nt(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(i=!0)),!i)return o}}function nr(e,t,r,n,i){var o=ir(e,t,r,n,i);null!=o.scrollTop&&At(e,o.scrollTop),null!=o.scrollLeft&&Nt(e,o.scrollLeft)}function ir(e,t,r,n,i){var o=e.display,a=Ke(e.display);0>r&&(r=0);var l=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:o.scroller.scrollTop,s=o.scroller.clientHeight-Qo,u={},c=e.doc.height+Le(o),d=a>r,f=i>c-a;if(l>r)u.scrollTop=d?0:r;else if(i>l+s){var h=Math.min(r,(f?c:i)-s);h!=l&&(u.scrollTop=h)}var p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:o.scroller.scrollLeft,m=o.scroller.clientWidth-Qo;t+=o.gutters.offsetWidth,n+=o.gutters.offsetWidth;var g=o.gutters.offsetWidth,v=g+10>t;return p+g>t||v?(v&&(t=0),u.scrollLeft=Math.max(0,t-10-g)):n>m+p-3&&(u.scrollLeft=n+10-m),u}function or(e,t,r){(null!=t||null!=r)&&lr(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function ar(e){lr(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?ro(t.line,t.ch-1):t,n=ro(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin,isCursor:!0}}function lr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=Ve(e,t.from),n=Ve(e,t.to),i=ir(e,Math.min(r.left,n.left),Math.min(r.top,n.top)-t.margin,Math.max(r.right,n.right),Math.max(r.bottom,n.bottom)+t.margin);e.scrollTo(i.scrollLeft,i.scrollTop)}}function sr(e,t,r,n){var i=e.doc,o;null==r&&(r="add"),"smart"==r&&(e.doc.mode.indent?o=ke(e,t):r="prev");var a=e.options.tabSize,l=bn(i,t),s=na(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var u=l.text.match(/^\s*/)[0],c;if(n||/\S/.test(l.text)){if("smart"==r&&(c=e.doc.mode.indent(o,l.text.slice(u.length),l.text),c==Jo)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>i.first?na(bn(i,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var d="",f=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)f+=a,d+=" ";if(c>f&&(d+=Jn(c-f)),d!=u)er(e.doc,d,ro(t,0),ro(t,u.length),"+input");else for(var h=0;h<i.sel.ranges.length;h++){var p=i.sel.ranges[h];if(p.head.line==t&&p.head.ch<u.length){var f=ro(t,u.length);oe(i,h,new K(f,f));break}}l.stateAfter=null}function ur(e,t,r,n){var i=t,o=t,a=e.doc;return"number"==typeof t?o=bn(a,Z(a,t)):i=Cn(t),null==i?null:(n(o,i)&&it(e,i,r),o)}function cr(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&no(o.from,ei(n).to)<=0;){var a=n.pop();if(no(a.from,o.from)<0){o.from=a.from;break}}n.push(o)}Ze(e,function(){
|
3 |
-
for(var t=n.length-1;t>=0;t--)er(e.doc,"",n[t].from,n[t].to,"+delete");ar(e)})}function dr(e,t,r,n,i){function o(){var t=l+r;return t<e.first||t>=e.first+e.size?d=!1:(l=t,c=bn(e,t))}function a(e){var t=(i?Hi:Oi)(c,s,r,!0);if(null==t){if(e||!o())return d=!1;s=i?(0>r?Li:Ci)(c):0>r?c.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,u=r,c=bn(e,l),d=!0;if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var f=null,h="group"==n,p=!0;!(0>r)||a(!p);p=!1){var m=c.text.charAt(s)||"\n",g=la(m)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||p||g||(g="s"),f&&f!=g){0>r&&(r=1,a());break}if(g&&(f=g),r>0&&!a(!p))break}var v=pe(e,ro(l,s),u,!0);return d||(v.hitSide=!0),v}function fr(e,t,r,n){var i=e.doc,o=t.left,a;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);a=t.top+r*(l-(0>r?1.5:.5)*Ke(e.display))}else"line"==n&&(a=r>0?t.bottom+3:t.top-3);for(;;){var s=Ge(e,o,a);if(!s.outside)break;if(0>r?0>=a:a>=i.height){s.hitSide=!0;break}a+=5*r}return s}function hr(e,t){var r=bn(e,t.line).text,n=t.ch,i=t.ch;if(r){(t.xRel<0||i==r.length)&&n?--n:++i;for(var o=r.charAt(n),a=la(o)?la:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!la(e)};n>0&&a(r.charAt(n-1));)--n;for(;i<r.length&&a(r.charAt(i));)++i}return new K(ro(t.line,n),ro(t.line,i))}function pr(t,r,n,i){e.defaults[t]=r,n&&(yo[t]=i?function(e,t,r){r!=bo&&n(e,t,r)}:n)}function mr(e){return"string"==typeof e?Ao[e]:e}function gr(e,t,r,n,i){if(n&&n.shared)return vr(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return Qe(e.cm,gr)(e,t,r,n,i);var o=new Eo(e,i),a=no(t,r);if(n&&ii(n,o,!1),a>0||0==a&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=si("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||(o.widgetNode.ignoreEvents=!0),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Fr(e,t.line,t,r,o)||t.line!=r.line&&Fr(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");to=!0}o.addToHistory&&On(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var l=t.line,s=e.cm,u;if(e.iter(l,r.line+1,function(e){s&&o.collapsed&&!s.options.lineWrapping&&Br(e)==s.display.maxLine&&(u=!0),o.collapsed&&l!=t.line&&kn(e,0),Lr(e,new xr(o,l==t.line?t.ch:null,l==r.line?r.ch:null)),++l}),o.collapsed&&e.iter(t.line,r.line+1,function(t){qr(e,t)&&kn(t,0)}),o.clearOnEnter&&Ko(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(eo=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++Wo,o.atomic=!0),s){if(u&&(s.curOp.updateMaxLine=!0),o.collapsed)nt(s,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle)for(var c=t.line;c<=r.line;c++)it(s,c,"text");o.atomic&&fe(s.doc),Gn(s,"markerAdded",s,o)}return o}function vr(e,t,r,n,i){n=ii(n),n.shared=!1;var o=[gr(e,t,r,n,i)],a=o[0],l=n.widgetNode;return vn(e,function(e){l&&(n.widgetNode=l.cloneNode(!0)),o.push(gr(e,Q(e,t),Q(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=ei(o)}),new Io(o,a)}function yr(e){return e.findMarks(ro(e.first,0),e.clipPos(ro(e.lastLine())),function(e){return e.parent})}function br(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(no(o,a)){var l=gr(e,o,a,n.primary,n.primary.type);n.markers.push(l),l.parent=n}}}function wr(e){for(var t=0;t<e.length;t++){var r=e[t],n=[r.primary.doc];vn(r.primary.doc,function(e){n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==ti(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}}}function xr(e,t,r){this.marker=e,this.from=t,this.to=r}function kr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Cr(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Lr(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Sr(e,t,r){if(e)for(var n=0,i;n<e.length;++n){var o=e[n],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new xr(a,o.from,s?null:o.to))}}return i}function Mr(e,t,r){if(e)for(var n=0,i;n<e.length;++n){var o=e[n],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new xr(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return i}function Tr(e,t){var r=ee(e,t.from.line)&&bn(e,t.from.line).markedSpans,n=ee(e,t.to.line)&&bn(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=0==no(t.from,t.to),l=Sr(r,i,a),s=Mr(n,o,a),u=1==t.text.length,c=ei(t.text).length+(u?i:0);if(l)for(var d=0;d<l.length;++d){var f=l[d];if(null==f.to){var h=kr(s,f.marker);h?u&&(f.to=null==h.to?null:h.to+c):f.to=i}}if(s)for(var d=0;d<s.length;++d){var f=s[d];if(null!=f.to&&(f.to+=c),null==f.from){var h=kr(l,f.marker);h||(f.from=c,u&&(l||(l=[])).push(f))}else f.from+=c,u&&(l||(l=[])).push(f)}l&&(l=Ar(l)),s&&s!=l&&(s=Ar(s));var p=[l];if(!u){var m=t.text.length-2,g;if(m>0&&l)for(var d=0;d<l.length;++d)null==l[d].to&&(g||(g=[])).push(new xr(l[d].marker,null,null));for(var d=0;m>d;++d)p.push(g);p.push(s)}return p}function Ar(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Nr(e,t){var r=Pn(e,t),n=Tr(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Hr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=ti(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(0),s=0;s<i.length;++s){var u=i[s];if(!(no(u.to,l.from)<0||no(u.from,l.to)>0)){var c=[s,1],d=no(u.from,l.from),f=no(u.to,l.to);(0>d||!a.inclusiveLeft&&!d)&&c.push({from:u.from,to:l.from}),(f>0||!a.inclusiveRight&&!f)&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-1}}return i}function Or(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function zr(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Er(e){return e.inclusiveLeft?-1:0}function Wr(e){return e.inclusiveRight?1:0}function Ir(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=no(n.from,i.from)||Er(e)-Er(t);if(o)return-o;var a=no(n.to,i.to)||Wr(e)-Wr(t);return a?a:t.id-e.id}function Dr(e,t){var r=to&&e.markedSpans,n;if(r)for(var i,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||Ir(n,i.marker)<0)&&(n=i.marker);return n}function Pr(e){return Dr(e,!0)}function _r(e){return Dr(e,!1)}function Fr(e,t,r,n,i){var o=bn(e,t),a=to&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(0),c=no(u.from,r)||Er(s.marker)-Er(i),d=no(u.to,n)||Wr(s.marker)-Wr(i);if(!(c>=0&&0>=d||0>=c&&d>=0)&&(0>=c&&(no(u.to,r)||Wr(s.marker)-Er(i))>0||c>=0&&(no(u.from,n)||Er(s.marker)-Wr(i))<0))return!0}}}function Br(e){for(var t;t=Pr(e);)e=t.find(-1,!0).line;return e}function Rr(e){for(var t,r;t=_r(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function jr(e,t){var r=bn(e,t),n=Br(r);return r==n?t:Cn(n)}function Vr(e,t){if(t>e.lastLine())return t;var r=bn(e,t),n;if(!qr(e,r))return t;for(;n=_r(r);)r=n.find(1,!0).line;return Cn(r)+1}function qr(e,t){var r=to&&t.markedSpans;if(r)for(var n,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&Gr(e,t,n))return!0}}function Gr(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return Gr(e,n.line,kr(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&Gr(e,t,i))return!0}function Ur(e,t,r){Sn(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&or(e,null,r)}function Kr(e){return null!=e.height?e.height:(di(document.body,e.node)||ci(e.cm.display.measure,si("div",[e.node],null,"position: relative")),e.height=e.node.offsetHeight)}function $r(e,t,r,n){var i=new Do(e,r,n);return i.noHScroll&&(e.display.alignWidgets=!0),ur(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,!qr(e.doc,t)){var n=Sn(t)<e.doc.scrollTop;kn(t,t.height+Kr(i)),n&&or(e,null,i.height),e.curOp.forceUpdate=!0}return!0}),i}function Yr(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Or(e),zr(e,r);var i=n?n(e):1;i!=e.height&&kn(e,i)}function Xr(e){e.parent=null,Or(e)}function Zr(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function Qr(t,r){if(t.blankLine)return t.blankLine(r);if(t.innerMode){var n=e.innerMode(t,r);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Jr(e,t,r){var n=e.token(t,r);if(t.pos<=t.start)throw new Error("Mode "+e.name+" failed to advance stream.");return n}function en(t,r,n,i,o,a,l){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var u=0,c=null,d=new zo(r,t.options.tabSize),f;for(""==r&&Zr(Qr(n,i),a);!d.eol();){if(d.pos>t.options.maxHighlightLength?(s=!1,l&&nn(t,r,i,d.pos),d.pos=r.length,f=null):f=Zr(Jr(n,d,i),a),t.options.addModeClass){var h=e.innerMode(n,i).mode.name;h&&(f="m-"+(f?h+" "+f:h))}s&&c==f||(u<d.start&&o(d.start,c),u=d.start,c=f),d.start=d.pos}for(;u<d.pos;){var p=Math.min(d.pos,u+5e4);o(p,c),u=p}}function tn(e,t,r,n){var i=[e.state.modeGen],o={};en(e,t.text,e.doc.mode,r,function(e,t){i.push(e,t)},o,n);for(var a=0;a<e.state.overlays.length;++a){var l=e.state.overlays[a],s=1,u=0;en(e,t.text,l.mode,!0,function(e,t){for(var r=s;e>u;){var n=i[s];n>e&&i.splice(s,1,e,i[s+1],n),s+=2,u=Math.min(e,n)}if(t)if(l.opaque)i.splice(r,s-r,e,"cm-overlay "+t),s=r+2;else for(;s>r;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"cm-overlay "+t}},o)}return{styles:i,classes:o.bgClass||o.textClass?o:null}}function rn(e,t){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=tn(e,t,t.stateAfter=ke(e,Cn(t)));t.styles=r.styles,r.classes?t.styleClasses=r.classes:t.styleClasses&&(t.styleClasses=null)}return t.styles}function nn(e,t,r,n){var i=e.doc.mode,o=new zo(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&Qr(i,r);!o.eol()&&o.pos<=e.options.maxHighlightLength;)Jr(i,o,r),o.start=o.pos}function on(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Fo:_o;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function an(e,t){var r=si("span",null,null,Fi?"padding-right: .1px":null),n={pre:si("pre",[r]),content:r,col:0,pos:0,cm:e};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a;n.pos=0,n.addToken=sn,(_i||Fi)&&e.getOption("lineWrapping")&&(n.addToken=un(n.addToken)),bi(e.display.measure)&&(a=Mn(o))&&(n.addToken=cn(n.addToken,a)),n.map=[],fn(o,n,rn(e,o)),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=gi(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=gi(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(yi(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}return Yo(e,"renderLine",e,t.line,n.pre),n}function ln(e){var t=si("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t}function sn(e,t,r,n,i,o){if(t){var a=e.cm.options.specialChars,l=!1;if(a.test(t))for(var s=document.createDocumentFragment(),u=0;;){a.lastIndex=u;var c=a.exec(t),d=c?c.index-u:t.length-u;if(d){var f=document.createTextNode(t.slice(u,u+d));Ii?s.appendChild(si("span",[f])):s.appendChild(f),e.map.push(e.pos,e.pos+d,f),e.col+=d,e.pos+=d}if(!c)break;if(u+=d+1," "==c[0]){var h=e.cm.options.tabSize,p=h-e.col%h,f=s.appendChild(si("span",Jn(p),"cm-tab"));e.col+=p}else{var f=e.cm.options.specialCharPlaceholder(c[0]);Ii?s.appendChild(si("span",[f])):s.appendChild(f),e.col+=1}e.map.push(e.pos,e.pos+1,f),e.pos++}else{e.col+=t.length;var s=document.createTextNode(t);e.map.push(e.pos,e.pos+t.length,s),Ii&&(l=!0),e.pos+=t.length}if(r||n||i||l){var m=r||"";n&&(m+=n),i&&(m+=i);var g=si("span",[s],m);return o&&(g.title=o),e.content.appendChild(g)}e.content.appendChild(s)}}function un(e){function t(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}return function(r,n,i,o,a,l){e(r,n.replace(/ {3,}/g,t),i,o,a,l)}}function cn(e,t){return function(r,n,i,o,a,l){i=i?i+" cm-force-border":"cm-force-border";for(var s=r.pos,u=s+n.length;;){for(var c=0;c<t.length;c++){var d=t[c];if(d.to>s&&d.from<=s)break}if(d.to>=u)return e(r,n,i,o,a,l);e(r,n.slice(0,d.to-s),i,o,null,l),o=null,n=n.slice(d.to-s),s=d.to}}}function dn(e,t,r,n){var i=!n&&r.widgetNode;i&&(e.map.push(e.pos,e.pos+t,i),e.content.appendChild(i)),e.pos+=t}function fn(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a=i.length,l=0,s=1,u="",c,d=0,f,h,p,m,g;;){if(d==l){f=h=p=m="",g=null,d=1/0;for(var v=[],y=0;y<n.length;++y){var b=n[y],w=b.marker;b.from<=l&&(null==b.to||b.to>l)?(null!=b.to&&d>b.to&&(d=b.to,h=""),w.className&&(f+=" "+w.className),w.startStyle&&b.from==l&&(p+=" "+w.startStyle),w.endStyle&&b.to==d&&(h+=" "+w.endStyle),w.title&&!m&&(m=w.title),w.collapsed&&(!g||Ir(g.marker,w)<0)&&(g=b)):b.from>l&&d>b.from&&(d=b.from),"bookmark"==w.type&&b.from==l&&w.widgetNode&&v.push(w)}if(g&&(g.from||0)==l&&(dn(t,(null==g.to?a+1:g.to)-l,g.marker,null==g.from),null==g.to))return;if(!g&&v.length)for(var y=0;y<v.length;++y)dn(t,0,v[y])}if(l>=a)break;for(var x=Math.min(a,d);;){if(u){var k=l+u.length;if(!g){var C=k>x?u.slice(0,x-l):u;t.addToken(t,C,c?c+f:f,p,l+C.length==d?h:"",m)}if(k>=x){u=u.slice(x-l),l=x;break}l=k,p=""}u=i.slice(o,o=r[s++]),c=on(r[s++],t.cm.options)}}else for(var s=1;s<r.length;s+=2)t.addToken(t,i.slice(o,o=r[s]),on(r[s+1],t.cm.options))}function hn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==ei(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function pn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){Yr(e,r,i,n),Gn(e,"change",e,t)}var a=t.from,l=t.to,s=t.text,u=bn(e,a.line),c=bn(e,l.line),d=ei(s),f=i(s.length-1),h=l.line-a.line;if(hn(e,t)){for(var p=0,m=[];p<s.length-1;++p)m.push(new Po(s[p],i(p),n));o(c,c.text,f),h&&e.remove(a.line,h),m.length&&e.insert(a.line,m)}else if(u==c)if(1==s.length)o(u,u.text.slice(0,a.ch)+d+u.text.slice(l.ch),f);else{for(var m=[],p=1;p<s.length-1;++p)m.push(new Po(s[p],i(p),n));m.push(new Po(d+u.text.slice(l.ch),f,n)),o(u,u.text.slice(0,a.ch)+s[0],i(0)),e.insert(a.line+1,m)}else if(1==s.length)o(u,u.text.slice(0,a.ch)+s[0]+c.text.slice(l.ch),i(0)),e.remove(a.line+1,h);else{o(u,u.text.slice(0,a.ch)+s[0],i(0)),o(c,d+c.text.slice(l.ch),f);for(var p=1,m=[];p<s.length-1;++p)m.push(new Po(s[p],i(p),n));h>1&&e.remove(a.line+1,h-1),e.insert(a.line+1,m)}Gn(e,"change",e,t)}function mn(e){this.lines=e,this.parent=null;for(var t=0,r=0;t<e.length;++t)e[t].parent=this,r+=e[t].height;this.height=r}function gn(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}function vn(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;(!r||s)&&(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function yn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),r(e),e.options.lineWrapping||h(e),e.options.mode=t.modeOption,nt(e)}function bn(e,t){if(t-=e.first,0>t||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(o>t){r=i;break}t-=o}return r.lines[t]}function wn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function xn(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function kn(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function Cn(e){if(null==e.parent)return null;for(var t=e.parent,r=ti(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Ln(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(o>t){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var n=0;n<e.lines.length;++n){var a=e.lines[n],l=a.height;if(l>t)break;t-=l}return r+n}function Sn(e){e=Br(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var n=0;n<o.children.length;++n){var a=o.children[n];if(a==r)break;t+=a.height}return t}function Mn(e){var t=e.order;return null==t&&(t=e.order=ba(e.text)),t}function Tn(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function An(e,t){var r={from:V(t.from),to:go(t),text:wn(e,t.from,t.to)};return In(e,r,t.from.line,t.to.line+1),vn(e,function(e){In(e,r,t.from.line,t.to.line+1)},!0),r}function Nn(e){for(;e.length;){var t=ei(e);if(!t.ranges)break;e.pop()}}function Hn(e,t){return t?(Nn(e.done),ei(e.done)):e.done.length&&!ei(e.done).ranges?ei(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),ei(e.done)):void 0}function On(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>o-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(a=Hn(i,i.lastOp==n))){var l=ei(a.changes);0==no(t.from,t.to)&&0==no(t.from,l.to)?l.to=go(t):a.changes.push(An(e,t))}else{var s=ei(i.done);for(s&&s.ranges||Wn(e.sel,i.done),a={changes:[An(e,t)],generation:i.generation},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=o,i.lastOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||Yo(e,"historyAdded")}function zn(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function En(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||zn(e,o,ei(i.done),t))?i.done[i.done.length-1]=t:Wn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastOp=r,n&&n.clearRedo!==!1&&Nn(i.undone)}function Wn(e,t){var r=ei(t);r&&r.ranges&&r.equals(e)||t.push(e)}function In(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Dn(e){if(!e)return null;for(var t=0,r;t<e.length;++t)e[t].marker.explicitlyCleared?r||(r=e.slice(0,t)):r&&r.push(e[t]);return r?r.length?r:null:e}function Pn(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,i=[];n<t.text.length;++n)i.push(Dn(r[n]));return i}function _n(e,t,r){for(var n=0,i=[];n<e.length;++n){var o=e[n];if(o.ranges)i.push(r?U.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var u=a[s],c;if(l.push({from:u.from,to:u.to,text:u.text}),t)for(var d in u)(c=d.match(/^spans_(\d+)$/))&&ti(t,Number(c[1]))>-1&&(ei(l)[d]=u[d],delete u[d])}}}return i}function Fn(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Bn(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var l=0;l<o.ranges.length;l++)Fn(o.ranges[l].anchor,t,r,n),Fn(o.ranges[l].head,t,r,n)}else{for(var l=0;l<o.changes.length;++l){var s=o.changes[l];if(r<s.from.line)s.from=ro(s.from.line+n,s.from.ch),s.to=ro(s.to.line+n,s.to.ch);else if(t<=s.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function Rn(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Bn(e.done,r,n,i),Bn(e.undone,r,n,i)}function jn(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Vn(e){return e.target||e.srcElement}function qn(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Yi&&e.ctrlKey&&1==t&&(t=3),t}function Gn(e,t){function r(e){return function(){e.apply(null,i)}}var n=e._handlers&&e._handlers[t];if(n){var i=Array.prototype.slice.call(arguments,2);Xo||(++Zo,Xo=[],setTimeout(Un,0));for(var o=0;o<n.length;++o)Xo.push(r(n[o]))}}function Un(){--Zo;var e=Xo;Xo=null;for(var t=0;t<e.length;++t)e[t]()}function Kn(e,t,r){return Yo(e,r||t.type,e,t),jn(t)||t.codemirrorIgnore}function $n(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==ti(r,t[n])&&r.push(t[n])}function Yn(e,t){var r=e._handlers&&e._handlers[t];return r&&r.length>0}function Xn(e){e.prototype.on=function(e,t){Ko(this,e,t)},e.prototype.off=function(e,t){$o(this,e,t)}}function Zn(){this.id=null}function Qn(e,t,r){for(var n=0,i=0;;){var o=e.indexOf(" ",n);-1==o&&(o=e.length);var a=o-n;if(o==e.length||i+a>=t)return n+Math.min(a,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function Jn(e){for(;ia.length<=e;)ia.push(ei(ia)+" ");return ia[e]}function ei(e){return e[e.length-1]}function ti(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function ri(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function ni(e,t){var r;if(Object.create)r=Object.create(e);else{var n=function(){};n.prototype=e,r=new n}return t&&ii(t,r),r}function ii(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function oi(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function ai(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function li(e){return e.charCodeAt(0)>=768&&sa.test(e)}function si(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function ui(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function ci(e,t){return ui(e).appendChild(t)}function di(e,t){if(e.contains)return e.contains(t);for(;t=t.parentNode;)if(t==e)return!0}function fi(){return document.activeElement}function hi(e){return new RegExp("\\b"+e+"\\b\\s*")}function pi(e,t){var r=hi(t);r.test(e.className)&&(e.className=e.className.replace(r,""))}function mi(e,t){hi(t).test(e.className)||(e.className+=" "+t)}function gi(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!hi(r[n]).test(t)&&(t+=" "+r[n]);return t}function vi(e){if(null!=da)return da;var t=si("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return ci(e,t),t.offsetWidth&&(da=t.offsetHeight-t.clientHeight),da||0}function yi(e){if(null==fa){var t=si("span","");ci(e,si("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(fa=t.offsetWidth<=1&&t.offsetHeight>2&&!Wi)}return fa?si("span",""):si("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function bi(e){if(null!=ha)return ha;var t=ci(e,document.createTextNode("AخA")),r=ua(t,0,1).getBoundingClientRect();if(r.left==r.right)return!1;var n=ua(t,1,2).getBoundingClientRect();return ha=n.right-r.right<3}function wi(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function xi(e){return e.level%2?e.to:e.from}function ki(e){return e.level%2?e.from:e.to}function Ci(e){var t=Mn(e);return t?xi(t[0]):0}function Li(e){var t=Mn(e);return t?ki(ei(t)):e.text.length}function Si(e,t){var r=bn(e.doc,t),n=Br(r);n!=r&&(t=Cn(n));var i=Mn(n),o=i?i[0].level%2?Li(n):Ci(n):0;return ro(t,o)}function Mi(e,t){for(var r,n=bn(e.doc,t);r=_r(n);)n=r.find(1,!0).line,t=null;var i=Mn(n),o=i?i[0].level%2?Ci(n):Li(n):n.text.length;return ro(null==t?Cn(n):t,o)}function Ti(e,t,r){var n=e[0].level;return t==n?!0:r==n?!1:r>t}function Ai(e,t){ya=null;for(var r=0,n;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return Ti(e,i.level,e[n].level)?(i.from!=i.to&&(ya=n),r):(i.from!=i.to&&(ya=r),n);n=r}}return n}function Ni(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&li(e.text.charAt(t)));return t}function Hi(e,t,r,n){var i=Mn(e);if(!i)return Oi(e,t,r,n);for(var o=Ai(i,t),a=i[o],l=Ni(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return Ai(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?Ni(e,a.to,-1,n):Ni(e,a.from,1,n)}}function Oi(e,t,r,n){var i=t+r;if(n)for(;i>0&&li(e.text.charAt(i));)i+=r;return 0>i||i>e.text.length?null:i}var zi=/gecko\/\d/i.test(navigator.userAgent),Ei=/MSIE \d/.test(navigator.userAgent),Wi=Ei&&(null==document.documentMode||document.documentMode<8),Ii=Ei&&(null==document.documentMode||document.documentMode<9),Di=Ei&&(null==document.documentMode||document.documentMode<10),Pi=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent),_i=Ei||Pi,Fi=/WebKit\//.test(navigator.userAgent),Bi=Fi&&/Qt\/\d+\.\d+/.test(navigator.userAgent),Ri=/Chrome\//.test(navigator.userAgent),ji=/Opera\//.test(navigator.userAgent),Vi=/Apple Computer/.test(navigator.vendor),qi=/KHTML\//.test(navigator.userAgent),Gi=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),Ui=/PhantomJS/.test(navigator.userAgent),Ki=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),$i=Ki||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Yi=Ki||/Mac/.test(navigator.platform),Xi=/win/i.test(navigator.platform),Zi=ji&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Zi&&(Zi=Number(Zi[1])),Zi&&Zi>=15&&(ji=!1,Fi=!0);var Qi=Yi&&(Bi||ji&&(null==Zi||12.11>Zi)),Ji=zi||_i&&!Ii,eo=!1,to=!1,ro=e.Pos=function(e,t){return this instanceof ro?(this.line=e,void(this.ch=t)):new ro(e,t)},no=e.cmpPos=function(e,t){return e.line-t.line||e.ch-t.ch};U.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(0!=no(r.anchor,n.anchor)||0!=no(r.head,n.head))return!1}return!0},deepCopy:function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new K(V(this.ranges[t].anchor),V(this.ranges[t].head));return new U(e,this.primIndex)},somethingSelected:function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},contains:function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(no(t,n.from())>=0&&no(e,n.to())<=0)return r}return-1}},K.prototype={from:function(){return G(this.anchor,this.head)},to:function(){return q(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var io={left:0,right:0,top:0,bottom:0},oo,ao=0,lo,so,uo=0,co=0,fo=null;_i?fo=-.53:zi?fo=15:Ri?fo=-.7:Vi&&(fo=-1/3);var ho,po=null,mo,go=e.changeEnd=function(e){return e.text?ro(e.from.line+e.text.length-1,ei(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.prototype={constructor:e,focus:function(){window.focus(),pt(this),dt(this)},setOption:function(e,t){var r=this.options,n=r[e];(r[e]!=t||"mode"==e)&&(r[e]=t,yo.hasOwnProperty(e)&&Qe(this,yo[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||"string"!=typeof t[r]&&t[r].name==e)return t.splice(r,1),!0},addOverlay:Je(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,nt(this)}),removeOverlay:Je(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void nt(this)}}),indentLine:Je(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),ee(this.doc,e)&&sr(this,e,t,r)}),indentSelection:Je(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(sr(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&ar(this));else{var o=Math.max(r,i.from().line),a=i.to();r=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=o;r>l;++l)sr(this,l,e)}}}),getTokenAt:function(e,t){var r=this.doc;e=Q(r,e);for(var n=ke(this,e.line,t),i=this.doc.mode,o=bn(r,e.line),a=new zo(o.text,this.options.tabSize);a.pos<e.ch&&!a.eol();){a.start=a.pos;var l=Jr(i,a,n)}return{start:a.start,end:a.pos,string:a.current(),type:l||null,state:n}},getTokenTypeAt:function(e){e=Q(this.doc,e);var t=rn(this,bn(this.doc,e.line)),r=0,n=(t.length-1)/2,i=e.ch,o;if(0==i)o=t[2];else for(;;){var a=r+n>>1;if((a?t[2*a-1]:0)>=i)n=a;else{if(!(t[2*a+1]<i)){o=t[2*a+2];break}r=a+1}}var l=o?o.indexOf("cm-overlay "):-1;return 0>l?o:0==l?null:o.slice(0,l-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Lo.hasOwnProperty(t))return Lo;var n=Lo[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=n[i[t][o]];a&&r.push(a)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var o=0;o<n._global.length;o++){var l=n._global[o];l.pred(i,this)&&-1==ti(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=Z(r,null==e?r.first+r.size-1:e),ke(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?Q(this.doc,e):e?n.from():n.to(),je(this,r,t||"page")},charCoords:function(e,t){return Re(this,Q(this.doc,e),t||"page")},coordsChar:function(e,t){return e=Be(this,e,t||"page"),Ge(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Be(this,{top:e,left:0},t||"page").top,Ln(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r=!1,n=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>n&&(e=n,r=!0);var i=bn(this.doc,e);return Fe(this,i,{top:0,left:0},t||"page").top+(r?this.doc.height-Sn(i):0)},defaultTextHeight:function(){return Ke(this.display)},defaultCharWidth:function(){return $e(this.display)},setGutterMarker:Je(function(e,t,r){return ur(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&ai(n)&&(e.gutterMarkers=null),!0})}),clearGutter:Je(function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,it(t,n,"gutter"),ai(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),addLineClass:Je(function(e,t,r){return ur(this,e,"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"wrapClass";
|
4 |
-
if(e[n]){if(new RegExp("(?:^|\\s)"+r+"(?:$|\\s)").test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:Je(function(e,t,r){return ur(this,e,"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(new RegExp("(?:^|\\s+)"+r+"(?:$|\\s+)"));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:Je(function(e,t,r){return $r(this,e,t,r)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!ee(this.doc,e))return null;var t=e;if(e=bn(this.doc,e),!e)return null}else{var t=Cn(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=je(this,Q(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&nr(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:Je(It),triggerOnKeyPress:Je(_t),triggerOnKeyUp:Je(Pt),execCommand:function(e){return To.hasOwnProperty(e)?To[e](this):void 0},findPosH:function(e,t,r,n){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=Q(this.doc,e);t>o&&(a=dr(this.doc,a,i,r,n),!a.hitSide);++o);return a},moveH:Je(function(e,t){var r=this;r.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?dr(r.doc,n.head,e,t,r.options.rtlMoveVisually):0>e?n.from():n.to()},ra)}),deleteH:Je(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):cr(this,function(r){var i=dr(n,r.head,e,t,!1);return 0>e?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;0>t&&(i=-1,t=-t);for(var a=0,l=Q(this.doc,e);t>a;++a){var s=je(this,l,"div");if(null==o?o=s.left:s.left=o,l=fr(this,s,i,r),l.hitSide)break}return l},moveV:Je(function(e,t){var r=this,n=this.doc,i=[],o=!r.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(a){if(o)return 0>e?a.from():a.to();var l=je(r,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),i.push(l.left);var s=fr(r,l,e,t);return"page"==t&&a==n.sel.primary()&&or(r,null,Re(r,s,"div").top-l.top),s},ra),i.length)for(var a=0;a<n.sel.ranges.length;a++)n.sel.ranges[a].goalColumn=i[a]}),toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?mi(this.display.cursorDiv,"CodeMirror-overwrite"):pi(this.display.cursorDiv,"CodeMirror-overwrite"),Yo(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return fi()==this.display.input},scrollTo:Je(function(e,t){(null!=e||null!=t)&&lr(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller,t=Qo;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-t,width:e.scrollWidth-t,clientHeight:e.clientHeight-t,clientWidth:e.clientWidth-t}},scrollIntoView:Je(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ro(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)lr(this),this.curOp.scrollToPos=e;else{var r=ir(this,Math.min(e.from.left,e.to.left),Math.min(e.from.top,e.to.top)-e.margin,Math.max(e.from.right,e.to.right),Math.max(e.from.bottom,e.to.bottom)+e.margin);this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:Je(function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Ie(this),this.curOp.forceUpdate=!0,Yo(this,"refresh",this)}),operation:function(e){return Ze(this,e)},refresh:Je(function(){var e=this.display.cachedTextHeight;nt(this),this.curOp.forceUpdate=!0,De(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),d(this),(null==e||Math.abs(e-Ke(this.display))>.5)&&a(this),Yo(this,"refresh",this)}),swapDoc:Je(function(e){var t=this.doc;return t.cm=null,yn(this,e),De(this),ht(this),this.scrollTo(e.scrollLeft,e.scrollTop),Gn(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Xn(e);var vo=e.defaults={},yo=e.optionHandlers={},bo=e.Init={toString:function(){return"CodeMirror.Init"}};pr("value","",function(e,t){e.setValue(t)},!0),pr("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),pr("indentUnit",2,r,!0),pr("indentWithTabs",!1),pr("smartIndent",!0),pr("tabSize",4,function(e){n(e),De(e),nt(e)},!0),pr("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g"),e.refresh()},!0),pr("specialCharPlaceholder",ln,function(e){e.refresh()},!0),pr("electricChars",!0),pr("rtlMoveVisually",!Xi),pr("wholeLineUpdateBefore",!0),pr("theme","default",function(e){s(e),u(e)},!0),pr("keyMap","default",l),pr("extraKeys",null),pr("lineWrapping",!1,i,!0),pr("gutters",[],function(e){p(e.options),u(e)},!0),pr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?x(e.display)+"px":"0",e.refresh()},!0),pr("coverGutterNextToScrollbar",!1,g,!0),pr("lineNumbers",!1,function(e){p(e.options),u(e)},!0),pr("firstLineNumber",1,u,!0),pr("lineNumberFormatter",function(e){return e},u,!0),pr("showCursorWhenSelecting",!1,me,!0),pr("resetSelectionOnContextMenu",!0),pr("readOnly",!1,function(e,t){"nocursor"==t?(Bt(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||ht(e))}),pr("disableInput",!1,function(e,t){t||ht(e)},!0),pr("dragDrop",!0),pr("cursorBlinkRate",530),pr("cursorScrollMargin",0),pr("cursorHeight",1),pr("workTime",100),pr("workDelay",100),pr("flattenSpans",!0,n,!0),pr("addModeClass",!1,n,!0),pr("pollInterval",100),pr("undoDepth",200,function(e,t){e.doc.history.undoDepth=t}),pr("historyEventDelay",1250),pr("viewportMargin",10,function(e){e.refresh()},!0),pr("maxHighlightLength",1e4,n,!0),pr("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),pr("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),pr("autofocus",null);var wo=e.modes={},xo=e.mimeModes={};e.defineMode=function(t,r){if(e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2){r.dependencies=[];for(var n=2;n<arguments.length;++n)r.dependencies.push(arguments[n])}wo[t]=r},e.defineMIME=function(e,t){xo[e]=t},e.resolveMode=function(t){if("string"==typeof t&&xo.hasOwnProperty(t))t=xo[t];else if(t&&"string"==typeof t.name&&xo.hasOwnProperty(t.name)){var r=xo[t.name];"string"==typeof r&&(r={name:r}),t=ni(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=wo[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(ko.hasOwnProperty(r.name)){var o=ko[r.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var a in r.modeProps)i[a]=r.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ko=e.modeExtensions={};e.extendMode=function(e,t){var r=ko.hasOwnProperty(e)?ko[e]:ko[e]={};ii(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Ro.prototype[e]=t},e.defineOption=pr;var Co=[];e.defineInitHook=function(e){Co.push(e)};var Lo=e.helpers={};e.registerHelper=function(t,r,n){Lo.hasOwnProperty(t)||(Lo[t]=e[t]={_global:[]}),Lo[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),Lo[t]._global.push({pred:n,val:i})};var So=e.copyState=function(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r},Mo=e.startState=function(e,t,r){return e.startState?e.startState(t,r):!0};e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var To=e.commands={selectAll:function(e){e.setSelection(ro(e.firstLine(),0),ro(e.lastLine()),ea)},singleSelection:function(e){e.setSelection(e.getCursor("anchor"),e.getCursor("head"),ea)},killLine:function(e){cr(e,function(t){if(t.empty()){var r=bn(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ro(t.head.line+1,0)}:{from:t.head,to:ro(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){cr(e,function(t){return{from:ro(t.from().line,0),to:Q(e.doc,ro(t.to().line+1,0))}})},delLineLeft:function(e){cr(e,function(e){return{from:ro(e.from().line,0),to:e.from()}})},undo:function(e){e.undo()},redo:function(e){e.redo()},undoSelection:function(e){e.undoSelection()},redoSelection:function(e){e.redoSelection()},goDocStart:function(e){e.extendSelection(ro(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(ro(e.lastLine()))},goLineStart:function(e){e.extendSelectionsBy(function(t){return Si(e,t.head.line)},ra)},goLineStartSmart:function(e){e.extendSelectionsBy(function(t){var r=Si(e,t.head.line),n=e.getLineHandle(r.line),i=Mn(n);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),a=t.head.line==r.line&&t.head.ch<=o&&t.head.ch;return ro(r.line,a?0:o)}return r},ra)},goLineEnd:function(e){e.extendSelectionsBy(function(t){return Mi(e,t.head.line)},ra)},goLineRight:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},ra)},goLineLeft:function(e){e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},ra)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),a=na(e.getLine(o.line),o.ch,n);t.push(new Array(n-a%n+1).join(" "))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){Ze(e,function(){for(var t=e.listSelections(),r=0;r<t.length;r++){var n=t[r].head,i=bn(e.doc,n.line).text;n.ch>0&&n.ch<i.length-1&&e.replaceRange(i.charAt(n.ch)+i.charAt(n.ch-1),ro(n.line,n.ch-1),ro(n.line,n.ch+1))}})},newlineAndIndent:function(e){Ze(e,function(){for(var t=e.listSelections().length,r=0;t>r;r++){var n=e.listSelections()[r];e.replaceRange("\n",n.anchor,n.head,"+input"),e.indentLine(n.from().line+1,null,!0),ar(e)}})},toggleOverwrite:function(e){e.toggleOverwrite()}},Ao=e.keyMap={};Ao.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ao.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ao.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":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]},Ao.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},Ao["default"]=Yi?Ao.macDefault:Ao.pcDefault;var No=e.lookupKey=function(e,t,r){function n(t){t=mr(t);var i=t[e];if(i===!1)return"stop";if(null!=i&&r(i))return!0;if(t.nofallthrough)return"stop";var o=t.fallthrough;if(null==o)return!1;if("[object Array]"!=Object.prototype.toString.call(o))return n(o);for(var a=0;a<o.length;++a){var l=n(o[a]);if(l)return l}return!1}for(var i=0;i<t.length;++i){var o=n(t[i]);if(o)return"stop"!=o}},Ho=e.isModifierKey=function(e){var t=va[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t},Oo=e.keyName=function(e,t){if(ji&&34==e.keyCode&&e["char"])return!1;var r=va[e.keyCode];return null==r||e.altGraphKey?!1:(e.altKey&&(r="Alt-"+r),(Qi?e.metaKey:e.ctrlKey)&&(r="Ctrl-"+r),(Qi?e.ctrlKey:e.metaKey)&&(r="Cmd-"+r),!t&&e.shiftKey&&(r="Shift-"+r),r)};e.fromTextArea=function(t,r){function n(){t.value=u.getValue()}if(r||(r={}),r.value=t.value,!r.tabindex&&t.tabindex&&(r.tabindex=t.tabindex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var i=fi();r.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Ko(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var o=t.form,a=o.submit;try{var l=o.submit=function(){n(),o.submit=a,o.submit(),o.submit=l}}catch(s){}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return u.save=n,u.getTextArea=function(){return t},u.toTextArea=function(){n(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&($o(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=a))},u};var zo=e.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};zo.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));return r?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=na(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?na(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return na(this.string,null,this.tabSize)-(this.lineStart?na(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}};var Eo=e.TextMarker=function(e,t){this.lines=[],this.type=t,this.doc=e};Xn(Eo),Eo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ye(e),Yn(this,"clear")){var r=this.find();r&&Gn(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=kr(a.markedSpans,this);e&&!this.collapsed?it(e,Cn(a),"text"):e&&(null!=l.to&&(i=Cn(a)),null!=l.from&&(n=Cn(a))),a.markedSpans=Cr(a.markedSpans,l),null==l.from&&this.collapsed&&!qr(this.doc,a)&&e&&kn(a,Ke(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var s=Br(this.lines[o]),u=f(s);u>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&nt(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&fe(e.doc)),e&&Gn(e,"markerCleared",e,this),t&&Xe(e),this.parent&&this.parent.clear()}},Eo.prototype.find=function(e,t){null==e&&"bookmark"==this.type&&(e=1);for(var r,n,i=0;i<this.lines.length;++i){var o=this.lines[i],a=kr(o.markedSpans,this);if(null!=a.from&&(r=ro(t?o:Cn(o),a.from),-1==e))return r;if(null!=a.to&&(n=ro(t?o:Cn(o),a.to),1==e))return n}return r&&{from:r,to:n}},Eo.prototype.changed=function(){var e=this.find(-1,!0),t=this,r=this.doc.cm;e&&r&&Ze(r,function(){var n=e.line,i=Cn(e.line),o=He(r,i);if(o&&(We(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!qr(t.doc,n)&&null!=t.height){var a=t.height;t.height=null;var l=Kr(t)-a;l&&kn(n,n.height+l)}})},Eo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=ti(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Eo.prototype.detachLine=function(e){if(this.lines.splice(ti(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var Wo=0,Io=e.SharedTextMarker=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};Xn(Io),Io.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Gn(this,"clear")}},Io.prototype.find=function(e,t){return this.primary.find(e,t)};var Do=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.cm=e,this.node=t};Xn(Do),Do.prototype.clear=function(){var e=this.cm,t=this.line.widgets,r=this.line,n=Cn(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=Kr(this);Ze(e,function(){Ur(e,r,-o),it(e,n,"widget"),kn(r,Math.max(0,r.height-o))})}},Do.prototype.changed=function(){var e=this.height,t=this.cm,r=this.line;this.height=null;var n=Kr(this)-e;n&&Ze(t,function(){t.curOp.forceUpdate=!0,Ur(t,r,n),kn(r,r.height+n)})};var Po=e.Line=function(e,t,r){this.text=e,zr(this,t),this.height=r?r(this):1};Xn(Po),Po.prototype.lineNo=function(){return Cn(this)};var _o={},Fo={};mn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;n>r;++r){var i=this.lines[r];this.height-=i.height,Xr(i),Gn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;n>e;++e)if(r(this.lines[e]))return!0}},gn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(i>e){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof mn))){var l=[];this.collapse(l),this.children=[new mn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>=e){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(;i.lines.length>50;){var a=i.lines.splice(i.lines.length-25,25),l=new mn(a);i.height-=l.height,this.children.splice(n+1,0,l),l.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new gn(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=ti(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new gn(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(o>e){var a=Math.min(t,o-e);if(i.iterN(e,a,r))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var Bo=0,Ro=e.Doc=function(e,t,r){if(!(this instanceof Ro))return new Ro(e,t,r);null==r&&(r=0),gn.call(this,[new mn([new Po("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var n=ro(r,0);this.sel=X(n),this.history=new Tn(null),this.id=++Bo,this.modeOption=t,"string"==typeof e&&(e=pa(e)),pn(this,{from:n,to:n,text:e}),ue(this,X(n),ea)};Ro.prototype=ni(gn.prototype,{constructor:Ro,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=xn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:et(function(e){var t=ro(this.first,0),r=this.first+this.size-1;$t(this,{from:t,to:ro(r,bn(this,r).text.length),text:pa(e),origin:"setValue"},!0),ue(this,X(t))}),replaceRange:function(e,t,r,n){t=Q(this,t),r=r?Q(this,r):t,er(this,e,t,r,n)},getRange:function(e,t,r){var n=wn(this,Q(this,e),Q(this,t));return r===!1?n:n.join(r||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){return ee(this,e)?bn(this,e):void 0},getLineNumber:function(e){return Cn(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=bn(this,e)),Br(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Q(this,e)},getCursor:function(e){var t=this.sel.primary(),r;return r=null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:et(function(e,t,r){ae(this,Q(this,"number"==typeof e?ro(e,t||0):e),null,r)}),setSelection:et(function(e,t,r){ae(this,Q(this,e),Q(this,t||e),r)}),extendSelection:et(function(e,t,r){ne(this,Q(this,e),t&&Q(this,t),r)}),extendSelections:et(function(e,t){ie(this,te(this,e,t))}),extendSelectionsBy:et(function(e,t){ie(this,ri(this.sel.ranges,e),t)}),setSelections:et(function(e,t,r){if(e.length){for(var n=0,i=[];n<e.length;n++)i[n]=new K(Q(this,e[n].anchor),Q(this,e[n].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ue(this,Y(i,t),r)}}),addSelection:et(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new K(Q(this,e),Q(this,t||e))),ue(this,Y(n,n.length-1),r)}),getSelection:function(e){for(var t=this.sel.ranges,r,n=0;n<t.length;n++){var i=wn(this,t[n].from(),t[n].to());r=r?r.concat(i):i}return e===!1?r:r.join(e||"\n")},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=wn(this,r[n].from(),r[n].to());e!==!1&&(i=i.join(e||"\n")),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:et(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];n[o]={from:a.from(),to:a.to(),text:pa(e[o]),origin:r}}for(var l=t&&"end"!=t&&Ut(this,n,t),o=n.length-1;o>=0;o--)$t(this,n[o]);l?se(this,l):this.cm&&ar(this.cm)}),undo:et(function(){Xt(this,"undo")}),redo:et(function(){Xt(this,"redo")}),undoSelection:et(function(){Xt(this,"undo",!0)}),redoSelection:et(function(){Xt(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Tn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:_n(this.history.done),undone:_n(this.history.undone)}},setHistory:function(e){var t=this.history=new Tn(this.history.maxGeneration);t.done=_n(e.done.slice(0),null,!0),t.undone=_n(e.undone.slice(0),null,!0)},markText:function(e,t,r){return gr(this,Q(this,e),Q(this,t),r,"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared};return e=Q(this,e),gr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=Q(this,e);var t=[],r=bn(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Q(this,e),t=Q(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];i==e.line&&e.ch>s.to||null==s.from&&i!=e.line||i==t.line&&s.from>t.ch||r&&!r(s.marker)||n.push(s.marker.parent||s.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first;return this.iter(function(n){var i=n.text.length+1;return i>e?(t=e,!0):(e-=i,void++r)}),Q(this,ro(r,t))},indexFromPos:function(e){e=Q(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Ro(xn(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Ro(xn(this,t,r),e.mode||this.modeOption,t);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],br(n,yr(this)),n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this),wr(yr(this));break}}if(t.history==this.history){var i=[t.id];vn(t,function(e){i.push(e.id)},!0),t.history=new Tn(null),t.history.done=_n(this.history.done,i),t.history.undone=_n(this.history.undone,i)}},iterLinkedDocs:function(e){vn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Ro.prototype.eachLine=Ro.prototype.iter;var jo="iter insert remove copy getEditor".split(" ");for(var Vo in Ro.prototype)Ro.prototype.hasOwnProperty(Vo)&&ti(jo,Vo)<0&&(e.prototype[Vo]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ro.prototype[Vo]));Xn(Ro);var qo=e.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},Go=e.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},Uo=e.e_stop=function(e){qo(e),Go(e)},Ko=e.on=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}},$o=e.off=function(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers&&e._handlers[t];if(!n)return;for(var i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}}},Yo=e.signal=function(e,t){var r=e._handlers&&e._handlers[t];if(r)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)},Xo,Zo=0,Qo=30,Jo=e.Pass={toString:function(){return"CodeMirror.Pass"}},ea={scroll:!1},ta={origin:"*mouse"},ra={origin:"+move"};Zn.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var na=e.countColumn=function(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=n||0,a=i||0;;){var l=e.indexOf(" ",o);if(0>l||l>=t)return a+(t-o);a+=l-o,a+=r-a%r,o=l+1}},ia=[""],oa=function(e){e.select()};Ki?oa=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:_i&&(oa=function(e){try{e.select()}catch(t){}}),[].indexOf&&(ti=function(e,t){return e.indexOf(t)}),[].map&&(ri=function(e,t){return e.map(t)});var aa=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,la=e.isWordChar=function(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||aa.test(e))},sa=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,ua;
|
5 |
-
ua=document.createRange?function(e,t,r){var n=document.createRange();return n.setEnd(e,r),n.setStart(e,t),n}:function(e,t,r){var n=document.body.createTextRange();return n.moveToElementText(e.parentNode),n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n},Ei&&(fi=function(){try{return document.activeElement}catch(e){return document.body}});var ca=function(){if(Ii)return!1;var e=si("div");return"draggable"in e||"dragDrop"in e}(),da,fa,ha,pa=e.splitLines=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;n>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},ma=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},ga=function(){var e=si("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),va={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=va,function(){for(var e=0;10>e;e++)va[e+48]=va[e+96]=String(e);for(var e=65;90>=e;e++)va[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)va[e+111]=va[e+63235]="F"+e}();var ya,ba=function(){function e(e){return 247>=e?r.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1773>=e?n.charAt(e-1536):e>=1774&&2220>=e?"r":e>=8192&&8203>=e?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,l=/[Lb1n]/,s=/[1n]/,u="L";return function(r){if(!i.test(r))return!1;for(var n=r.length,c=[],d=0,f;n>d;++d)c.push(f=e(r.charCodeAt(d)));for(var d=0,h=u;n>d;++d){var f=c[d];"m"==f?c[d]=h:h=f}for(var d=0,p=u;n>d;++d){var f=c[d];"1"==f&&"r"==p?c[d]="n":a.test(f)&&(p=f,"r"==f&&(c[d]="R"))}for(var d=1,h=c[0];n-1>d;++d){var f=c[d];"+"==f&&"1"==h&&"1"==c[d+1]?c[d]="1":","!=f||h!=c[d+1]||"1"!=h&&"n"!=h||(c[d]=h),h=f}for(var d=0;n>d;++d){var f=c[d];if(","==f)c[d]="N";else if("%"==f){for(var m=d+1;n>m&&"%"==c[m];++m);for(var g=d&&"!"==c[d-1]||n>m&&"1"==c[m]?"1":"N",v=d;m>v;++v)c[v]=g;d=m-1}}for(var d=0,p=u;n>d;++d){var f=c[d];"L"==p&&"1"==f?c[d]="L":a.test(f)&&(p=f)}for(var d=0;n>d;++d)if(o.test(c[d])){for(var m=d+1;n>m&&o.test(c[m]);++m);for(var y="L"==(d?c[d-1]:u),b="L"==(n>m?c[m]:u),g=y||b?"L":"R",v=d;m>v;++v)c[v]=g;d=m-1}for(var w=[],x,d=0;n>d;)if(l.test(c[d])){var k=d;for(++d;n>d&&l.test(c[d]);++d);w.push(new t(0,k,d))}else{var C=d,L=w.length;for(++d;n>d&&"L"!=c[d];++d);for(var v=C;d>v;)if(s.test(c[v])){v>C&&w.splice(L,0,new t(1,C,v));var S=v;for(++v;d>v&&s.test(c[v]);++v);w.splice(L,0,new t(2,S,v)),C=v}else++v;d>C&&w.splice(L,0,new t(1,C,d))}return 1==w[0].level&&(x=r.match(/^\s+/))&&(w[0].from=x[0].length,w.unshift(new t(0,0,x[0].length))),1==ei(w).level&&(x=r.match(/\s+$/))&&(ei(w).to-=x[0].length,w.push(new t(0,n-x[0].length,n))),w[0].level!=ei(w).level&&w.push(new t(w[0].level,n,n)),w}}();return e.version="4.1.0",e}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}function r(e,t){for(var r=!1,n;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}function n(e,t){return e.skipTo("-->")?(e.match("-->"),t.tokenize=null):e.skipToEnd(),["comment","comment"]}e.defineMode("css",function(t,r){function n(e,t){return C=t,e}function i(e,t){var r=e.next();if(p[r]){var i=p[r](e,t);if(i!==!1)return i}return"@"==r?(e.eatWhile(/[\w\\\-]/),n("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?n(null,"compare"):'"'==r||"'"==r?(t.tokenize=o(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),n("atom","hash")):"!"==r?(e.match(/^\s*\w*/),n("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),n("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?n(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?n("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?n(null,r):"u"==r&&e.match("rl(")?(e.backUp(1),t.tokenize=a,n("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),n("property","word")):n(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),n("number","unit")):e.match(/^[^-]+-/)?n("meta","meta"):void 0}function o(e){return function(t,r){for(var i=!1,o;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(r.tokenize=null),n("string","string")}}function a(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=o(")"),n(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r){return e.context=new l(r,t.indentation()+h,e.context),r}function u(e){return e.context=e.context.prev,e.context.type}function c(e,t,r){return S[r.context.type](e,t,r)}function d(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return c(e,t,r)}function f(e){var t=e.current().toLowerCase();L=w.hasOwnProperty(t)?"atom":b.hasOwnProperty(t)?"keyword":"variable"}r.propertyKeywords||(r=e.resolveMode("text/css"));var h=t.indentUnit,p=r.tokenHooks,m=r.mediaTypes||{},g=r.mediaFeatures||{},v=r.propertyKeywords||{},y=r.nonStandardPropertyKeywords||{},b=r.colorKeywords||{},w=r.valueKeywords||{},x=r.fontProperties||{},k=r.allowNested,C,L,S={};return S.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return u(r);if("@media"==e)return s(r,t,"media");if("@font-face"==e)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)L="builtin";else if("word"==e)L="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(k&&"("==e)return s(r,t,"params")}return r.context.type},S.block=function(e,t,r){if("word"==e){var n=t.current().toLowerCase();return v.hasOwnProperty(n)?(L="property","maybeprop"):y.hasOwnProperty(n)?(L="string-2","maybeprop"):k?(L=t.match(/^\s*:/,!1)?"property":"tag","block"):(L+=" error","maybeprop")}return"meta"==e?"block":k||"hash"!=e&&"qualifier"!=e?S.top(e,t,r):(L="error","block")},S.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):c(e,t,r)},S.prop=function(e,t,r){if(";"==e)return u(r);if("{"==e&&k)return s(r,t,"propBlock");if("}"==e||"{"==e)return d(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return s(r,t,"interpolation")}else L+=" error";return"prop"},S.propBlock=function(e,t,r){return"}"==e?u(r):"word"==e?(L="property","maybeprop"):r.context.type},S.parens=function(e,t,r){return"{"==e||"}"==e?d(e,t,r):")"==e?u(r):"parens"},S.pseudo=function(e,t,r){return"word"==e?(L="variable-3",r.context.type):c(e,t,r)},S.media=function(e,t,r){if("("==e)return s(r,t,"media_parens");if("}"==e)return d(e,t,r);if("{"==e)return u(r)&&s(r,t,k?"block":"top");if("word"==e){var n=t.current().toLowerCase();L="only"==n||"not"==n||"and"==n?"keyword":m.hasOwnProperty(n)?"attribute":g.hasOwnProperty(n)?"property":"error"}return r.context.type},S.media_parens=function(e,t,r){return")"==e?u(r):"{"==e||"}"==e?d(e,t,r,2):S.media(e,t,r)},S.font_face_before=function(e,t,r){return"{"==e?s(r,t,"font_face"):c(e,t,r)},S.font_face=function(e,t,r){return"}"==e?u(r):"word"==e?(L=x.hasOwnProperty(t.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},S.keyframes=function(e,t,r){return"word"==e?(L="variable","keyframes"):"{"==e?s(r,t,"top"):c(e,t,r)},S.at=function(e,t,r){return";"==e?u(r):"{"==e||"}"==e?d(e,t,r):("word"==e?L="tag":"hash"==e&&(L="builtin"),"at")},S.interpolation=function(e,t,r){return"}"==e?u(r):"{"==e||";"==e?d(e,t,r):("variable"!=e&&(L="error"),"interpolation")},S.params=function(e,t,r){return")"==e?u(r):"{"==e||"}"==e?d(e,t,r):("word"==e&&f(t),"params")},{startState:function(e){return{tokenize:null,state:"top",context:new l("top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||i)(e,t);return r&&"object"==typeof r&&(C=r[1],r=r[0]),L=r,t.state=S[t.state](C,e,t),L},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return"prop"==r.type&&"}"==n&&(r=r.prev),!r.prev||("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"font_face"!=r.type)&&(")"!=n||"parens"!=r.type&&"params"!=r.type&&"media_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"media"!=r.type)||(i=r.indent-h,r=r.prev),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["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"],l=t(a),s=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","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","flow-from","flow-into","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","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","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","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","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-overflow","text-shadow","text-size-adjust","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","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=t(s),c=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],c=t(c),d=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],f=t(d),h=["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","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","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","column","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","ellipse","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","keep-all","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","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","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","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","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],p=t(h),m=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],g=t(m),v=i.concat(a).concat(s).concat(c).concat(d).concat(h);e.registerHelper("hintWords","css",v),e.defineMIME("text/css",{mediaTypes:o,mediaFeatures:l,propertyKeywords:u,nonStandardPropertyKeywords:c,colorKeywords:f,valueKeywords:p,fontProperties:g,tokenHooks:{"<":function(e,t){return e.match("!--")?(t.tokenize=n,n(e,t)):!1},"/":function(e,t){return e.eat("*")?(t.tokenize=r,r(e,t)):!1}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:l,propertyKeywords:u,nonStandardPropertyKeywords:c,colorKeywords:f,valueKeywords:p,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return e.match(/\s*{/)?[null,"{"]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:l,propertyKeywords:u,nonStandardPropertyKeywords:c,colorKeywords:f,valueKeywords:p,fontProperties:g,allowNested:!0,tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("htmlmixed",function(t,r){function n(e,t){var r=t.htmlState.tagName,n=l.token(e,t.htmlState);if("script"==r&&/\btag\b/.test(n)&&">"==e.current()){var i=e.string.slice(Math.max(0,e.pos-100),e.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);i=i?i[1]:"",i&&/[\"\']/.test(i.charAt(0))&&(i=i.slice(1,i.length-1));for(var c=0;c<u.length;++c){var d=u[c];if("string"==typeof d.matches?i==d.matches:d.matches.test(i)){d.mode&&(t.token=o,t.localMode=d.mode,t.localState=d.mode.startState&&d.mode.startState(l.indent(t.htmlState,"")));break}}}else"style"==r&&/\btag\b/.test(n)&&">"==e.current()&&(t.token=a,t.localMode=s,t.localState=s.startState(l.indent(t.htmlState,"")));return n}function i(e,t,r){var n=e.current(),i=n.search(t),o;return i>-1?e.backUp(n.length-i):(o=n.match(/<\/?$/))&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function o(e,t){return e.match(/^<\/\s*script\s*>/i,!1)?(t.token=n,t.localState=t.localMode=null,n(e,t)):i(e,/<\/\s*script\s*>/,t.localMode.token(e,t.localState))}function a(e,t){return e.match(/^<\/\s*style\s*>/i,!1)?(t.token=n,t.localState=t.localMode=null,n(e,t)):i(e,/<\/\s*style\s*>/,s.token(e,t.localState))}var l=e.getMode(t,{name:"xml",htmlMode:!0,multilineTagIndentFactor:r.multilineTagIndentFactor,multilineTagIndentPastTag:r.multilineTagIndentPastTag}),s=e.getMode(t,"css"),u=[],c=r&&r.scriptTypes;if(u.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:e.getMode(t,"javascript")}),c)for(var d=0;d<c.length;++d){var f=c[d];u.push({matches:f.matches,mode:f.mode&&e.getMode(t,f.mode)})}return u.push({matches:/./,mode:e.getMode(t,"text/plain")}),{startState:function(){var e=l.startState();return{token:n,localMode:null,localState:null,htmlState:e}},copyState:function(t){if(t.localState)var r=e.copyState(t.localMode,t.localState);return{token:t.token,localMode:t.localMode,localState:r,htmlState:e.copyState(l,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,r){return!t.localMode||/^\s*<\//.test(r)?l.indent(t.htmlState,r):t.localMode.indent?t.localMode.indent(t.localState,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||l}}}},"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){function n(e){for(var t=!1,r,n=!1;null!=(r=e.next());){if(!t){if("/"==r&&!n)return;"["==r?n=!0:n&&"]"==r&&(n=!1)}t=!t&&"\\"==r}}function i(e,t,r){return ke=e,Ce=r,t}function o(e,t){var r=e.next();if('"'==r||"'"==r)return t.tokenize=a(r),t.tokenize(e,t);if("."==r&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==r&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return i(r);if("="==r&&e.eat(">"))return i("=>","operator");if("0"==r&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if(/\d/.test(r))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==r)return e.eat("*")?(t.tokenize=l,l(e,t)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(n(e),e.eatWhile(/[gimy]/),i("regexp","string-2")):(e.eatWhile(we),i("operator","operator",e.current()));if("`"==r)return t.tokenize=s,s(e,t);if("#"==r)return e.skipToEnd(),i("error","error");if(we.test(r))return e.eatWhile(we),i("operator","operator",e.current());e.eatWhile(/[\w\$_]/);var o=e.current(),u=be.propertyIsEnumerable(o)&&be[o];return u&&"."!=t.lastType?i(u.type,u.style,o):i("variable","variable",o)}function a(e){return function(t,r){var n=!1,a;if(ge&&"@"==t.peek()&&t.match(xe))return r.tokenize=o,i("jsonld-keyword","meta");for(;null!=(a=t.next())&&(a!=e||n);)n=!n&&"\\"==a;return n||(r.tokenize=o),i("string","string")}}function l(e,t){for(var r=!1,n;n=e.next();){if("/"==n&&r){t.tokenize=o;break}r="*"==n}return i("comment","comment")}function s(e,t){for(var r=!1,n;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=o;break}r=!r&&"\\"==n}return i("quasi","string-2",e.current())}function u(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(0>r)){for(var n=0,i=!1,o=r-1;o>=0;--o){var a=e.string.charAt(o),l=Le.indexOf(a);if(l>=0&&3>l){if(!n){++o;break}if(0==--n)break}else if(l>=3&&6>l)++n;else if(/[$\w]/.test(a))i=!0;else if(i&&!n){++o;break}}i&&!n&&(t.fatArrowAt=o)}}function c(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function f(e,t,r,n,i){var o=e.cc;for(Me.state=e,Me.stream=i,Me.marked=null,Me.cc=o,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():ve?k:x;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return Me.marked?Me.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function h(){for(var e=arguments.length-1;e>=0;e--)Me.cc.push(arguments[e])}function p(){return h.apply(null,arguments),!0}function m(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=Me.state;if(n.context){if(Me.marked="def",t(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(t(n.globalVars))return;r.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function g(){Me.state.context={prev:Me.state.context,vars:Me.state.localVars},Me.state.localVars=Te}function v(){Me.state.localVars=Me.state.context.vars,Me.state.context=Me.state.context.prev}function y(e,t){var r=function(){var r=Me.state,n=r.indented;"stat"==r.lexical.type&&(n=r.lexical.indented),r.lexical=new c(n,Me.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function b(){var e=Me.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?p():";"==e?h():p(t)}return t}function x(e,t){return"var"==e?p(y("vardef",t.length),V,w(";"),b):"keyword a"==e?p(y("form"),k,x,b):"keyword b"==e?p(y("form"),x,b):"{"==e?p(y("}"),B,b):";"==e?p():"if"==e?("else"==Me.state.lexical.info&&Me.state.cc[Me.state.cc.length-1]==b&&Me.state.cc.pop()(),p(y("form"),k,x,b,Y)):"function"==e?p(te):"for"==e?p(y("form"),X,x,b):"variable"==e?p(y("stat"),E):"switch"==e?p(y("form"),k,y("}","switch"),w("{"),B,b,b):"case"==e?p(k,w(":")):"default"==e?p(w(":")):"catch"==e?p(y("form"),g,w("("),re,w(")"),x,b,v):"module"==e?p(y("form"),g,ae,v,b):"class"==e?p(y("form"),ne,oe,b):"export"==e?p(y("form"),le,b):"import"==e?p(y("form"),se,b):h(y("stat"),k,w(";"),b);
|
6 |
-
}function k(e){return L(e,!1)}function C(e){return L(e,!0)}function L(e,t){if(Me.state.fatArrowAt==Me.stream.start){var r=t?z:O;if("("==e)return p(g,y(")"),_(q,")"),b,w("=>"),r,v);if("variable"==e)return h(g,q,w("=>"),r,v)}var n=t?A:T;return Se.hasOwnProperty(e)?p(n):"function"==e?p(te,n):"keyword c"==e?p(t?M:S):"("==e?p(y(")"),S,he,w(")"),b,n):"operator"==e||"spread"==e?p(t?C:k):"["==e?p(y("]"),de,b,n):"{"==e?F(I,"}",null,n):"quasi"==e?h(N,n):p()}function S(e){return e.match(/[;\}\)\],]/)?h():h(k)}function M(e){return e.match(/[;\}\)\],]/)?h():h(C)}function T(e,t){return","==e?p(k):A(e,t,!1)}function A(e,t,r){var n=0==r?T:A,i=0==r?k:C;return"=>"==t?p(g,r?z:O,v):"operator"==e?/\+\+|--/.test(t)?p(n):"?"==t?p(k,w(":"),i):p(i):"quasi"==e?h(N,n):";"!=e?"("==e?F(C,")","call",n):"."==e?p(W,n):"["==e?p(y("]"),S,w("]"),b,n):void 0:void 0}function N(e,t){return"quasi"!=e?h():"${"!=t.slice(t.length-2)?p(N):p(k,H)}function H(e){return"}"==e?(Me.marked="string-2",Me.state.tokenize=s,p(N)):void 0}function O(e){return u(Me.stream,Me.state),h("{"==e?x:k)}function z(e){return u(Me.stream,Me.state),h("{"==e?x:C)}function E(e){return":"==e?p(b,x):h(T,w(";"),b)}function W(e){return"variable"==e?(Me.marked="property",p()):void 0}function I(e,t){if("variable"==e){if(Me.marked="property","get"==t||"set"==t)return p(D)}else if("number"==e||"string"==e)Me.marked=ge?"property":e+" property";else if("["==e)return p(k,w("]"),P);return Se.hasOwnProperty(e)?p(P):void 0}function D(e){return"variable"!=e?h(P):(Me.marked="property",p(te))}function P(e){return":"==e?p(C):"("==e?h(te):void 0}function _(e,t){function r(n){if(","==n){var i=Me.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),p(e,r)}return n==t?p():p(w(t))}return function(n){return n==t?p():h(e,r)}}function F(e,t,r){for(var n=3;n<arguments.length;n++)Me.cc.push(arguments[n]);return p(y(t,r),_(e,t),b)}function B(e){return"}"==e?p():h(x,B)}function R(e){return ye&&":"==e?p(j):void 0}function j(e){return"variable"==e?(Me.marked="variable-3",p()):void 0}function V(){return h(q,R,U,K)}function q(e,t){return"variable"==e?(m(t),p()):"["==e?F(q,"]"):"{"==e?F(G,"}"):void 0}function G(e,t){return"variable"!=e||Me.stream.match(/^\s*:/,!1)?("variable"==e&&(Me.marked="property"),p(w(":"),q,U)):(m(t),p(U))}function U(e,t){return"="==t?p(C):void 0}function K(e){return","==e?p(V):void 0}function Y(e,t){return"keyword b"==e&&"else"==t?p(y("form","else"),x,b):void 0}function X(e){return"("==e?p(y(")"),Z,w(")"),b):void 0}function Z(e){return"var"==e?p(V,w(";"),J):";"==e?p(J):"variable"==e?p(Q):h(k,w(";"),J)}function Q(e,t){return"in"==t||"of"==t?(Me.marked="keyword",p(k)):p(T,J)}function J(e,t){return";"==e?p(ee):"in"==t||"of"==t?(Me.marked="keyword",p(k)):h(k,w(";"),ee)}function ee(e){")"!=e&&p(k)}function te(e,t){return"*"==t?(Me.marked="keyword",p(te)):"variable"==e?(m(t),p(te)):"("==e?p(g,y(")"),_(re,")"),b,x,v):void 0}function re(e){return"spread"==e?p(re):h(q,R)}function ne(e,t){return"variable"==e?(m(t),p(ie)):void 0}function ie(e,t){return"extends"==t?p(k):void 0}function oe(e){return"{"==e?F(I,"}"):void 0}function ae(e,t){return"string"==e?p(x):"variable"==e?(m(t),p(ce)):void 0}function le(e,t){return"*"==t?(Me.marked="keyword",p(ce,w(";"))):"default"==t?(Me.marked="keyword",p(k,w(";"))):h(x)}function se(e){return"string"==e?p():h(ue,ce)}function ue(e,t){return"{"==e?F(ue,"}"):("variable"==e&&m(t),p())}function ce(e,t){return"from"==t?(Me.marked="keyword",p(k)):void 0}function de(e){return"]"==e?p():h(C,fe)}function fe(e){return"for"==e?h(he,w("]")):","==e?p(_(C,"]")):h(_(C,"]"))}function he(e){return"for"==e?p(X,he):"if"==e?p(k,he):void 0}var pe=t.indentUnit,me=r.statementIndent,ge=r.jsonld,ve=r.json||ge,ye=r.typescript,be=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":n,"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n};if(ye){var l={type:"variable",style:"variable-3"},s={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:l,number:l,bool:l,any:l};for(var u in s)a[u]=s[u]}return a}(),we=/[+\-*&%=<>!?|~^]/,xe=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,ke,Ce,Le="([{}])",Se={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Me={state:null,column:null,marked:null,cc:null},Te={name:"this",next:{name:"arguments"}};return b.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new c((e||0)-pe,0,"block",!1),localVars:r.localVars,context:r.localVars&&{vars:r.localVars},indented:0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),u(e,t)),t.tokenize!=l&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==ke?r:(t.lastType="operator"!=ke||"++"!=Ce&&"--"!=Ce?ke:"incdec",f(t,r,ke,Ce,e))},indent:function(t,n){if(t.tokenize==l)return e.Pass;if(t.tokenize!=o)return 0;var i=n&&n.charAt(0),a=t.lexical;if(!/^\s*else\b/.test(n))for(var s=t.cc.length-1;s>=0;--s){var u=t.cc[s];if(u==b)a=a.prev;else if(u!=Y)break}"stat"==a.type&&"}"==i&&(a=a.prev),me&&")"==a.type&&"stat"==a.prev.type&&(a=a.prev);var c=a.type,d=i==c;return"vardef"==c?a.indented+("operator"==t.lastType||","==t.lastType?a.info+1:0):"form"==c&&"{"==i?a.indented:"form"==c?a.indented+pe:"stat"==c?a.indented+("operator"==t.lastType||","==t.lastType?me||pe:0):"switch"!=a.info||d||0==r.doubleIndentSwitch?a.align?a.column+(d?0:1):a.indented+(d?0:pe):a.indented+(/^(?:case|default)\b/.test(n)?pe:2*pe)},electricChars:":{}",blockCommentStart:ve?null:"/*",blockCommentEnd:ve?null:"*/",lineComment:ve?null:"//",fold:"brace",helperType:ve?"json":"javascript",jsonldMode:ge,jsonMode:ve}}),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("xml",function(t,r){function n(e,t){function r(r){return t.tokenize=r,r(e,t)}var n=e.next();if("<"==n)return e.eat("!")?e.eat("[")?e.match("CDATA[")?r(a("atom","]]>")):null:e.match("--")?r(a("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(l(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=a("meta","?>"),"meta"):(S=e.eat("/")?"closeTag":"openTag",t.tokenize=i,"tag bracket");if("&"==n){var o;return o=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),o?"atom":"error"}return e.eatWhile(/[^&<]/),null}function i(e,t){var r=e.next();if(">"==r||"/"==r&&e.eat(">"))return t.tokenize=n,S=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return S="equals",null;if("<"==r){t.tokenize=n,t.state=d,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" error":"error"}return/[\'\"]/.test(r)?(t.tokenize=o(r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function o(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=i;break}return"string"};return t.isInAttribute=!0,t}function a(e,t){return function(r,i){for(;!r.eol();){if(r.match(t)){i.tokenize=n;break}r.next()}return e}}function l(e){return function(t,r){for(var i;null!=(i=t.next());){if("<"==i)return r.tokenize=l(e+1),r.tokenize(t,r);if(">"==i){if(1==e){r.tokenize=n;break}return r.tokenize=l(e-1),r.tokenize(t,r)}}return"meta"}}function s(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(C.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function u(e){e.context&&(e.context=e.context.prev)}function c(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName,!C.contextGrabbers.hasOwnProperty(r)||!C.contextGrabbers[r].hasOwnProperty(t))return;u(e)}}function d(e,t,r){return"openTag"==e?(r.tagStart=t.column(),f):"closeTag"==e?h:d}function f(e,t,r){return"word"==e?(r.tagName=t.current(),M="tag",g):(M="error",f)}function h(e,t,r){if("word"==e){var n=t.current();return r.context&&r.context.tagName!=n&&C.implicitlyClosed.hasOwnProperty(r.context.tagName)&&u(r),r.context&&r.context.tagName==n?(M="tag",p):(M="tag error",m)}return M="error",m}function p(e,t,r){return"endTag"!=e?(M="error",p):(u(r),d)}function m(e,t,r){return M="error",p(e,t,r)}function g(e,t,r){if("word"==e)return M="attribute",v;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||C.autoSelfClosers.hasOwnProperty(n)?c(r,n):(c(r,n),r.context=new s(r,n,i==r.indented)),d}return M="error",g}function v(e,t,r){return"equals"==e?y:(C.allowMissing||(M="error"),g(e,t,r))}function y(e,t,r){return"string"==e?b:"word"==e&&C.allowUnquoted?(M="string",g):(M="error",g(e,t,r))}function b(e,t,r){return"string"==e?b:g(e,t,r)}var w=t.indentUnit,x=r.multilineTagIndentFactor||1,k=r.multilineTagIndentPastTag;null==k&&(k=!0);var C=r.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,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,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1},L=r.alignCDATA,S,M;return{startState:function(){return{tokenize:n,state:d,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;S=null;var r=t.tokenize(e,t);return(r||S)&&"comment"!=r&&(M=null,t.state=t.state(S||r,e,t),M&&(r="error"==M?r+" error":M)),r},indent:function(t,r,o){var a=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+w;if(a&&a.noIndent)return e.Pass;if(t.tokenize!=i&&t.tokenize!=n)return o?o.match(/^(\s*)/)[0].length:0;if(t.tagName)return k?t.tagStart+t.tagName.length+2:t.tagStart+w*x;if(L&&/<!\[CDATA\[/.test(r))return 0;var l=r&&/^<(\/)?([\w_:\.-]*)/.exec(r);if(l&&l[1])for(;a;){if(a.tagName==l[2]){a=a.prev;break}if(!C.implicitlyClosed.hasOwnProperty(a.tagName))break;a=a.prev}else if(l)for(;a;){var s=C.contextGrabbers[a.tagName];if(!s||!s.hasOwnProperty(l[2]))break;a=a.prev}for(;a&&!a.startOfLine;)a=a.prev;return a?a.indent+w:0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:r.htmlMode?"html":"xml",helperType:r.htmlMode?"html":"xml"}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t=0;t<e.state.activeLines.length;t++)e.removeLineClass(e.state.activeLines[t],"wrap",o),e.removeLineClass(e.state.activeLines[t],"background",a)}function r(e,t){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!=t[r])return!1;return!0}function n(e,n){for(var i=[],l=0;l<n.length;l++){var s=e.getLineHandleVisualStart(n[l].head.line);i[i.length-1]!=s&&i.push(s)}r(e.state.activeLines,i)||e.operation(function(){t(e);for(var r=0;r<i.length;r++)e.addLineClass(i[r],"wrap",o),e.addLineClass(i[r],"background",a);e.state.activeLines=i})}function i(e,t){n(e,t.ranges)}var o="CodeMirror-activeline",a="CodeMirror-activeline-background";e.defineOption("styleActiveLine",!1,function(r,o,a){var l=a&&a!=e.Init;o&&!l?(r.state.activeLines=[],n(r,r.listSelections()),r.on("beforeSelectionChange",i)):!o&&l&&(r.off("beforeSelectionChange",i),t(r),delete r.state.activeLines)})}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,n,i){var o=e.getLineHandle(t.line),s=t.ch-1,u=s>=0&&l[o.text.charAt(s)]||l[o.text.charAt(++s)];if(!u)return null;var c=">"==u.charAt(1)?1:-1;if(n&&c>0!=(s==t.ch))return null;var d=e.getTokenTypeAt(a(t.line,s+1)),f=r(e,a(t.line,s+(c>0?1:0)),c,d||null,i);return null==f?null:{from:a(t.line,s),to:f&&f.pos,match:f&&f.ch==u.charAt(0),forward:c>0}}function r(e,t,r,n,i){for(var o=i&&i.maxScanLineLength||1e4,s=i&&i.maxScanLines||1e3,u=[],c=i&&i.bracketRegex?i.bracketRegex:/[(){}[\]]/,d=r>0?Math.min(t.line+s,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-s),f=t.line;f!=d;f+=r){var h=e.getLine(f);if(h){var p=r>0?0:h.length-1,m=r>0?h.length:-1;if(!(h.length>o))for(f==t.line&&(p=t.ch-(0>r?1:0));p!=m;p+=r){var g=h.charAt(p);if(c.test(g)&&(void 0===n||e.getTokenTypeAt(a(f,p+1))==n)){var v=l[g];if(">"==v.charAt(1)==r>0)u.push(g);else{if(!u.length)return{pos:a(f,p),ch:g};u.pop()}}}}}return f-r==(r>0?e.lastLine():e.firstLine())?!1:null}function n(e,r,n){for(var i=e.state.matchBrackets.maxHighlightLineLength||1e3,l=[],s=e.listSelections(),u=0;u<s.length;u++){var c=s[u].empty()&&t(e,s[u].head,!1,n);if(c&&e.getLine(c.from.line).length<=i){var d=c.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(c.from,a(c.from.line,c.from.ch+1),{className:d})),c.to&&e.getLine(c.to.line).length<=i&&l.push(e.markText(c.to,a(c.to.line,c.to.ch+1),{className:d}))}}if(l.length){o&&e.state.focused&&e.display.input.focus();var f=function(){e.operation(function(){for(var e=0;e<l.length;e++)l[e].clear()})};if(!r)return f;setTimeout(f,800)}}function i(e){e.operation(function(){s&&(s(),s=null),s=n(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,l={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;e.defineOption("matchBrackets",!1,function(t,r,n){n&&n!=e.Init&&t.off("cursorActivity",i),r&&(t.state.matchBrackets="object"==typeof r?r:{},t.on("cursorActivity",i))}),e.defineExtension("matchBrackets",function(){n(this,!0)}),e.defineExtension("findMatchingBracket",function(e,r,n){return t(this,e,r,n)}),e.defineExtension("scanForBracket",function(e,t,n,i){return r(this,e,t,n,i)})}),window.onload=heshPlugin;
|
1 |
+
!function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){function b(a,b,d,e){var f=a.getLineHandle(b.line),i=b.ch-1,j=i>=0&&h[f.text.charAt(i)]||h[f.text.charAt(++i)];if(!j)return null;var k=">"==j.charAt(1)?1:-1;if(d&&k>0!=(i==b.ch))return null;var l=a.getTokenTypeAt(g(b.line,i+1)),m=c(a,g(b.line,i+(k>0?1:0)),k,l||null,e);return null==m?null:{from:g(b.line,i),to:m&&m.pos,match:m&&m.ch==j.charAt(0),forward:k>0}}function c(a,b,c,d,e){for(var f=e&&e.maxScanLineLength||1e4,i=e&&e.maxScanLines||1e3,j=[],k=e&&e.bracketRegex?e.bracketRegex:/[(){}[\]]/,l=c>0?Math.min(b.line+i,a.lastLine()+1):Math.max(a.firstLine()-1,b.line-i),m=b.line;m!=l;m+=c){var n=a.getLine(m);if(n){var o=c>0?0:n.length-1,p=c>0?n.length:-1;if(!(n.length>f))for(m==b.line&&(o=b.ch-(0>c?1:0));o!=p;o+=c){var q=n.charAt(o);if(k.test(q)&&(void 0===d||a.getTokenTypeAt(g(m,o+1))==d)){var r=h[q];if(">"==r.charAt(1)==c>0)j.push(q);else{if(!j.length)return{pos:g(m,o),ch:q};j.pop()}}}}}return m-c==(c>0?a.lastLine():a.firstLine())?!1:null}function d(a,c,d){for(var e=a.state.matchBrackets.maxHighlightLineLength||1e3,h=[],i=a.listSelections(),j=0;j<i.length;j++){var k=i[j].empty()&&b(a,i[j].head,!1,d);if(k&&a.getLine(k.from.line).length<=e){var l=k.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";h.push(a.markText(k.from,g(k.from.line,k.from.ch+1),{className:l})),k.to&&a.getLine(k.to.line).length<=e&&h.push(a.markText(k.to,g(k.to.line,k.to.ch+1),{className:l}))}}if(h.length){f&&a.state.focused&&a.focus();var m=function(){a.operation(function(){for(var a=0;a<h.length;a++)h[a].clear()})};if(!c)return m;setTimeout(m,800)}}function e(a){a.operation(function(){i&&(i(),i=null),i=d(a,!1,a.state.matchBrackets)})}var f=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),g=a.Pos,h={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;a.defineOption("matchBrackets",!1,function(b,c,d){d&&d!=a.Init&&b.off("cursorActivity",e),c&&(b.state.matchBrackets="object"==typeof c?c:{},b.on("cursorActivity",e))}),a.defineExtension("matchBrackets",function(){d(this,!0)}),a.defineExtension("findMatchingBracket",function(a,c,d){return b(this,a,c,d)}),a.defineExtension("scanForBracket",function(a,b,d,e){return c(this,a,b,d,e)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b=0;b<a.state.activeLines.length;b++)a.removeLineClass(a.state.activeLines[b],"wrap",f),a.removeLineClass(a.state.activeLines[b],"background",g),a.removeLineClass(a.state.activeLines[b],"gutter",h)}function c(a,b){if(a.length!=b.length)return!1;for(var c=0;c<a.length;c++)if(a[c]!=b[c])return!1;return!0}function d(a,d){for(var e=[],i=0;i<d.length;i++){var j=d[i];if(j.empty()){var k=a.getLineHandleVisualStart(j.head.line);e[e.length-1]!=k&&e.push(k)}}c(a.state.activeLines,e)||a.operation(function(){b(a);for(var c=0;c<e.length;c++)a.addLineClass(e[c],"wrap",f),a.addLineClass(e[c],"background",g),a.addLineClass(e[c],"gutter",h);a.state.activeLines=e})}function e(a,b){d(a,b.ranges)}var f="CodeMirror-activeline",g="CodeMirror-activeline-background",h="CodeMirror-activeline-gutter";a.defineOption("styleActiveLine",!1,function(c,f,g){var h=g&&g!=a.Init;f&&!h?(c.state.activeLines=[],d(c,c.listSelections()),c.on("beforeSelectionChange",e)):!f&&h&&(c.off("beforeSelectionChange",e),b(c),delete c.state.activeLines)})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={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,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,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,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};a.defineMode("xml",function(d,e){function f(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d)return a.eat("!")?a.eat("[")?a.match("CDATA[")?c(i("atom","]]>")):null:a.match("--")?c(i("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(j(1))):null:a.eat("?")?(a.eatWhile(/[\w\._\-]/),b.tokenize=i("meta","?>"),"meta"):(A=a.eat("/")?"closeTag":"openTag",b.tokenize=g,"tag bracket");if("&"==d){var e;return e=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),e?"atom":"error"}return a.eatWhile(/[^&<]/),null}function g(a,b){var c=a.next();if(">"==c||"/"==c&&a.eat(">"))return b.tokenize=f,A=">"==c?"endTag":"selfcloseTag","tag bracket";if("="==c)return A="equals",null;if("<"==c){b.tokenize=f,b.state=n,b.tagName=b.tagStart=null;var d=b.tokenize(a,b);return d?d+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=h(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=g;break}return"string"};return b.isInAttribute=!0,b}function i(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=f;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=f;break}return c.tokenize=j(a-1),c.tokenize(b,c)}}return"meta"}}function k(a,b,c){this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c,(x.doNotIndent.hasOwnProperty(b)||a.context&&a.context.noIndent)&&(this.noIndent=!0)}function l(a){a.context&&(a.context=a.context.prev)}function m(a,b){for(var c;;){if(!a.context)return;if(c=a.context.tagName,!x.contextGrabbers.hasOwnProperty(c)||!x.contextGrabbers[c].hasOwnProperty(b))return;l(a)}}function n(a,b,c){return"openTag"==a?(c.tagStart=b.column(),o):"closeTag"==a?p:n}function o(a,b,c){return"word"==a?(c.tagName=b.current(),B="tag",s):(B="error",o)}function p(a,b,c){if("word"==a){var d=b.current();return c.context&&c.context.tagName!=d&&x.implicitlyClosed.hasOwnProperty(c.context.tagName)&&l(c),c.context&&c.context.tagName==d||x.matchClosing===!1?(B="tag",q):(B="tag error",r)}return B="error",r}function q(a,b,c){return"endTag"!=a?(B="error",q):(l(c),n)}function r(a,b,c){return B="error",q(a,b,c)}function s(a,b,c){if("word"==a)return B="attribute",t;if("endTag"==a||"selfcloseTag"==a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,"selfcloseTag"==a||x.autoSelfClosers.hasOwnProperty(d)?m(c,d):(m(c,d),c.context=new k(c,d,e==c.indented)),n}return B="error",s}function t(a,b,c){return"equals"==a?u:(x.allowMissing||(B="error"),s(a,b,c))}function u(a,b,c){return"string"==a?v:"word"==a&&x.allowUnquoted?(B="string",s):(B="error",s(a,b,c))}function v(a,b,c){return"string"==a?v:s(a,b,c)}var w=d.indentUnit,x={},y=e.htmlMode?b:c;for(var z in y)x[z]=y[z];for(var z in e)x[z]=e[z];var A,B;return f.isInText=!0,{startState:function(a){var b={tokenize:f,state:n,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;A=null;var c=b.tokenize(a,b);return(c||A)&&"comment"!=c&&(B=null,b.state=b.state(A||c,a,b),B&&(c="error"==B?c+" error":B)),c},indent:function(b,c,d){var e=b.context;if(b.tokenize.isInAttribute)return b.tagStart==b.indented?b.stringStartCol+1:b.indented+w;if(e&&e.noIndent)return a.Pass;if(b.tokenize!=g&&b.tokenize!=f)return d?d.match(/^(\s*)/)[0].length:0;if(b.tagName)return x.multilineTagIndentPastTag!==!1?b.tagStart+b.tagName.length+2:b.tagStart+w*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/<!\[CDATA\[/.test(c))return 0;var h=c&&/^<(\/)?([\w_:\.-]*)/.exec(c);if(h&&h[1])for(;e;){if(e.tagName==h[2]){e=e.prev;break}if(!x.implicitlyClosed.hasOwnProperty(e.tagName))break;e=e.prev}else if(h)for(;e;){var i=x.contextGrabbers[e.tagName];if(!i||!i.hasOwnProperty(h[2]))break;e=e.prev}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+w:b.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(a){a.state==u&&(a.state=s)}}}),a.defineMIME("text/xml","xml"),a.defineMIME("application/xml","xml"),a.mimeModes.hasOwnProperty("text/html")||a.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(b.lastType)||"quasi"==b.lastType&&/\{\s*$/.test(a.string.slice(0,a.pos-(c||0)))}a.defineMode("javascript",function(c,d){function e(a){for(var b,c=!1,d=!1;null!=(b=a.next());){if(!c){if("/"==b&&!d)return;"["==b?d=!0:d&&"]"==b&&(d=!1)}c=!c&&"\\"==b}}function f(a,b,c){return va=a,wa=c,b}function g(a,c){var d=a.next();if('"'==d||"'"==d)return c.tokenize=h(d),c.tokenize(a,c);if("."==d&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return f("number","number");if("."==d&&a.match(".."))return f("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(d))return f(d);if("="==d&&a.eat(">"))return f("=>","operator");if("0"==d&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),f("number","number");if("0"==d&&a.eat(/o/i))return a.eatWhile(/[0-7]/i),f("number","number");if("0"==d&&a.eat(/b/i))return a.eatWhile(/[01]/i),f("number","number");if(/\d/.test(d))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),f("number","number");if("/"==d)return a.eat("*")?(c.tokenize=i,i(a,c)):a.eat("/")?(a.skipToEnd(),f("comment","comment")):b(a,c,1)?(e(a),a.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),f("regexp","string-2")):(a.eatWhile(Ea),f("operator","operator",a.current()));if("`"==d)return c.tokenize=j,j(a,c);if("#"==d)return a.skipToEnd(),f("error","error");if(Ea.test(d))return a.eatWhile(Ea),f("operator","operator",a.current());if(Ca.test(d)){a.eatWhile(Ca);var g=a.current(),k=Da.propertyIsEnumerable(g)&&Da[g];return k&&"."!=c.lastType?f(k.type,k.style,g):f("variable","variable",g)}}function h(a){return function(b,c){var d,e=!1;if(za&&"@"==b.peek()&&b.match(Fa))return c.tokenize=g,f("jsonld-keyword","meta");for(;null!=(d=b.next())&&(d!=a||e);)e=!e&&"\\"==d;return e||(c.tokenize=g),f("string","string")}}function i(a,b){for(var c,d=!1;c=a.next();){if("/"==c&&d){b.tokenize=g;break}d="*"==c}return f("comment","comment")}function j(a,b){for(var c,d=!1;null!=(c=a.next());){if(!d&&("`"==c||"$"==c&&a.eat("{"))){b.tokenize=g;break}d=!d&&"\\"==c}return f("quasi","string-2",a.current())}function k(a,b){b.fatArrowAt&&(b.fatArrowAt=null);var c=a.string.indexOf("=>",a.start);if(!(0>c)){for(var d=0,e=!1,f=c-1;f>=0;--f){var g=a.string.charAt(f),h=Ga.indexOf(g);if(h>=0&&3>h){if(!d){++f;break}if(0==--d)break}else if(h>=3&&6>h)++d;else if(Ca.test(g))e=!0;else{if(/["'\/]/.test(g))return;if(e&&!d){++f;break}}}e&&!d&&(b.fatArrowAt=f)}}function l(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function m(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0;for(var d=a.context;d;d=d.prev)for(var c=d.vars;c;c=c.next)if(c.name==b)return!0}function n(a,b,c,d,e){var f=a.cc;for(Ia.state=a,Ia.stream=e,Ia.marked=null,Ia.cc=f,Ia.style=b,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var g=f.length?f.pop():Aa?x:w;if(g(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return Ia.marked?Ia.marked:"variable"==c&&m(a,d)?"variable-2":b}}}function o(){for(var a=arguments.length-1;a>=0;a--)Ia.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=Ia.state;if(Ia.marked="def",c.context){if(b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;d.globalVars&&(c.globalVars={name:a,next:c.globalVars})}}function r(){Ia.state.context={prev:Ia.state.context,vars:Ia.state.localVars},Ia.state.localVars=Ja}function s(){Ia.state.localVars=Ia.state.context.vars,Ia.state.context=Ia.state.context.prev}function t(a,b){var c=function(){var c=Ia.state,d=c.indented;if("stat"==c.lexical.type)d=c.lexical.indented;else for(var e=c.lexical;e&&")"==e.type&&e.align;e=e.prev)d=e.indented;c.lexical=new l(d,Ia.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function u(){var a=Ia.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function v(a){function b(c){return c==a?p():";"==a?o():p(b)}return b}function w(a,b){return"var"==a?p(t("vardef",b.length),X,v(";"),u):"keyword a"==a?p(t("form"),x,w,u):"keyword b"==a?p(t("form"),w,u):"{"==a?p(t("}"),S,u):";"==a?p():"if"==a?("else"==Ia.state.lexical.info&&Ia.state.cc[Ia.state.cc.length-1]==u&&Ia.state.cc.pop()(),p(t("form"),x,w,u,aa)):"function"==a?p(ga):"for"==a?p(t("form"),ba,w,u):"variable"==a?p(t("stat"),L):"switch"==a?p(t("form"),x,t("}","switch"),v("{"),S,u,u):"case"==a?p(x,v(":")):"default"==a?p(v(":")):"catch"==a?p(t("form"),r,v("("),ha,v(")"),w,u,s):"class"==a?p(t("form"),ia,u):"export"==a?p(t("stat"),ma,u):"import"==a?p(t("stat"),na,u):"module"==a?p(t("form"),Y,t("}"),v("{"),S,u,u):"async"==a?p(w):o(t("stat"),x,v(";"),u)}function x(a){return z(a,!1)}function y(a){return z(a,!0)}function z(a,b){if(Ia.state.fatArrowAt==Ia.stream.start){var c=b?H:G;if("("==a)return p(r,t(")"),Q(Y,")"),u,v("=>"),c,s);if("variable"==a)return o(r,Y,v("=>"),c,s)}var d=b?D:C;return Ha.hasOwnProperty(a)?p(d):"function"==a?p(ga,d):"keyword c"==a?p(b?B:A):"("==a?p(t(")"),A,ta,v(")"),u,d):"operator"==a||"spread"==a?p(b?y:x):"["==a?p(t("]"),ra,u,d):"{"==a?R(N,"}",null,d):"quasi"==a?o(E,d):"new"==a?p(I(b)):p()}function A(a){return a.match(/[;\}\)\],]/)?o():o(x)}function B(a){return a.match(/[;\}\)\],]/)?o():o(y)}function C(a,b){return","==a?p(x):D(a,b,!1)}function D(a,b,c){var d=0==c?C:D,e=0==c?x:y;return"=>"==a?p(r,c?H:G,s):"operator"==a?/\+\+|--/.test(b)?p(d):"?"==b?p(x,v(":"),e):p(e):"quasi"==a?o(E,d):";"!=a?"("==a?R(y,")","call",d):"."==a?p(M,d):"["==a?p(t("]"),A,v("]"),u,d):void 0:void 0}function E(a,b){return"quasi"!=a?o():"${"!=b.slice(b.length-2)?p(E):p(x,F)}function F(a){return"}"==a?(Ia.marked="string-2",Ia.state.tokenize=j,p(E)):void 0}function G(a){return k(Ia.stream,Ia.state),o("{"==a?w:x)}function H(a){return k(Ia.stream,Ia.state),o("{"==a?w:y)}function I(a){return function(b){return"."==b?p(a?K:J):o(a?y:x)}}function J(a,b){return"target"==b?(Ia.marked="keyword",p(C)):void 0}function K(a,b){return"target"==b?(Ia.marked="keyword",p(D)):void 0}function L(a){return":"==a?p(u,w):o(C,v(";"),u)}function M(a){return"variable"==a?(Ia.marked="property",p()):void 0}function N(a,b){return"variable"==a||"keyword"==Ia.style?(Ia.marked="property",p("get"==b||"set"==b?O:P)):"number"==a||"string"==a?(Ia.marked=za?"property":Ia.style+" property",p(P)):"jsonld-keyword"==a?p(P):"modifier"==a?p(N):"["==a?p(x,v("]"),P):"spread"==a?p(x):void 0}function O(a){return"variable"!=a?o(P):(Ia.marked="property",p(ga))}function P(a){return":"==a?p(y):"("==a?o(ga):void 0}function Q(a,b){function c(d,e){if(","==d){var f=Ia.state.lexical;return"call"==f.info&&(f.pos=(f.pos||0)+1),p(a,c)}return d==b||e==b?p():p(v(b))}return function(d,e){return d==b||e==b?p():o(a,c)}}function R(a,b,c){for(var d=3;d<arguments.length;d++)Ia.cc.push(arguments[d]);return p(t(b,c),Q(a,b),u)}function S(a){return"}"==a?p():o(w,S)}function T(a){return Ba&&":"==a?p(V):void 0}function U(a,b){return"="==b?p(y):void 0}function V(a){return"variable"==a?(Ia.marked="variable-3",p(W)):void 0}function W(a,b){return"<"==b?p(Q(V,">"),W):"["==a?p(v("]"),W):void 0}function X(){return o(Y,T,$,_)}function Y(a,b){return"modifier"==a?p(Y):"variable"==a?(q(b),p()):"spread"==a?p(Y):"["==a?R(Y,"]"):"{"==a?R(Z,"}"):void 0}function Z(a,b){return"variable"!=a||Ia.stream.match(/^\s*:/,!1)?("variable"==a&&(Ia.marked="property"),"spread"==a?p(Y):"}"==a?o():p(v(":"),Y,$)):(q(b),p($))}function $(a,b){return"="==b?p(y):void 0}function _(a){return","==a?p(X):void 0}function aa(a,b){return"keyword b"==a&&"else"==b?p(t("form","else"),w,u):void 0}function ba(a){return"("==a?p(t(")"),ca,v(")"),u):void 0}function ca(a){return"var"==a?p(X,v(";"),ea):";"==a?p(ea):"variable"==a?p(da):o(x,v(";"),ea)}function da(a,b){return"in"==b||"of"==b?(Ia.marked="keyword",p(x)):p(C,ea)}function ea(a,b){return";"==a?p(fa):"in"==b||"of"==b?(Ia.marked="keyword",p(x)):o(x,v(";"),fa)}function fa(a){")"!=a&&p(x)}function ga(a,b){return"*"==b?(Ia.marked="keyword",p(ga)):"variable"==a?(q(b),p(ga)):"("==a?p(r,t(")"),Q(ha,")"),u,T,w,s):void 0}function ha(a){return"spread"==a?p(ha):o(Y,T,U)}function ia(a,b){return"variable"==a?(q(b),p(ja)):void 0}function ja(a,b){return"extends"==b?p(x,ja):"{"==a?p(t("}"),ka,u):void 0}function ka(a,b){return"variable"==a||"keyword"==Ia.style?"static"==b?(Ia.marked="keyword",p(ka)):(Ia.marked="property","get"==b||"set"==b?p(la,ga,ka):p(ga,ka)):"*"==b?(Ia.marked="keyword",p(ka)):";"==a?p(ka):"}"==a?p():void 0}function la(a){return"variable"!=a?o():(Ia.marked="property",p())}function ma(a,b){return"*"==b?(Ia.marked="keyword",p(qa,v(";"))):"default"==b?(Ia.marked="keyword",p(x,v(";"))):o(w)}function na(a){return"string"==a?p():o(oa,qa)}function oa(a,b){return"{"==a?R(oa,"}"):("variable"==a&&q(b),"*"==b&&(Ia.marked="keyword"),p(pa))}function pa(a,b){return"as"==b?(Ia.marked="keyword",p(oa)):void 0}function qa(a,b){return"from"==b?(Ia.marked="keyword",p(x)):void 0}function ra(a){return"]"==a?p():o(y,sa)}function sa(a){return"for"==a?o(ta,v("]")):","==a?p(Q(B,"]")):o(Q(y,"]"))}function ta(a){return"for"==a?p(ba,ta):"if"==a?p(x,ta):void 0}function ua(a,b){return"operator"==a.lastType||","==a.lastType||Ea.test(b.charAt(0))||/[,.]/.test(b.charAt(0))}var va,wa,xa=c.indentUnit,ya=d.statementIndent,za=d.jsonld,Aa=d.json||za,Ba=d.typescript,Ca=d.wordCharacters||/[\w$\xa1-\uffff]/,Da=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":a("new"),"delete":d,"throw":d,"debugger":d,"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":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this"),"class":a("class"),"super":a("atom"),"yield":d,"export":a("export"),"import":a("import"),"extends":d,await:d,async:a("async")};if(Ba){var h={type:"variable",style:"variable-3"},i={"interface":a("class"),"implements":d,namespace:d,module:a("module"),"enum":a("module"),"public":a("modifier"),"private":a("modifier"),"protected":a("modifier"),"abstract":a("modifier"),as:e,string:h,number:h,"boolean":h,any:h};for(var j in i)g[j]=i[j]}return g}(),Ea=/[+\-*&%=<>!?|~^]/,Fa=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ga="([{}])",Ha={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Ia={state:null,column:null,marked:null,cc:null},Ja={name:"this",next:{name:"arguments"}};return u.lex=!0,{startState:function(a){var b={tokenize:g,lastType:"sof",cc:[],lexical:new l((a||0)-xa,0,"block",!1),localVars:d.localVars,context:d.localVars&&{vars:d.localVars},indented:a||0};return d.globalVars&&"object"==typeof d.globalVars&&(b.globalVars=d.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),k(a,b)),b.tokenize!=i&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==va?c:(b.lastType="operator"!=va||"++"!=wa&&"--"!=wa?va:"incdec",n(b,c,va,wa,a))},indent:function(b,c){if(b.tokenize==i)return a.Pass;if(b.tokenize!=g)return 0;var e=c&&c.charAt(0),f=b.lexical;if(!/^\s*else\b/.test(c))for(var h=b.cc.length-1;h>=0;--h){var j=b.cc[h];if(j==u)f=f.prev;else if(j!=aa)break}"stat"==f.type&&"}"==e&&(f=f.prev),ya&&")"==f.type&&"stat"==f.prev.type&&(f=f.prev);var k=f.type,l=e==k;return"vardef"==k?f.indented+("operator"==b.lastType||","==b.lastType?f.info+1:0):"form"==k&&"{"==e?f.indented:"form"==k?f.indented+xa:"stat"==k?f.indented+(ua(b,c)?ya||xa:0):"switch"!=f.info||l||0==d.doubleIndentSwitch?f.align?f.column+(l?0:1):f.indented+(l?0:xa):f.indented+(/^(?:case|default)\b/.test(c)?xa:2*xa)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Aa?null:"/*",blockCommentEnd:Aa?null:"*/",lineComment:Aa?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Aa?"json":"javascript",jsonldMode:za,jsonMode:Aa,expressionAllowed:b,skipExpression:function(a){var b=a.cc[a.cc.length-1];b!=x&&b!=y||a.cc.pop()}}}),a.registerHelper("wordChars","javascript",/[\w$]/),a.defineMIME("text/javascript","javascript"),a.defineMIME("text/ecmascript","javascript"),a.defineMIME("application/javascript","javascript"),a.defineMIME("application/x-javascript","javascript"),a.defineMIME("application/ecmascript","javascript"),a.defineMIME("application/json",{name:"javascript",json:!0}),a.defineMIME("application/x-json",{name:"javascript",json:!0}),a.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),a.defineMIME("text/typescript",{name:"javascript",typescript:!0}),a.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}a.defineMode("css",function(b,c){function d(a,b){return o=b,a}function e(a,b){var c=a.next();if(r[c]){var e=r[c](a,b);if(e!==!1)return e}return"@"==c?(a.eatWhile(/[\w\\\-]/),d("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?d(null,"compare"):'"'==c||"'"==c?(b.tokenize=f(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),d("atom","hash")):"!"==c?(a.match(/^\s*\w*/),d("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),d("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?d(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?d(null,c):"u"==c&&a.match(/rl(-prefix)?\(/)||"d"==c&&a.match("omain(")||"r"==c&&a.match("egexp(")?(a.backUp(1),b.tokenize=g,d("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),d("property","word")):d(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),d("number","unit")):a.match(/^-[\w\\\-]+/)?(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?d("variable-2","variable-definition"):d("variable-2","variable")):a.match(/^\w+-/)?d("meta","meta"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){")"==a&&b.backUp(1);break}f=!f&&"\\"==e}return(e==a||!f&&")"!=a)&&(c.tokenize=null),d("string","string")}}function g(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=f(")"),d(null,"(")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return E[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?"atom":A.hasOwnProperty(b)?"keyword":"variable"}var n=c.inline;c.propertyKeywords||(c=a.resolveMode("text/css"));var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.supportsAtComponent===!0,E={};return E.top=function(a,b,c){if("{"==a)return i(c,b,"block");if("}"==a&&c.context.prev)return j(c);if(D&&/@component/.test(a))return i(c,b,"atComponentBlock");if(/^@(-moz-)?document$/.test(a))return i(c,b,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,"atBlock");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return i(c,b,"at");if("hash"==a)p="builtin";else if("word"==a)p="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return i(c,b,"interpolation");if(":"==a)return"pseudo";if(C&&"("==a)return i(c,b,"parens")}return c.context.type},E.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p="property","maybeprop"):x.hasOwnProperty(d)?(p="string-2","maybeprop"):C?(p=b.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==a?"block":C||"hash"!=a&&"qualifier"!=a?E.top(a,b,c):(p="error","block")},E.maybeprop=function(a,b,c){return":"==a?i(c,b,"prop"):k(a,b,c)},E.prop=function(a,b,c){if(";"==a)return j(c);if("{"==a&&C)return i(c,b,"propBlock");if("}"==a||"{"==a)return l(a,b,c);if("("==a)return i(c,b,"parens");if("hash"!=a||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(b.current())){if("word"==a)m(b);else if("interpolation"==a)return i(c,b,"interpolation")}else p+=" error";return"prop"},E.propBlock=function(a,b,c){return"}"==a?j(c):"word"==a?(p="property","maybeprop"):c.context.type},E.parens=function(a,b,c){return"{"==a||"}"==a?l(a,b,c):")"==a?j(c):"("==a?i(c,b,"parens"):"interpolation"==a?i(c,b,"interpolation"):("word"==a&&m(b),"parens")},E.pseudo=function(a,b,c){return"word"==a?(p="variable-3",c.context.type):k(a,b,c)},E.documentTypes=function(a,b,c){return"word"==a&&s.hasOwnProperty(b.current())?(p="tag",c.context.type):E.atBlock(a,b,c)},E.atBlock=function(a,b,c){if("("==a)return i(c,b,"atBlock_parens");if("}"==a||";"==a)return l(a,b,c);if("{"==a)return j(c)&&i(c,b,C?"block":"top");if("interpolation"==a)return i(c,b,"interpolation");if("word"==a){var d=b.current().toLowerCase();p="only"==d||"not"==d||"and"==d||"or"==d?"keyword":t.hasOwnProperty(d)?"attribute":u.hasOwnProperty(d)?"property":v.hasOwnProperty(d)?"keyword":w.hasOwnProperty(d)?"property":x.hasOwnProperty(d)?"string-2":B.hasOwnProperty(d)?"atom":A.hasOwnProperty(d)?"keyword":"error"}return c.context.type},E.atComponentBlock=function(a,b,c){return"}"==a?l(a,b,c):"{"==a?j(c)&&i(c,b,C?"block":"top",!1):("word"==a&&(p="error"),c.context.type)},E.atBlock_parens=function(a,b,c){return")"==a?j(c):"{"==a||"}"==a?l(a,b,c,2):E.atBlock(a,b,c)},E.restricted_atBlock_before=function(a,b,c){return"{"==a?i(c,b,"restricted_atBlock"):"word"==a&&"@counter-style"==c.stateArg?(p="variable","restricted_atBlock_before"):k(a,b,c)},E.restricted_atBlock=function(a,b,c){return"}"==a?(c.stateArg=null,j(c)):"word"==a?(p="@font-face"==c.stateArg&&!y.hasOwnProperty(b.current().toLowerCase())||"@counter-style"==c.stateArg&&!z.hasOwnProperty(b.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},E.keyframes=function(a,b,c){return"word"==a?(p="variable","keyframes"):"{"==a?i(c,b,"top"):k(a,b,c)},E.at=function(a,b,c){return";"==a?j(c):"{"==a||"}"==a?l(a,b,c):("word"==a?p="tag":"hash"==a&&(p="builtin"),"at")},E.interpolation=function(a,b,c){return"}"==a?j(c):"{"==a||";"==a?l(a,b,c):("word"==a?p="variable":"variable"!=a&&"("!=a&&")"!=a&&(p="error"),"interpolation")},{startState:function(a){return{tokenize:null,state:n?"block":"top",stateArg:null,context:new h(n?"block":"top",a||0,null)}},token:function(a,b){if(!b.tokenize&&a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return c&&"object"==typeof c&&(o=c[1],c=c[0]),p=c,b.state=E[b.state](o,a,b),p},indent:function(a,b){var c=a.context,d=b&&b.charAt(0),e=c.indent;return"prop"!=c.type||"}"!=d&&")"!=d||(c=c.prev),c.prev&&("}"!=d||"block"!=c.type&&"top"!=c.type&&"interpolation"!=c.type&&"restricted_atBlock"!=c.type?(")"!=d||"parens"!=c.type&&"atBlock_parens"!=c.type)&&("{"!=d||"at"!=c.type&&"atBlock"!=c.type)||(e=Math.max(0,c.indent-q),c=c.prev):(c=c.prev,e=c.indent)),e},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var d=["domain","regexp","url","url-prefix"],e=b(d),f=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],g=b(f),h=["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","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=b(h),j=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],k=b(j),l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","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","flow-from","flow-into","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","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","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","object-fit","object-position","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","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","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-overflow","text-shadow","text-size-adjust","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","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],m=b(l),n=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],o=b(n),p=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],q=b(p),r=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],s=b(r),t=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],u=b(t),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","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","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","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","luminosity","malayalam","match","matrix","matrix3d","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","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","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","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],w=b(v),x=d.concat(f).concat(h).concat(j).concat(l).concat(n).concat(t).concat(v);
|
2 |
+
a.registerHelper("hintWords","css",x),a.defineMIME("text/css",{documentTypes:e,mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css"}),a.defineMIME("text/x-scss",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},":":function(a){return a.match(/\s*\{/)?[null,"{"]:!1},$:function(a){return a.match(/^[\w-]+/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(a){return a.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),a.defineMIME("text/x-less",{mediaTypes:g,mediaFeatures:i,mediaValueKeywords:k,propertyKeywords:m,nonStandardPropertyKeywords:o,colorKeywords:u,valueKeywords:w,fontProperties:q,allowNested:!0,tokenHooks:{"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=c,c(a,b)):["operator","operator"]},"@":function(a){return a.eat("{")?[null,"interpolation"]:a.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),a.defineMIME("text/x-gss",{documentTypes:e,mediaTypes:g,mediaFeatures:i,propertyKeywords:m,nonStandardPropertyKeywords:o,fontProperties:q,counterDescriptors:s,colorKeywords:u,valueKeywords:w,supportsAtComponent:!0,tokenHooks:{"/":function(a,b){return a.eat("*")?(b.tokenize=c,c(a,b)):!1}},name:"css",helperType:"gss"})}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";function b(a,b,c){var d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):d.match(/<\/?$/)&&(a.backUp(d.length),a.match(b,!1)||a.match(d)),c}function c(a){var b=i[a];return b?b:i[a]=new RegExp("\\s+"+a+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function d(a,b){var d=a.match(c(b));return d?d[2]:""}function e(a,b){return new RegExp((b?"^":"")+"</s*"+a+"s*>","i")}function f(a,b){for(var c in a)for(var d=b[c]||(b[c]=[]),e=a[c],f=e.length-1;f>=0;f--)d.unshift(e[f])}function g(a,b){for(var c=0;c<a.length;c++){var e=a[c];if(!e[0]||e[1].test(d(b,e[0])))return e[2]}}var h={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},i={};a.defineMode("htmlmixed",function(c,d){function i(d,f){var h,l=j.token(d,f.htmlState),m=/\btag\b/.test(l);if(m&&!/[<>\s\/]/.test(d.current())&&(h=f.htmlState.tagName&&f.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(h))f.inTag=h+" ";else if(f.inTag&&m&&/>$/.test(d.current())){var n=/^([\S]+) (.*)/.exec(f.inTag);f.inTag=null;var o=">"==d.current()&&g(k[n[1]],n[2]),p=a.getMode(c,o),q=e(n[1],!0),r=e(n[1],!1);f.token=function(a,c){return a.match(q,!1)?(c.token=i,c.localState=c.localMode=null,null):b(a,r,c.localMode.token(a,c.localState))},f.localMode=p,f.localState=a.startState(p,j.indent(f.htmlState,""))}else f.inTag&&(f.inTag+=d.current(),d.eol()&&(f.inTag+=" "));return l}var j=a.getMode(c,{name:"xml",htmlMode:!0,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag}),k={},l=d&&d.tags,m=d&&d.scriptTypes;if(f(h,k),l&&f(l,k),m)for(var n=m.length-1;n>=0;n--)k.script.unshift(["type",m[n].matches,m[n].mode]);return{startState:function(){var b=a.startState(j);return{token:i,inTag:null,localMode:null,localState:null,htmlState:b}},copyState:function(b){var c;return b.localState&&(c=a.copyState(b.localMode,b.localState)),{token:b.token,inTag:b.inTag,localMode:b.localMode,localState:c,htmlState:a.copyState(j,b.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return!b.localMode||/^\s*<\//.test(c)?j.indent(b.htmlState,c):b.localMode.indent?b.localMode.indent(b.localState,c):a.Pass},innerMode:function(a){return{state:a.localState||a.htmlState,mode:a.localMode||j}}}},"xml","javascript","css"),a.defineMIME("text/html","htmlmixed")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a):a(CodeMirror)}(function(a){"use strict";a.defineMode("wordpresspost",function(b,c){function d(a,b){b.isInShortcode=!0;var c=h.token(a,b.shortcodeState),d=b.shortcodeState.tokenize.isInText,f=b.shortcodeState.tokenize.isInEscape;if(d)b.token=e;else if(f&&/\]/.test(a.current())){var g=a.current(),i=g.search(/\]/);a.backUp(g.length-i-1),"]"!==a.peek()&&(b.token=e)}return c}function e(b,c){c.isInShortcode=!1;var e=g.token(b,c.htmlmixedState),i=c.htmlmixedState.htmlState.tokenize.isInText;if(i&&/\[/.test(b.current())&&!c.htmlmixedState.localState&&null===e){var j=b.current(),k=j.search(/\[/);b.backUp(j.length-k),null==c.shortcodeState&&(c.shortcodeState=a.startState(h,g.indent(c.htmlmixedState,""))),c.token=d}else i&&/<!\-\-more|<!\-\-noteaser\-\->/.test(b.current())&&!c.htmlmixedState.localState&&"comment"===e&&(b.backUp(b.current().length),c.token=f);return e}function f(a,b){return a.match("<!--more")?"meta":a.match("-->")||a.match("<!--noteaser-->")?(b.token=e,"meta"):(a.eatWhile(/[^\-\/]/),"string")}var g=a.getMode(b,{name:"htmlmixed",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag}),h=a.getMode(b,{name:"shortcode",multilineTagIndentFactor:c.multilineTagIndentFactor,multilineTagIndentPastTag:c.multilineTagIndentPastTag});return{startState:function(){var a=g.startState();return{token:e,isInShortcode:!1,shortcodeState:null,htmlmixedState:a}},copyState:function(b){var c;return b.shortcodeState&&(c=a.copyState(h,b.shortcodeState)),{token:b.token,shortcodeState:c,htmlmixedState:a.copyState(g,b.htmlmixedState)}},token:function(a,b){return b.token(a,b)},indent:function(b,c){return b.isInShortcode?g.indent(b.htmlmixedState,c):b.isInShortcode?a.Pass:h.indent(b.shortcodeState,c)},innerMode:function(a){return a.isInShortcode?{state:a.shortcodeState,mode:h}:{state:a.htmlmixedState,mode:g}}}},"htmlmixed","shortcode")}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";var b={allowUnquoted:!0,allowMissing:!0,caseFold:!0};a.defineMode("shortcode",function(a,c){function d(a,b){var c=a.next();return"["===c?"["===a.peek()?(b.tokenize=e,"comment"):/\s/.test(a.peek())?null:(x=a.eat("/")?"closeTag":"openTag",b.tokenize=f,"tag bracket"):(a.eatWhile(/[^\[]/),null)}function e(a,b){var c=function(a,b){return a.next(),b.tokenize=d,"comment"};c.isInEscape=!0;var e=a.next();return"]"===e&&"]"===a.peek()&&(b.tokenize=c),a.eatWhile(/[^\]]/),null}function f(a,b){var c=a.next();if("]"===c||"/"===c&&a.eat("]"))return b.tokenize=d,x="endTag","tag bracket";if("="===c)return x="equals",null;if("["===c){b.tokenize=d,b.state=j,b.tagName=b.tagStart=null;var e=b.tokenize(a,b);return e?e+" tag error":"tag error"}return/[\'\"]/.test(c)?(b.tokenize=g(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.match(/^[^\s\u00a0=\[\]\"\']*[^\s\u00a0=\[\]\"\'\/]/),"word")}function g(a){var b=function(b,c){var d=b.next();return d===a?(c.tokenize=f,"string"):/[\[\]]/.test(d)?"string error":(b.eatWhile(/[^\[\]\'\"]/),"string")};return b.isInAttribute=!0,b}function h(a,b,c){this.tagHistory=[b],a.context&&(this.tagHistory=this.tagHistory.concat(a.context.tagHistory)),this.prev=a.context,this.tagName=b,this.indent=a.indented,this.startOfLine=c}function i(a){a.context&&(a.context=a.context.prev)}function j(a,b,c){return"openTag"===a?(c.tagStart=b.column(),k):"closeTag"===a?l:j}function k(a,b,c){if("word"===a){var d=b.current();return/[\[\]\/\'\"<>&]/.test(d)?y="error":(c.tagName=b.current(),y="tag"),o}return y="error",k}function l(a,b,c){if("word"===a){var d=b.current();if(c.context&&c.context.tagName===d||t.matchClosing===!1)return y="tag",m;if(c.context&&c.context.tagHistory.indexOf(d)>0){for(var e=c.context.tagHistory.indexOf(d),f=0;e>f;f++)i(c);return y="tag",m}return y="tag error",n}return y="error",n}function m(a,b,c){return"endTag"!==a?(y="error",m):(i(c),j)}function n(a,b,c){return y="error",m(a,b,c)}function o(a,b,c){if("word"===a)return y=/^[a-z0-9_\-]+$/i.test(b.current())?"attribute":"error",p;if("endTag"===a){var d=c.tagName,e=c.tagStart;return c.tagName=c.tagStart=null,c.context=new h(c,d,e===c.indented),j}return y="error",o}function p(a,b,c){return"equals"===a?q:(t.allowMissing||(y="error"),o(a,b,c))}function q(a,b,c){return"string"===a?r:"word"===a&&t.allowUnquoted?(y="string",o):(y="error",o(a,b,c))}function r(a,b,c){return"string"===a?r:o(a,b,c)}var s=a.indentUnit,t={},u=b;for(var v in u)t[v]=u[v];for(var w in c)t[w]=c[w];var x,y;return d.isInText=!0,e.isInEscape=!0,{startState:function(a){var b={tokenize:d,state:j,indented:a||0,tagName:null,tagStart:null,context:null};return null!=a&&(b.baseIndent=a),b},token:function(a,b){if(!b.tagName&&a.sol()&&(b.indented=a.indentation()),a.eatSpace())return null;x=null;var c=b.tokenize(a,b);return(c||x)&&"comment"!==c&&(y=null,b.state=b.state(x||c,a,b),y&&(c="error"===y?c+" error":y)),c},indent:function(a,b,c){var e=a.context;if(a.tokenize.isInAttribute)return a.tagStart===a.indented?a.stringStartCol+1:a.indented+s;if(a.tokenize!==f&&a.tokenize!==d)return c?c.match(/^(\s*)/)[0].length:0;if(a.tagName)return t.multilineTagIndentPastTag!==!1?a.tagStart+a.tagName.length+2:a.tagStart+s*(t.multilineTagIndentFactor||1);var g=b&&/^\[(\/)?([\w_:\.-]*)/.exec(b);if(g&&g[1])for(;e;){if(e.tagName===g[2]){e=e.prev;break}break}for(;e&&e.prev&&!e.startOfLine;)e=e.prev;return e?e.indent+s:a.baseIndent||0},skipAttribute:function(a){a.state===q&&(a.state=o)}}})});var CodeMirrorCSS=CodeMirrorCSS||{};CodeMirrorCSS.Themes=["3024-day","3024-night","abcdef","ambiance-mobile","ambiance","base16-dark","base16-light","bespin","blackboard","cobalt","colorforth","dracula","eclipse","elegant","erlang-dark","hopscotch","icecoder","isotope","lesser-dark","liquibyte","material","mbo","mdn-like","midnight","monokai","neat","neo","night","paraiso-dark","paraiso-light","pastel-on-dark","railscasts","rubyblue","seti","solarized","the-matrix","tomorrow-night-bright","tomorrow-night-eighties","ttcn","twilight","vibrant-ink","xq-dark","xq-light","yeti","zenburn"],function(a,b,c,d,e,f,g){"use strict";function h(){var h=null,i=0,j=0,k=a.getElementById("content"),l=null!=a.getElementById("post_ID")?a.getElementById("post_ID").value:0,m=a.getElementById("content-html"),n=a.getElementById("content-tmce"),o=-1!==a.cookie.indexOf("editor%3Dtinymce"),p=null!=a.getElementById("content-tmce"),q=a.getElementById("ed_toolbar"),r=a.getElementById("wp-content-editor-container"),s="heshFullscreen",t=null!=a.getElementById("save-post")?a.getElementById("save-post"):a.getElementById("publish"),u={mode:"wordpresspost",tabMode:"indent",theme:"material",lineNumbers:!0,matchBrackets:!0,indentUnit:4,indentWithTabs:!0,enterMode:"keep",lineWrapping:!0,autofocus:!0,styleActiveLine:!0,electricChars:!1,extraKeys:{F11:function(){I()},Esc:function(){I()},"Ctrl-S":function(){t.click()},"Cmd-S":function(){t.click()}}},v=function(b){var c="; "+a.cookie,d=c.split("; "+b+"=");return 2===d.length?d.pop().split(";").shift():void 0},w=v("hesh_plugin_font_size")||"12";u.theme=v("hesh_plugin_theme")||"material";var x,y,z=function(){h=c.fromTextArea(k,u),D(),h.on("change",function(){h.save(),clearTimeout(y),y=setTimeout(C,3e3)}),h.on("cursorActivity",function(){var b=h.getCursor();a.cookie="hesh_plugin_pos="+l+","+b.line+","+b.ch});var d=(v("hesh_plugin_pos")||"0,0,0").split(",");l===d[0]&&h.setCursor(parseFloat(d[1]),parseFloat(d[2])),H(),N(),i=1,A(),b.addEventListener("resize",B),b.setTimeout(C,3e3)},A=function(){var b=a.querySelector(".CodeMirror");b.style.marginTop=q.clientHeight+"px"},B=function(){clearTimeout(x),x=setTimeout(A,250)},C=function(){null!==a.querySelector(".CodeMirror")&&(a.querySelector("textarea.wp-editor-area").style.height=a.querySelector(".CodeMirror").clientHeight+"px")},D=function(){if(!j){var b={more:["<!--more-->",""],comment:["<!-- "," -->"],code:["<code>","</code>"],li:["<li>","</li>"],ol:["<ol>","</ol>"],ul:["<ul>","</ul>"],img:['<img src="$" alt="','">',"Enter the URL of the image"],ins:["<ins>","</ins>"],del:["<del>","</del>"],link:['<a href="$">',"</a>","Enter the destination URL"],blockquote:["\r<blockquote>","</blockquote>\r"],h3:["<h3>","</h3>"],h2:["<h2>","</h2>"],h1:["<h1>","</h1>"],p:["<p>","</p>"],i:["<em>","</em>"],b:["<strong>","</strong>"]};for(var c in b){var d=b[c],e=d[2]?'data-prompt="'+d[2]+'"':"";q.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_'+c+"\" data-start='"+d[0]+"' data-end='"+d[1]+"' "+e+' class="ed_button button cm_ed_button" value="'+c+'">'),a.getElementById("cm_content_"+c).onclick=E}K(),M(),J(),j=1}},E=function(){var c=h.getCursor("start"),d=this.getAttribute("data-start"),f=this.getAttribute("data-end"),g=this.getAttribute("data-prompt")||null,i=h.getSelection();"cm_content_link"===this.id&&e?(e.open(),a.getElementById("wp-link-submit").onclick=function(){var a=e.getAttrs();d='<a href="'+a.href+'" title="'+a.title+'" target="'+a.target+'">',h.replaceSelection(d+i+"</a>"),e.close(),h.setCursor(c.line,c.ch+d.length),h.focus()}):(g&&(d=d.replace("$",b.prompt(g,""))),h.replaceSelection(d+i+f),h.setCursor(c.line,c.ch+d.length),h.focus())},F=function(){i&&(g.switchto&&g.switchto(this),h.toTextArea(),m.onclick=G,i=0,b.removeEventListener("resize",B))},G=function(){i||(g.switchto&&g.switchto(this),b.setTimeout(z,300),n.onclick=F)},H=function(){var c=a.querySelector(".CodeMirror"),d=a.createElement("div"),e=a.getElementById("wp-content-wrap"),f=c.getBoundingClientRect().top,g=function(d){d=d||b.event;var e=(d.pageY||d.clientY+a.body.scrollTop+a.documentElement.scrollTop)-f;c.style.height=(e>10?e:10)+"px",b.getSelection().removeAllRanges()};d.className="content-resize-handle",e.appendChild(d),d.onmousedown=function(){a.onmousemove=g},a.onmouseup=function(){a.onmousemove=null}},I=function(){r.className=-1===r.className.indexOf(s)?r.className+" "+s:r.className.replace(s,"");var b=a.getElementById("cm_content_fullscreen");b.value="fullscreen"===b.value?"exit fullscreen":"fullscreen",h.focus(),A()},J=function(){q.insertAdjacentHTML("afterbegin",'<input type="button" id="cm_content_fullscreen" class="ed_button button" title="Toggle fullscreen mode" value="fullscreen">'),a.getElementById("cm_content_fullscreen").onclick=I},K=function(){var b='<select id="cm_select_theme" class="button" title="Change editor colour scheme">';for(var c in d.Themes){var e=d.Themes[c],f=e===u.theme?" selected ":"";b+='<option value="'+e+'"'+f+">"+e+"</option>"}b+="</select>",q.insertAdjacentHTML("afterbegin",b),a.getElementById("cm_select_theme").onchange=function(){var b=this.value;h.setOption("theme",b),a.cookie="hesh_plugin_theme="+b}},L=function(){a.getElementsByClassName("CodeMirror")[0].style.fontSize=w+"px",h.refresh()},M=function(){q.insertAdjacentHTML("afterbegin",'<select id="cm_font_size" class="button"><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="16">16</option><option value="18">18</option><option value="20">20</option><option value="22">22</option></select>');var b=a.getElementById("cm_font_size");L(),b.value=w,b.onchange=function(){w=this.value,L(),a.cookie="hesh_plugin_font_size="+w}},N=function(){if(!b.send_to_editor_wp){var a=function(a){i&&"content"===f?(h.replaceSelection(a),h.save()):b.send_to_editor_wp(a)};b.send_to_editor_wp=a}};o&&p?m.onclick=G:(z(),p?n.onclick=F:a.body.className+=" visual-editor-is-disabled")}"complete"!==a.readyState?b.addEventListener?b.addEventListener("load",h,!1):b.attachEvent&&b.attachEvent("onload",h):h()}(document,window,window.CodeMirror,CodeMirrorCSS,window.wpLink,window.wpActiveEditor,window.switchEditors);
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,16 +1,16 @@
|
|
1 |
=== HTML Editor Syntax Highlighter ===
|
2 |
-
Contributors: nixdns
|
3 |
Donate link: https://www.paypal.me/mukhortov/5
|
4 |
-
Tags: html editor,
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 1.
|
8 |
|
9 |
Add syntax highlighting to the HTML editor.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
-
|
14 |
|
15 |
= Features =
|
16 |
|
@@ -30,6 +30,25 @@ If you like the plugin, please [donate](https://www.paypal.me/mukhortov/5) and l
|
|
30 |
|
31 |
== Changelog ==
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
= 1.6.9 =
|
34 |
* Fixed issues with switching editor modes in WP 4.3
|
35 |
|
@@ -58,11 +77,11 @@ If you like the plugin, please [donate](https://www.paypal.me/mukhortov/5) and l
|
|
58 |
= 1.6.0 =
|
59 |
* You can change font size in the editor
|
60 |
* Fixed issue with restoring cursor position
|
61 |
-
* Updated CodeMirror library
|
62 |
* Some minor improvements
|
63 |
|
64 |
= 1.5.0 =
|
65 |
-
* Updated CodeMirror library
|
66 |
* Some minor improvements
|
67 |
|
68 |
= 1.4.8 =
|
@@ -98,11 +117,11 @@ If you like the plugin, please [donate](https://www.paypal.me/mukhortov/5) and l
|
|
98 |
= 1.4.0 =
|
99 |
* New fullscreen mode
|
100 |
* Remembers tab state
|
101 |
-
* Editor resize handler
|
102 |
* Code refactoring and minification for better loading performance
|
103 |
|
104 |
= 1.3.2 =
|
105 |
-
* Updated CodeMirror library
|
106 |
* Increased loading performance
|
107 |
* Match brackets
|
108 |
|
1 |
=== HTML Editor Syntax Highlighter ===
|
2 |
+
Contributors: nixdns, James Bradford
|
3 |
Donate link: https://www.paypal.me/mukhortov/5
|
4 |
+
Tags: editor, html editor, text editor, post editor, syntax, highlighting, highlighter, syntax highlighting, syntax highlighter, codemirror, code, code highlighter, code coloring
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.5.2
|
7 |
+
Stable tag: 1.7.0
|
8 |
|
9 |
Add syntax highlighting to the HTML editor.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
+
Add syntax highlighting to the Post/Page HTML editor.
|
14 |
|
15 |
= Features =
|
16 |
|
30 |
|
31 |
== Changelog ==
|
32 |
|
33 |
+
= 1.7.0 =
|
34 |
+
* Ctrl-S / Cmd-S saving will now select "Save Draft" if the post has not been published yet
|
35 |
+
* Switched to an [npm](https://www.npmjs.com/) and [grunt.js](http://gruntjs.com/) based build so new versions of CodeMirror can be applied easier
|
36 |
+
* Updated CodeMirror to its latest version
|
37 |
+
* Fixed FireFox bug: `<select>` dropdown would not display due to `::active` state `transform` property
|
38 |
+
* Fixed bug: toolbar covering text at small screen width
|
39 |
+
* Fixed bug: `switchEditors is undefined`
|
40 |
+
* Updated Css for wp 4.5
|
41 |
+
* Added all available CodeMirror themes
|
42 |
+
* Added syntax highlighting:
|
43 |
+
- for WordPress shortcodes
|
44 |
+
- for `<!--more-->` tags and their variants
|
45 |
+
- _NEW_ CodeMirror modes: `shortcode.js` & `wordpresspost.js`
|
46 |
+
* Now calling `hesh.js` in an anonymous wrapper so it won't pollute the global namespace
|
47 |
+
* Now initializing `hesh.js` in an async compliant way
|
48 |
+
* Refactored php to enqueue javascript in the WordPress friendly way
|
49 |
+
* Tested with WordPress 4.5.2
|
50 |
+
* Tested in all modern desktop browsers on OSX and Windows 10
|
51 |
+
|
52 |
= 1.6.9 =
|
53 |
* Fixed issues with switching editor modes in WP 4.3
|
54 |
|
77 |
= 1.6.0 =
|
78 |
* You can change font size in the editor
|
79 |
* Fixed issue with restoring cursor position
|
80 |
+
* Updated CodeMirror library
|
81 |
* Some minor improvements
|
82 |
|
83 |
= 1.5.0 =
|
84 |
+
* Updated CodeMirror library
|
85 |
* Some minor improvements
|
86 |
|
87 |
= 1.4.8 =
|
117 |
= 1.4.0 =
|
118 |
* New fullscreen mode
|
119 |
* Remembers tab state
|
120 |
+
* Editor resize handler
|
121 |
* Code refactoring and minification for better loading performance
|
122 |
|
123 |
= 1.3.2 =
|
124 |
+
* Updated CodeMirror library
|
125 |
* Increased loading performance
|
126 |
* Match brackets
|
127 |
|