ace-rails-ap 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +1 -1
  3. data/lib/ace/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/ace/ace.js +6911 -5290
  5. data/vendor/assets/javascripts/ace/ext-chromevox.js +537 -0
  6. data/vendor/assets/javascripts/ace/ext-elastic_tabstops_lite.js +301 -0
  7. data/vendor/assets/javascripts/ace/ext-emmet.js +1109 -0
  8. data/vendor/assets/javascripts/ace/ext-keybinding_menu.js +207 -0
  9. data/vendor/assets/javascripts/ace/ext-language_tools.js +1665 -0
  10. data/vendor/assets/javascripts/ace/ext-modelist.js +168 -0
  11. data/vendor/assets/javascripts/ace/ext-old_ie.js +500 -0
  12. data/vendor/assets/javascripts/ace/ext-options.js +252 -0
  13. data/vendor/assets/javascripts/ace/ext-searchbox.js +421 -0
  14. data/vendor/assets/javascripts/ace/ext-settings_menu.js +632 -0
  15. data/vendor/assets/javascripts/ace/ext-spellcheck.js +68 -0
  16. data/vendor/assets/javascripts/ace/ext-split.js +271 -0
  17. data/vendor/assets/javascripts/ace/ext-static_highlight.js +178 -0
  18. data/vendor/assets/javascripts/ace/ext-statusbar.js +47 -0
  19. data/vendor/assets/javascripts/ace/ext-textarea.js +478 -0
  20. data/vendor/assets/javascripts/ace/ext-themelist.js +86 -0
  21. data/vendor/assets/javascripts/ace/ext-whitespace.js +206 -0
  22. data/vendor/assets/javascripts/ace/keybinding-emacs.js +822 -131
  23. data/vendor/assets/javascripts/ace/keybinding-vim.js +382 -258
  24. data/vendor/assets/javascripts/ace/mode-abap.js +261 -0
  25. data/vendor/assets/javascripts/ace/mode-actionscript.js +257 -0
  26. data/vendor/assets/javascripts/ace/mode-ada.js +118 -0
  27. data/vendor/assets/javascripts/ace/mode-asciidoc.js +373 -0
  28. data/vendor/assets/javascripts/ace/mode-assembly_x86.js +217 -0
  29. data/vendor/assets/javascripts/ace/mode-autohotkey.js +225 -0
  30. data/vendor/assets/javascripts/ace/mode-batchfile.js +213 -0
  31. data/vendor/assets/javascripts/ace/mode-c9search.js +144 -124
  32. data/vendor/assets/javascripts/ace/mode-c_cpp.js +296 -254
  33. data/vendor/assets/javascripts/ace/mode-clojure.js +113 -177
  34. data/vendor/assets/javascripts/ace/mode-cobol.js +125 -0
  35. data/vendor/assets/javascripts/ace/mode-coffee.js +152 -235
  36. data/vendor/assets/javascripts/ace/mode-coldfusion.js +823 -835
  37. data/vendor/assets/javascripts/ace/mode-csharp.js +325 -187
  38. data/vendor/assets/javascripts/ace/mode-css.js +583 -297
  39. data/vendor/assets/javascripts/ace/mode-curly.js +2423 -0
  40. data/vendor/assets/javascripts/ace/mode-d.js +492 -0
  41. data/vendor/assets/javascripts/ace/mode-dart.js +993 -0
  42. data/vendor/assets/javascripts/ace/mode-diff.js +124 -204
  43. data/vendor/assets/javascripts/ace/mode-django.js +2448 -0
  44. data/vendor/assets/javascripts/ace/mode-dot.js +361 -0
  45. data/vendor/assets/javascripts/ace/mode-ejs.js +2817 -0
  46. data/vendor/assets/javascripts/ace/mode-erlang.js +987 -0
  47. data/vendor/assets/javascripts/ace/mode-forth.js +280 -0
  48. data/vendor/assets/javascripts/ace/mode-ftl.js +1061 -0
  49. data/vendor/assets/javascripts/ace/mode-glsl.js +313 -275
  50. data/vendor/assets/javascripts/ace/mode-golang.js +268 -275
  51. data/vendor/assets/javascripts/ace/mode-groovy.js +347 -492
  52. data/vendor/assets/javascripts/ace/mode-haml.js +498 -0
  53. data/vendor/assets/javascripts/ace/mode-handlebars.js +2433 -0
  54. data/vendor/assets/javascripts/ace/mode-haskell.js +362 -0
  55. data/vendor/assets/javascripts/ace/mode-haxe.js +226 -202
  56. data/vendor/assets/javascripts/ace/mode-html.js +1099 -802
  57. data/vendor/assets/javascripts/ace/mode-html_completions.js +309 -0
  58. data/vendor/assets/javascripts/ace/mode-html_ruby.js +2822 -0
  59. data/vendor/assets/javascripts/ace/mode-ini.js +185 -0
  60. data/vendor/assets/javascripts/ace/mode-jack.js +653 -0
  61. data/vendor/assets/javascripts/ace/mode-jade.js +2081 -0
  62. data/vendor/assets/javascripts/ace/mode-java.js +339 -488
  63. data/vendor/assets/javascripts/ace/mode-javascript.js +342 -478
  64. data/vendor/assets/javascripts/ace/mode-json.js +215 -178
  65. data/vendor/assets/javascripts/ace/mode-jsoniq.js +2761 -0
  66. data/vendor/assets/javascripts/ace/mode-jsp.js +1553 -0
  67. data/vendor/assets/javascripts/ace/mode-jsx.js +325 -289
  68. data/vendor/assets/javascripts/ace/mode-julia.js +286 -0
  69. data/vendor/assets/javascripts/ace/mode-latex.js +141 -46
  70. data/vendor/assets/javascripts/ace/mode-less.js +493 -151
  71. data/vendor/assets/javascripts/ace/mode-liquid.js +594 -656
  72. data/vendor/assets/javascripts/ace/mode-lisp.js +137 -0
  73. data/vendor/assets/javascripts/ace/mode-livescript.js +288 -0
  74. data/vendor/assets/javascripts/ace/mode-logiql.js +669 -0
  75. data/vendor/assets/javascripts/ace/mode-lsl.js +890 -0
  76. data/vendor/assets/javascripts/ace/mode-lua.js +274 -368
  77. data/vendor/assets/javascripts/ace/mode-luapage.js +1331 -1107
  78. data/vendor/assets/javascripts/ace/mode-lucene.js +64 -0
  79. data/vendor/assets/javascripts/ace/mode-makefile.js +332 -0
  80. data/vendor/assets/javascripts/ace/mode-markdown.js +1303 -948
  81. data/vendor/assets/javascripts/ace/mode-matlab.js +230 -0
  82. data/vendor/assets/javascripts/ace/mode-mushcode.js +705 -0
  83. data/vendor/assets/javascripts/ace/mode-mushcode_high_rules.js +569 -0
  84. data/vendor/assets/javascripts/ace/mode-mysql.js +185 -0
  85. data/vendor/assets/javascripts/ace/mode-nix.js +935 -0
  86. data/vendor/assets/javascripts/ace/mode-objectivec.js +699 -0
  87. data/vendor/assets/javascripts/ace/mode-ocaml.js +44 -63
  88. data/vendor/assets/javascripts/ace/mode-pascal.js +233 -0
  89. data/vendor/assets/javascripts/ace/mode-perl.js +116 -189
  90. data/vendor/assets/javascripts/ace/mode-pgsql.js +886 -500
  91. data/vendor/assets/javascripts/ace/mode-php.js +1158 -380
  92. data/vendor/assets/javascripts/ace/mode-plain_text.js +56 -0
  93. data/vendor/assets/javascripts/ace/mode-powershell.js +222 -167
  94. data/vendor/assets/javascripts/ace/mode-prolog.js +354 -0
  95. data/vendor/assets/javascripts/ace/mode-properties.js +100 -0
  96. data/vendor/assets/javascripts/ace/mode-protobuf.js +885 -0
  97. data/vendor/assets/javascripts/ace/mode-python.js +99 -201
  98. data/vendor/assets/javascripts/ace/mode-r.js +337 -0
  99. data/vendor/assets/javascripts/ace/mode-rdoc.js +210 -0
  100. data/vendor/assets/javascripts/ace/mode-rhtml.js +2663 -0
  101. data/vendor/assets/javascripts/ace/mode-ruby.js +262 -136
  102. data/vendor/assets/javascripts/ace/mode-rust.js +245 -0
  103. data/vendor/assets/javascripts/ace/mode-sass.js +443 -0
  104. data/vendor/assets/javascripts/ace/mode-scad.js +225 -240
  105. data/vendor/assets/javascripts/ace/mode-scala.js +340 -494
  106. data/vendor/assets/javascripts/ace/mode-scheme.js +143 -0
  107. data/vendor/assets/javascripts/ace/mode-scss.js +499 -157
  108. data/vendor/assets/javascripts/ace/mode-sh.js +180 -110
  109. data/vendor/assets/javascripts/ace/mode-sjs.js +1154 -0
  110. data/vendor/assets/javascripts/ace/mode-snippets.js +198 -0
  111. data/vendor/assets/javascripts/ace/mode-soy_template.js +2707 -0
  112. data/vendor/assets/javascripts/ace/mode-space.js +160 -0
  113. data/vendor/assets/javascripts/ace/mode-sql.js +48 -69
  114. data/vendor/assets/javascripts/ace/mode-stylus.js +447 -0
  115. data/vendor/assets/javascripts/ace/mode-svg.js +552 -605
  116. data/vendor/assets/javascripts/ace/mode-tcl.js +139 -98
  117. data/vendor/assets/javascripts/ace/mode-tex.js +187 -0
  118. data/vendor/assets/javascripts/ace/mode-textile.js +29 -40
  119. data/vendor/assets/javascripts/ace/mode-tmsnippet.js +200 -0
  120. data/vendor/assets/javascripts/ace/mode-toml.js +177 -0
  121. data/vendor/assets/javascripts/ace/mode-twig.js +2228 -0
  122. data/vendor/assets/javascripts/ace/mode-typescript.js +1018 -0
  123. data/vendor/assets/javascripts/ace/mode-vbscript.js +250 -0
  124. data/vendor/assets/javascripts/ace/mode-velocity.js +1621 -0
  125. data/vendor/assets/javascripts/ace/mode-verilog.js +127 -0
  126. data/vendor/assets/javascripts/ace/mode-vhdl.js +139 -0
  127. data/vendor/assets/javascripts/ace/mode-xml.js +350 -242
  128. data/vendor/assets/javascripts/ace/mode-xquery.js +2490 -300
  129. data/vendor/assets/javascripts/ace/mode-yaml.js +146 -45
  130. data/vendor/assets/javascripts/ace/theme-ambiance.js +202 -0
  131. data/vendor/assets/javascripts/ace/theme-chaos.js +179 -0
  132. data/vendor/assets/javascripts/ace/theme-chrome.js +97 -153
  133. data/vendor/assets/javascripts/ace/theme-clouds.js +78 -119
  134. data/vendor/assets/javascripts/ace/theme-clouds_midnight.js +79 -120
  135. data/vendor/assets/javascripts/ace/theme-cobalt.js +89 -140
  136. data/vendor/assets/javascripts/ace/theme-crimson_editor.js +93 -145
  137. data/vendor/assets/javascripts/ace/theme-dawn.js +84 -143
  138. data/vendor/assets/javascripts/ace/theme-dreamweaver.js +99 -162
  139. data/vendor/assets/javascripts/ace/theme-eclipse.js +78 -111
  140. data/vendor/assets/javascripts/ace/theme-github.js +70 -121
  141. data/vendor/assets/javascripts/ace/theme-idle_fingers.js +75 -134
  142. data/vendor/assets/javascripts/ace/theme-kr.js +135 -0
  143. data/vendor/assets/javascripts/ace/theme-merbivore.js +80 -143
  144. data/vendor/assets/javascripts/ace/theme-merbivore_soft.js +81 -149
  145. data/vendor/assets/javascripts/ace/theme-mono_industrial.js +87 -146
  146. data/vendor/assets/javascripts/ace/theme-monokai.js +88 -146
  147. data/vendor/assets/javascripts/ace/theme-pastel_on_dark.js +82 -142
  148. data/vendor/assets/javascripts/ace/theme-solarized_dark.js +83 -144
  149. data/vendor/assets/javascripts/ace/theme-solarized_light.js +76 -133
  150. data/vendor/assets/javascripts/ace/theme-terminal.js +145 -0
  151. data/vendor/assets/javascripts/ace/theme-textmate.js +101 -158
  152. data/vendor/assets/javascripts/ace/theme-tomorrow.js +89 -163
  153. data/vendor/assets/javascripts/ace/theme-tomorrow_night.js +89 -163
  154. data/vendor/assets/javascripts/ace/theme-tomorrow_night_blue.js +89 -165
  155. data/vendor/assets/javascripts/ace/theme-tomorrow_night_bright.js +101 -162
  156. data/vendor/assets/javascripts/ace/theme-tomorrow_night_eighties.js +90 -160
  157. data/vendor/assets/javascripts/ace/theme-twilight.js +87 -158
  158. data/vendor/assets/javascripts/ace/theme-vibrant_ink.js +75 -140
  159. data/vendor/assets/javascripts/ace/theme-xcode.js +120 -0
  160. data/vendor/assets/javascripts/ace/worker-coffee.js +3049 -2665
  161. data/vendor/assets/javascripts/ace/worker-css.js +1779 -4376
  162. data/vendor/assets/javascripts/ace/worker-javascript.js +8701 -9008
  163. data/vendor/assets/javascripts/ace/worker-json.js +709 -1340
  164. data/vendor/assets/javascripts/ace/worker-lua.js +3525 -0
  165. data/vendor/assets/javascripts/ace/worker-php.js +6893 -0
  166. data/vendor/assets/javascripts/ace/worker-xquery.js +19924 -64507
  167. metadata +100 -17
@@ -0,0 +1,2081 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2012, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ *
30
+ * Contributor(s):
31
+ *
32
+ * Garen J. Torikian <gjtorikian @ gmail DOT com>
33
+ *
34
+ * ***** END LICENSE BLOCK ***** */
35
+
36
+ define('ace/mode/jade', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jade_highlight_rules', 'ace/mode/folding/coffee'], function(require, exports, module) {
37
+
38
+
39
+ var oop = require("../lib/oop");
40
+ var TextMode = require("./text").Mode;
41
+ var Tokenizer = require("../tokenizer").Tokenizer;
42
+ var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
43
+ var FoldMode = require("./folding/coffee").FoldMode;
44
+
45
+ var Mode = function() {
46
+ this.HighlightRules = JadeHighlightRules;
47
+
48
+ this.foldingRules = new FoldMode();
49
+ };
50
+ oop.inherits(Mode, TextMode);
51
+
52
+ (function() {
53
+ this.lineCommentStart = "//";
54
+ this.$id = "ace/mode/jade";
55
+ }).call(Mode.prototype);
56
+
57
+ exports.Mode = Mode;
58
+ });
59
+
60
+ define('ace/mode/jade_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/markdown_highlight_rules', 'ace/mode/scss_highlight_rules', 'ace/mode/less_highlight_rules', 'ace/mode/coffee_highlight_rules', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
61
+
62
+
63
+ var oop = require("../lib/oop");
64
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
65
+ var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
66
+ var SassHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
67
+ var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
68
+ var CoffeeHighlightRules = require("./coffee_highlight_rules").CoffeeHighlightRules;
69
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
70
+
71
+ function mixin_embed(tag, prefix) {
72
+ return {
73
+ token : "entity.name.function.jade",
74
+ regex : "^\\s*\\:" + tag,
75
+ next : prefix + "start"
76
+ };
77
+ }
78
+
79
+ var JadeHighlightRules = function() {
80
+
81
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
82
+ "u[0-9a-fA-F]{4}|" + // unicode
83
+ "[0-2][0-7]{0,2}|" + // oct
84
+ "3[0-6][0-7]?|" + // oct
85
+ "37[0-7]?|" + // oct
86
+ "[4-7][0-7]?|" + //oct
87
+ ".)";
88
+
89
+ this.$rules =
90
+ {
91
+ "start": [
92
+ {
93
+ token: "keyword.control.import.include.jade",
94
+ regex: "\\s*\\binclude\\b"
95
+ },
96
+ {
97
+ token: "keyword.other.doctype.jade",
98
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
99
+ },
100
+ {
101
+ token : "punctuation.section.comment",
102
+ regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)"
103
+ },
104
+ {
105
+ onMatch: function(value, currentState, stack) {
106
+ stack.unshift(this.next, value.length - 2, currentState);
107
+ return "comment";
108
+ },
109
+ regex: /^\s*\/\//,
110
+ next: "comment_block"
111
+ },
112
+ mixin_embed("markdown", "markdown-"),
113
+ mixin_embed("sass", "sass-"),
114
+ mixin_embed("less", "less-"),
115
+ mixin_embed("coffee", "coffee-"),
116
+ {
117
+ token: [ "storage.type.function.jade",
118
+ "entity.name.function.jade",
119
+ "punctuation.definition.parameters.begin.jade",
120
+ "variable.parameter.function.jade",
121
+ "punctuation.definition.parameters.end.jade"
122
+ ],
123
+ regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))"
124
+ },
125
+ {
126
+ token: [ "storage.type.function.jade", "entity.name.function.jade"],
127
+ regex: "^(\\s*mixin)( [\\w\\-]+)"
128
+ },
129
+ {
130
+ token: "source.js.embedded.jade",
131
+ regex: "^\\s*(?:-|=|!=)",
132
+ next: "js-start"
133
+ },
134
+ {
135
+ token: "string.interpolated.jade",
136
+ regex: "[#!]\\{[^\\}]+\\}"
137
+ },
138
+ {
139
+ token: "meta.tag.any.jade",
140
+ regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/,
141
+ next: "tag_single"
142
+ },
143
+ {
144
+ token: "suport.type.attribute.id.jade",
145
+ regex: "#\\w+"
146
+ },
147
+ {
148
+ token: "suport.type.attribute.class.jade",
149
+ regex: "\\.\\w+"
150
+ },
151
+ {
152
+ token: "punctuation",
153
+ regex: "\\s*(?:\\()",
154
+ next: "tag_attributes"
155
+ }
156
+ ],
157
+ "comment_block": [
158
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
159
+ if (value.length <= stack[1]) {
160
+ stack.shift();
161
+ stack.shift();
162
+ this.next = stack.shift();
163
+ return "text";
164
+ } else {
165
+ this.next = "";
166
+ return "comment";
167
+ }
168
+ }, next: "start"},
169
+ {defaultToken: "comment"}
170
+ ],
171
+ "tag_single": [
172
+ {
173
+ token: "entity.other.attribute-name.class.jade",
174
+ regex: "\\.[\\w-]+"
175
+ },
176
+ {
177
+ token: "entity.other.attribute-name.id.jade",
178
+ regex: "#[\\w-]+"
179
+ },
180
+ {
181
+ token: ["text", "punctuation"],
182
+ regex: "($)|((?!\\.|#|=|-))",
183
+ next: "start"
184
+ }
185
+ ],
186
+ "tag_attributes": [
187
+ {
188
+ token : "string",
189
+ regex : "'(?=.)",
190
+ next : "qstring"
191
+ },
192
+ {
193
+ token : "string",
194
+ regex : '"(?=.)',
195
+ next : "qqstring"
196
+ },
197
+ {
198
+ token: "entity.other.attribute-name.jade",
199
+ regex: "\\b[a-zA-Z\\-:]+"
200
+ },
201
+ {
202
+ token: ["entity.other.attribute-name.jade", "punctuation"],
203
+ regex: "\\b([a-zA-Z:\\.-]+)(=)",
204
+ next: "attribute_strings"
205
+ },
206
+ {
207
+ token: "punctuation",
208
+ regex: "\\)",
209
+ next: "start"
210
+ }
211
+ ],
212
+ "attribute_strings": [
213
+ {
214
+ token : "string",
215
+ regex : "'(?=.)",
216
+ next : "qstring"
217
+ },
218
+ {
219
+ token : "string",
220
+ regex : '"(?=.)',
221
+ next : "qqstring"
222
+ }
223
+ ],
224
+ "qqstring" : [
225
+ {
226
+ token : "constant.language.escape",
227
+ regex : escapedRe
228
+ }, {
229
+ token : "string",
230
+ regex : '[^"\\\\]+'
231
+ }, {
232
+ token : "string",
233
+ regex : "\\\\$",
234
+ next : "qqstring"
235
+ }, {
236
+ token : "string",
237
+ regex : '"|$',
238
+ next : "tag_attributes"
239
+ }
240
+ ],
241
+ "qstring" : [
242
+ {
243
+ token : "constant.language.escape",
244
+ regex : escapedRe
245
+ }, {
246
+ token : "string",
247
+ regex : "[^'\\\\]+"
248
+ }, {
249
+ token : "string",
250
+ regex : "\\\\$",
251
+ next : "qstring"
252
+ }, {
253
+ token : "string",
254
+ regex : "'|$",
255
+ next : "tag_attributes"
256
+ }
257
+ ]
258
+ };
259
+
260
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
261
+ token: "text",
262
+ regex: ".$",
263
+ next: "start"
264
+ }]);
265
+ };
266
+
267
+ oop.inherits(JadeHighlightRules, TextHighlightRules);
268
+
269
+ exports.JadeHighlightRules = JadeHighlightRules;
270
+ });
271
+
272
+ define('ace/mode/markdown_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(require, exports, module) {
273
+
274
+
275
+ var oop = require("../lib/oop");
276
+ var lang = require("../lib/lang");
277
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
278
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
279
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
280
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
281
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
282
+
283
+ var escaped = function(ch) {
284
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
285
+ }
286
+
287
+ function github_embed(tag, prefix) {
288
+ return { // Github style block
289
+ token : "support.function",
290
+ regex : "^```" + tag + "\\s*$",
291
+ push : prefix + "start"
292
+ };
293
+ }
294
+
295
+ var MarkdownHighlightRules = function() {
296
+ HtmlHighlightRules.call(this);
297
+
298
+ this.$rules["start"].unshift({
299
+ token : "empty_line",
300
+ regex : '^$',
301
+ next: "allowBlock"
302
+ }, { // h1
303
+ token: "markup.heading.1",
304
+ regex: "^=+(?=\\s*$)"
305
+ }, { // h2
306
+ token: "markup.heading.2",
307
+ regex: "^\\-+(?=\\s*$)"
308
+ }, {
309
+ token : function(value) {
310
+ return "markup.heading." + value.length;
311
+ },
312
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
313
+ next : "header"
314
+ },
315
+ github_embed("(?:javascript|js)", "jscode-"),
316
+ github_embed("xml", "xmlcode-"),
317
+ github_embed("html", "htmlcode-"),
318
+ github_embed("css", "csscode-"),
319
+ { // Github style block
320
+ token : "support.function",
321
+ regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
322
+ next : "githubblock"
323
+ }, { // block quote
324
+ token : "string.blockquote",
325
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
326
+ next : "blockquote"
327
+ }, { // HR * - _
328
+ token : "constant",
329
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
330
+ next: "allowBlock"
331
+ }, { // list
332
+ token : "markup.list",
333
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
334
+ next : "listblock-start"
335
+ }, {
336
+ include : "basic"
337
+ });
338
+
339
+ this.addRules({
340
+ "basic" : [{
341
+ token : "constant.language.escape",
342
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
343
+ }, { // code span `
344
+ token : "support.function",
345
+ regex : "(`+)(.*?[^`])(\\1)"
346
+ }, { // reference
347
+ token : ["text", "constant", "text", "url", "string", "text"],
348
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
349
+ }, { // link by reference
350
+ token : ["text", "string", "text", "constant", "text"],
351
+ regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])"
352
+ }, { // link by url
353
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
354
+ regex : "(\\[)(" + // [
355
+ escaped("]") + // link text
356
+ ")(\\]\\()"+ // ](
357
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
358
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
359
+ "(\\))" // )
360
+ }, { // strong ** __
361
+ token : "string.strong",
362
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
363
+ }, { // emphasis * _
364
+ token : "string.emphasis",
365
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
366
+ }, { //
367
+ token : ["text", "url", "text"],
368
+ regex : "(<)("+
369
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
370
+ "|"+
371
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
372
+ ")(>)"
373
+ }],
374
+ "allowBlock": [
375
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
376
+ {token : "empty", regex : "", next : "start"}
377
+ ],
378
+
379
+ "header" : [{
380
+ regex: "$",
381
+ next : "start"
382
+ }, {
383
+ include: "basic"
384
+ }, {
385
+ defaultToken : "heading"
386
+ } ],
387
+
388
+ "listblock-start" : [{
389
+ token : "support.variable",
390
+ regex : /(?:\[[ x]\])?/,
391
+ next : "listblock"
392
+ }],
393
+
394
+ "listblock" : [ { // Lists only escape on completely blank lines.
395
+ token : "empty_line",
396
+ regex : "^$",
397
+ next : "start"
398
+ }, { // list
399
+ token : "markup.list",
400
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
401
+ next : "listblock-start"
402
+ }, {
403
+ include : "basic", noEscape: true
404
+ }, {
405
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
406
+ } ],
407
+
408
+ "blockquote" : [ { // BLockquotes only escape on blank lines.
409
+ token : "empty_line",
410
+ regex : "^\\s*$",
411
+ next : "start"
412
+ }, { // block quote
413
+ token : "string.blockquote",
414
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
415
+ next : "blockquote"
416
+ }, {
417
+ include : "basic", noEscape: true
418
+ }, {
419
+ defaultToken : "string.blockquote"
420
+ } ],
421
+
422
+ "githubblock" : [ {
423
+ token : "support.function",
424
+ regex : "^```",
425
+ next : "start"
426
+ }, {
427
+ token : "support.function",
428
+ regex : ".+"
429
+ } ]
430
+ });
431
+
432
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
433
+ token : "support.function",
434
+ regex : "^```",
435
+ next : "pop"
436
+ }]);
437
+
438
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
439
+ token : "support.function",
440
+ regex : "^```",
441
+ next : "pop"
442
+ }]);
443
+
444
+ this.embedRules(CssHighlightRules, "csscode-", [{
445
+ token : "support.function",
446
+ regex : "^```",
447
+ next : "pop"
448
+ }]);
449
+
450
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
451
+ token : "support.function",
452
+ regex : "^```",
453
+ next : "pop"
454
+ }]);
455
+
456
+ this.normalizeRules();
457
+ };
458
+ oop.inherits(MarkdownHighlightRules, TextHighlightRules);
459
+
460
+ exports.MarkdownHighlightRules = MarkdownHighlightRules;
461
+ });
462
+
463
+ define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
464
+
465
+
466
+ var oop = require("../lib/oop");
467
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
468
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
469
+
470
+ var JavaScriptHighlightRules = function() {
471
+ var keywordMapper = this.createKeywordMapper({
472
+ "variable.language":
473
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
474
+ "Namespace|QName|XML|XMLList|" + // E4X
475
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
476
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
477
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
478
+ "SyntaxError|TypeError|URIError|" +
479
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
480
+ "isNaN|parseFloat|parseInt|" +
481
+ "JSON|Math|" + // Other
482
+ "this|arguments|prototype|window|document" , // Pseudo
483
+ "keyword":
484
+ "const|yield|import|get|set|" +
485
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
486
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
487
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
488
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
489
+ "storage.type":
490
+ "const|let|var|function",
491
+ "constant.language":
492
+ "null|Infinity|NaN|undefined",
493
+ "support.function":
494
+ "alert",
495
+ "constant.language.boolean": "true|false"
496
+ }, "identifier");
497
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
498
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
499
+
500
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
501
+ "u[0-9a-fA-F]{4}|" + // unicode
502
+ "[0-2][0-7]{0,2}|" + // oct
503
+ "3[0-6][0-7]?|" + // oct
504
+ "37[0-7]?|" + // oct
505
+ "[4-7][0-7]?|" + //oct
506
+ ".)";
507
+
508
+ this.$rules = {
509
+ "no_regex" : [
510
+ {
511
+ token : "comment",
512
+ regex : "\\/\\/",
513
+ next : "line_comment"
514
+ },
515
+ DocCommentHighlightRules.getStartRule("doc-start"),
516
+ {
517
+ token : "comment", // multi line comment
518
+ regex : /\/\*/,
519
+ next : "comment"
520
+ }, {
521
+ token : "string",
522
+ regex : "'(?=.)",
523
+ next : "qstring"
524
+ }, {
525
+ token : "string",
526
+ regex : '"(?=.)',
527
+ next : "qqstring"
528
+ }, {
529
+ token : "constant.numeric", // hex
530
+ regex : /0[xX][0-9a-fA-F]+\b/
531
+ }, {
532
+ token : "constant.numeric", // float
533
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
534
+ }, {
535
+ token : [
536
+ "storage.type", "punctuation.operator", "support.function",
537
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
538
+ ],
539
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
540
+ next: "function_arguments"
541
+ }, {
542
+ token : [
543
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
544
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
545
+ ],
546
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
547
+ next: "function_arguments"
548
+ }, {
549
+ token : [
550
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
551
+ "text", "paren.lparen"
552
+ ],
553
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
554
+ next: "function_arguments"
555
+ }, {
556
+ token : [
557
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
558
+ "keyword.operator", "text",
559
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
560
+ ],
561
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
562
+ next: "function_arguments"
563
+ }, {
564
+ token : [
565
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
566
+ ],
567
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
568
+ next: "function_arguments"
569
+ }, {
570
+ token : [
571
+ "entity.name.function", "text", "punctuation.operator",
572
+ "text", "storage.type", "text", "paren.lparen"
573
+ ],
574
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
575
+ next: "function_arguments"
576
+ }, {
577
+ token : [
578
+ "text", "text", "storage.type", "text", "paren.lparen"
579
+ ],
580
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
581
+ next: "function_arguments"
582
+ }, {
583
+ token : "keyword",
584
+ regex : "(?:" + kwBeforeRe + ")\\b",
585
+ next : "start"
586
+ }, {
587
+ token : ["punctuation.operator", "support.function"],
588
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
589
+ }, {
590
+ token : ["punctuation.operator", "support.function.dom"],
591
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
592
+ }, {
593
+ token : ["punctuation.operator", "support.constant"],
594
+ regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
595
+ }, {
596
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
597
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
598
+ }, {
599
+ token : keywordMapper,
600
+ regex : identifierRe
601
+ }, {
602
+ token : "keyword.operator",
603
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
604
+ next : "start"
605
+ }, {
606
+ token : "punctuation.operator",
607
+ regex : /\?|\:|\,|\;|\./,
608
+ next : "start"
609
+ }, {
610
+ token : "paren.lparen",
611
+ regex : /[\[({]/,
612
+ next : "start"
613
+ }, {
614
+ token : "paren.rparen",
615
+ regex : /[\])}]/
616
+ }, {
617
+ token : "keyword.operator",
618
+ regex : /\/=?/,
619
+ next : "start"
620
+ }, {
621
+ token: "comment",
622
+ regex: /^#!.*$/
623
+ }
624
+ ],
625
+ "start": [
626
+ DocCommentHighlightRules.getStartRule("doc-start"),
627
+ {
628
+ token : "comment", // multi line comment
629
+ regex : "\\/\\*",
630
+ next : "comment_regex_allowed"
631
+ }, {
632
+ token : "comment",
633
+ regex : "\\/\\/",
634
+ next : "line_comment_regex_allowed"
635
+ }, {
636
+ token: "string.regexp",
637
+ regex: "\\/",
638
+ next: "regex"
639
+ }, {
640
+ token : "text",
641
+ regex : "\\s+|^$",
642
+ next : "start"
643
+ }, {
644
+ token: "empty",
645
+ regex: "",
646
+ next: "no_regex"
647
+ }
648
+ ],
649
+ "regex": [
650
+ {
651
+ token: "regexp.keyword.operator",
652
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
653
+ }, {
654
+ token: "string.regexp",
655
+ regex: "/[sxngimy]*",
656
+ next: "no_regex"
657
+ }, {
658
+ token : "invalid",
659
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
660
+ }, {
661
+ token : "constant.language.escape",
662
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
663
+ }, {
664
+ token : "constant.language.delimiter",
665
+ regex: /\|/
666
+ }, {
667
+ token: "constant.language.escape",
668
+ regex: /\[\^?/,
669
+ next: "regex_character_class"
670
+ }, {
671
+ token: "empty",
672
+ regex: "$",
673
+ next: "no_regex"
674
+ }, {
675
+ defaultToken: "string.regexp"
676
+ }
677
+ ],
678
+ "regex_character_class": [
679
+ {
680
+ token: "regexp.keyword.operator",
681
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
682
+ }, {
683
+ token: "constant.language.escape",
684
+ regex: "]",
685
+ next: "regex"
686
+ }, {
687
+ token: "constant.language.escape",
688
+ regex: "-"
689
+ }, {
690
+ token: "empty",
691
+ regex: "$",
692
+ next: "no_regex"
693
+ }, {
694
+ defaultToken: "string.regexp.charachterclass"
695
+ }
696
+ ],
697
+ "function_arguments": [
698
+ {
699
+ token: "variable.parameter",
700
+ regex: identifierRe
701
+ }, {
702
+ token: "punctuation.operator",
703
+ regex: "[, ]+"
704
+ }, {
705
+ token: "punctuation.operator",
706
+ regex: "$"
707
+ }, {
708
+ token: "empty",
709
+ regex: "",
710
+ next: "no_regex"
711
+ }
712
+ ],
713
+ "comment_regex_allowed" : [
714
+ {token : "comment", regex : "\\*\\/", next : "start"},
715
+ {defaultToken : "comment"}
716
+ ],
717
+ "comment" : [
718
+ {token : "comment", regex : "\\*\\/", next : "no_regex"},
719
+ {defaultToken : "comment"}
720
+ ],
721
+ "line_comment_regex_allowed" : [
722
+ {token : "comment", regex : "$|^", next : "start"},
723
+ {defaultToken : "comment"}
724
+ ],
725
+ "line_comment" : [
726
+ {token : "comment", regex : "$|^", next : "no_regex"},
727
+ {defaultToken : "comment"}
728
+ ],
729
+ "qqstring" : [
730
+ {
731
+ token : "constant.language.escape",
732
+ regex : escapedRe
733
+ }, {
734
+ token : "string",
735
+ regex : "\\\\$",
736
+ next : "qqstring"
737
+ }, {
738
+ token : "string",
739
+ regex : '"|$',
740
+ next : "no_regex"
741
+ }, {
742
+ defaultToken: "string"
743
+ }
744
+ ],
745
+ "qstring" : [
746
+ {
747
+ token : "constant.language.escape",
748
+ regex : escapedRe
749
+ }, {
750
+ token : "string",
751
+ regex : "\\\\$",
752
+ next : "qstring"
753
+ }, {
754
+ token : "string",
755
+ regex : "'|$",
756
+ next : "no_regex"
757
+ }, {
758
+ defaultToken: "string"
759
+ }
760
+ ]
761
+ };
762
+
763
+ this.embedRules(DocCommentHighlightRules, "doc-",
764
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
765
+ };
766
+
767
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
768
+
769
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
770
+ });
771
+
772
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
773
+
774
+
775
+ var oop = require("../lib/oop");
776
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
777
+
778
+ var DocCommentHighlightRules = function() {
779
+
780
+ this.$rules = {
781
+ "start" : [ {
782
+ token : "comment.doc.tag",
783
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
784
+ }, {
785
+ token : "comment.doc.tag",
786
+ regex : "\\bTODO\\b"
787
+ }, {
788
+ defaultToken : "comment.doc"
789
+ }]
790
+ };
791
+ };
792
+
793
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
794
+
795
+ DocCommentHighlightRules.getStartRule = function(start) {
796
+ return {
797
+ token : "comment.doc", // doc comment
798
+ regex : "\\/\\*(?=\\*)",
799
+ next : start
800
+ };
801
+ };
802
+
803
+ DocCommentHighlightRules.getEndRule = function (start) {
804
+ return {
805
+ token : "comment.doc", // closing comment
806
+ regex : "\\*\\/",
807
+ next : start
808
+ };
809
+ };
810
+
811
+
812
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
813
+
814
+ });
815
+
816
+ define('ace/mode/xml_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
817
+
818
+
819
+ var oop = require("../lib/oop");
820
+ var xmlUtil = require("./xml_util");
821
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
822
+
823
+ var XmlHighlightRules = function(normalize) {
824
+ this.$rules = {
825
+ start : [
826
+ {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"},
827
+ {
828
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
829
+ regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration"
830
+ },
831
+ {
832
+ token : ["punctuation.instruction.begin", "keyword.instruction"],
833
+ regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction"
834
+ },
835
+ {token : "comment", regex : "<\\!--", next : "comment"},
836
+ {
837
+ token : ["punctuation.doctype.begin", "meta.tag.doctype"],
838
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype"
839
+ },
840
+ {include : "tag"},
841
+ {include : "reference"}
842
+ ],
843
+
844
+ xml_declaration : [
845
+ {include : "attributes"},
846
+ {include : "instruction"}
847
+ ],
848
+
849
+ instruction : [
850
+ {token : "punctuation.instruction.end", regex : "\\?>", next : "start"}
851
+ ],
852
+
853
+ doctype : [
854
+ {include : "space"},
855
+ {include : "string"},
856
+ {token : "punctuation.doctype.end", regex : ">", next : "start"},
857
+ {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"},
858
+ {token : "punctuation.begin", regex : "\\[", push : "declarations"}
859
+ ],
860
+
861
+ declarations : [{
862
+ token : "text",
863
+ regex : "\\s+"
864
+ }, {
865
+ token: "punctuation.end",
866
+ regex: "]",
867
+ next: "pop"
868
+ }, {
869
+ token : ["punctuation.begin", "keyword"],
870
+ regex : "(<\\!)([-_a-zA-Z0-9]+)",
871
+ push : [{
872
+ token : "text",
873
+ regex : "\\s+"
874
+ },
875
+ {
876
+ token : "punctuation.end",
877
+ regex : ">",
878
+ next : "pop"
879
+ },
880
+ {include : "string"}]
881
+ }],
882
+
883
+ cdata : [
884
+ {token : "string.end", regex : "\\]\\]>", next : "start"},
885
+ {token : "text", regex : "\\s+"},
886
+ {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"}
887
+ ],
888
+
889
+ comment : [
890
+ {token : "comment", regex : "-->", next : "start"},
891
+ {defaultToken : "comment"}
892
+ ],
893
+
894
+ tag : [{
895
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
896
+ regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
897
+ next: [
898
+ {include : "attributes"},
899
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
900
+ ]
901
+ }, {
902
+ token : ["meta.tag.punctuation.begin", "meta.tag.name"],
903
+ regex : "(</)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)",
904
+ next: [
905
+ {include : "space"},
906
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
907
+ ]
908
+ }],
909
+
910
+ space : [
911
+ {token : "text", regex : "\\s+"}
912
+ ],
913
+
914
+ reference : [{
915
+ token : "constant.language.escape",
916
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
917
+ }, {
918
+ token : "text", regex : "&"
919
+ }],
920
+
921
+ string: [{
922
+ token : "string",
923
+ regex : "'",
924
+ push : "qstring_inner"
925
+ }, {
926
+ token : "string",
927
+ regex : '"',
928
+ push : "qqstring_inner"
929
+ }],
930
+
931
+ qstring_inner: [
932
+ {token : "string", regex: "'", next: "pop"},
933
+ {include : "reference"},
934
+ {defaultToken : "string"}
935
+ ],
936
+
937
+ qqstring_inner: [
938
+ {token : "string", regex: '"', next: "pop"},
939
+ {include : "reference"},
940
+ {defaultToken : "string"}
941
+ ],
942
+
943
+ attributes: [{
944
+ token : "entity.other.attribute-name",
945
+ regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+"
946
+ }, {
947
+ token : "keyword.operator.separator",
948
+ regex : "="
949
+ }, {
950
+ include : "space"
951
+ }, {
952
+ include : "string"
953
+ }]
954
+ };
955
+
956
+ if (this.constructor === XmlHighlightRules)
957
+ this.normalizeRules();
958
+ };
959
+
960
+
961
+ (function() {
962
+
963
+ this.embedTagRules = function(HighlightRules, prefix, tag){
964
+ this.$rules.tag.unshift({
965
+ token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
966
+ regex : "(<)(" + tag + ")",
967
+ next: [
968
+ {include : "space"},
969
+ {include : "attributes"},
970
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"}
971
+ ]
972
+ });
973
+
974
+ this.$rules[tag + "-end"] = [
975
+ {include : "space"},
976
+ {token : "meta.tag.punctuation.end", regex : ">", next: "start",
977
+ onMatch : function(value, currentState, stack) {
978
+ stack.splice(0);
979
+ return this.token;
980
+ }}
981
+ ]
982
+
983
+ this.embedRules(HighlightRules, prefix, [{
984
+ token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag],
985
+ regex : "(</)(" + tag + ")",
986
+ next: tag + "-end"
987
+ }, {
988
+ token: "string.begin",
989
+ regex : "<\\!\\[CDATA\\["
990
+ }, {
991
+ token: "string.end",
992
+ regex : "\\]\\]>"
993
+ }]);
994
+ };
995
+
996
+ }).call(TextHighlightRules.prototype);
997
+
998
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
999
+
1000
+ exports.XmlHighlightRules = XmlHighlightRules;
1001
+ });
1002
+
1003
+ define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
1004
+
1005
+
1006
+ function string(state) {
1007
+ return [{
1008
+ token : "string",
1009
+ regex : '"',
1010
+ next : state + "_qqstring"
1011
+ }, {
1012
+ token : "string",
1013
+ regex : "'",
1014
+ next : state + "_qstring"
1015
+ }];
1016
+ }
1017
+
1018
+ function multiLineString(quote, state) {
1019
+ return [
1020
+ {token : "string", regex : quote, next : state},
1021
+ {
1022
+ token : "constant.language.escape",
1023
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1024
+ },
1025
+ {defaultToken : "string"}
1026
+ ];
1027
+ }
1028
+
1029
+ exports.tag = function(states, name, nextState, tagMap) {
1030
+ states[name] = [{
1031
+ token : "text",
1032
+ regex : "\\s+"
1033
+ }, {
1034
+
1035
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
1036
+ if (tagMap[value])
1037
+ return "meta.tag.tag-name." + tagMap[value];
1038
+ else
1039
+ return "meta.tag.tag-name";
1040
+ },
1041
+ regex : "[-_a-zA-Z0-9:]+",
1042
+ next : name + "_embed_attribute_list"
1043
+ }, {
1044
+ token: "empty",
1045
+ regex: "",
1046
+ next : name + "_embed_attribute_list"
1047
+ }];
1048
+
1049
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
1050
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
1051
+
1052
+ states[name + "_embed_attribute_list"] = [{
1053
+ token : "meta.tag.r",
1054
+ regex : "/?>",
1055
+ next : nextState
1056
+ }, {
1057
+ token : "keyword.operator",
1058
+ regex : "="
1059
+ }, {
1060
+ token : "entity.other.attribute-name",
1061
+ regex : "[-_a-zA-Z0-9:]+"
1062
+ }, {
1063
+ token : "constant.numeric", // float
1064
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
1065
+ }, {
1066
+ token : "text",
1067
+ regex : "\\s+"
1068
+ }].concat(string(name));
1069
+ };
1070
+
1071
+ });
1072
+
1073
+ define('ace/mode/html_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(require, exports, module) {
1074
+
1075
+
1076
+ var oop = require("../lib/oop");
1077
+ var lang = require("../lib/lang");
1078
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1079
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1080
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1081
+
1082
+ var tagMap = lang.createMap({
1083
+ a : 'anchor',
1084
+ button : 'form',
1085
+ form : 'form',
1086
+ img : 'image',
1087
+ input : 'form',
1088
+ label : 'form',
1089
+ option : 'form',
1090
+ script : 'script',
1091
+ select : 'form',
1092
+ textarea : 'form',
1093
+ style : 'style',
1094
+ table : 'table',
1095
+ tbody : 'table',
1096
+ td : 'table',
1097
+ tfoot : 'table',
1098
+ th : 'table',
1099
+ tr : 'table'
1100
+ });
1101
+
1102
+ var HtmlHighlightRules = function() {
1103
+ XmlHighlightRules.call(this);
1104
+
1105
+ this.addRules({
1106
+ attributes: [{
1107
+ include : "space"
1108
+ }, {
1109
+ token : "entity.other.attribute-name",
1110
+ regex : "[-_a-zA-Z0-9:]+"
1111
+ }, {
1112
+ token : "keyword.operator.separator",
1113
+ regex : "=",
1114
+ push : [{
1115
+ include: "space"
1116
+ }, {
1117
+ token : "string",
1118
+ regex : "[^<>='\"`\\s]+",
1119
+ next : "pop"
1120
+ }, {
1121
+ token : "empty",
1122
+ regex : "",
1123
+ next : "pop"
1124
+ }]
1125
+ }, {
1126
+ include : "string"
1127
+ }],
1128
+ tag: [{
1129
+ token : function(start, tag) {
1130
+ var group = tagMap[tag];
1131
+ return ["meta.tag.punctuation.begin",
1132
+ "meta.tag.name" + (group ? "." + group : "")];
1133
+ },
1134
+ regex : "(<)([-_a-zA-Z0-9:]+)",
1135
+ next: "start_tag_stuff"
1136
+ }, {
1137
+ token : function(start, tag) {
1138
+ var group = tagMap[tag];
1139
+ return ["meta.tag.punctuation.begin",
1140
+ "meta.tag.name" + (group ? "." + group : "")];
1141
+ },
1142
+ regex : "(</)([-_a-zA-Z0-9:]+)",
1143
+ next: "end_tag_stuff"
1144
+ }],
1145
+ start_tag_stuff: [
1146
+ {include : "attributes"},
1147
+ {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"}
1148
+ ],
1149
+ end_tag_stuff: [
1150
+ {include : "space"},
1151
+ {token : "meta.tag.punctuation.end", regex : ">", next : "start"}
1152
+ ]
1153
+ });
1154
+
1155
+ this.embedTagRules(CssHighlightRules, "css-", "style");
1156
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
1157
+
1158
+ if (this.constructor === HtmlHighlightRules)
1159
+ this.normalizeRules();
1160
+ };
1161
+
1162
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1163
+
1164
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1165
+ });
1166
+
1167
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1168
+
1169
+
1170
+ var oop = require("../lib/oop");
1171
+ var lang = require("../lib/lang");
1172
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1173
+ var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|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|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|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-after|cue-before|cue|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|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|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|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index";
1174
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
1175
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero";
1176
+ var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow";
1177
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
1178
+
1179
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1180
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1181
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
1182
+
1183
+ var CssHighlightRules = function() {
1184
+
1185
+ var keywordMapper = this.createKeywordMapper({
1186
+ "support.function": supportFunction,
1187
+ "support.constant": supportConstant,
1188
+ "support.type": supportType,
1189
+ "support.constant.color": supportConstantColor,
1190
+ "support.constant.fonts": supportConstantFonts
1191
+ }, "text", true);
1192
+
1193
+ this.$rules = {
1194
+ "start" : [{
1195
+ token : "comment", // multi line comment
1196
+ regex : "\\/\\*",
1197
+ push : "comment"
1198
+ }, {
1199
+ token: "paren.lparen",
1200
+ regex: "\\{",
1201
+ push: "ruleset"
1202
+ }, {
1203
+ token: "string",
1204
+ regex: "@.*?{",
1205
+ push: "media"
1206
+ }, {
1207
+ token: "keyword",
1208
+ regex: "#[a-z0-9-_]+"
1209
+ }, {
1210
+ token: "variable",
1211
+ regex: "\\.[a-z0-9-_]+"
1212
+ }, {
1213
+ token: "string",
1214
+ regex: ":[a-z0-9-_]+"
1215
+ }, {
1216
+ token: "constant",
1217
+ regex: "[a-z0-9-_]+"
1218
+ }, {
1219
+ caseInsensitive: true
1220
+ }],
1221
+
1222
+ "media" : [{
1223
+ token : "comment", // multi line comment
1224
+ regex : "\\/\\*",
1225
+ push : "comment"
1226
+ }, {
1227
+ token: "paren.lparen",
1228
+ regex: "\\{",
1229
+ push: "ruleset"
1230
+ }, {
1231
+ token: "string",
1232
+ regex: "\\}",
1233
+ next: "pop"
1234
+ }, {
1235
+ token: "keyword",
1236
+ regex: "#[a-z0-9-_]+"
1237
+ }, {
1238
+ token: "variable",
1239
+ regex: "\\.[a-z0-9-_]+"
1240
+ }, {
1241
+ token: "string",
1242
+ regex: ":[a-z0-9-_]+"
1243
+ }, {
1244
+ token: "constant",
1245
+ regex: "[a-z0-9-_]+"
1246
+ }, {
1247
+ caseInsensitive: true
1248
+ }],
1249
+
1250
+ "comment" : [{
1251
+ token : "comment",
1252
+ regex : "\\*\\/",
1253
+ next : "pop"
1254
+ }, {
1255
+ defaultToken : "comment"
1256
+ }],
1257
+
1258
+ "ruleset" : [
1259
+ {
1260
+ token : "paren.rparen",
1261
+ regex : "\\}",
1262
+ next: "pop"
1263
+ }, {
1264
+ token : "comment", // multi line comment
1265
+ regex : "\\/\\*",
1266
+ push : "comment"
1267
+ }, {
1268
+ token : "string", // single line
1269
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1270
+ }, {
1271
+ token : "string", // single line
1272
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1273
+ }, {
1274
+ token : ["constant.numeric", "keyword"],
1275
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"
1276
+ }, {
1277
+ token : "constant.numeric",
1278
+ regex : numRe
1279
+ }, {
1280
+ token : "constant.numeric", // hex6 color
1281
+ regex : "#[a-f0-9]{6}"
1282
+ }, {
1283
+ token : "constant.numeric", // hex3 color
1284
+ regex : "#[a-f0-9]{3}"
1285
+ }, {
1286
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1287
+ regex : pseudoElements
1288
+ }, {
1289
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1290
+ regex : pseudoClasses
1291
+ }, {
1292
+ token : ["support.function", "string", "support.function"],
1293
+ regex : "(url\\()(.*)(\\))"
1294
+ }, {
1295
+ token : keywordMapper,
1296
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1297
+ }, {
1298
+ caseInsensitive: true
1299
+ }]
1300
+ };
1301
+
1302
+ this.normalizeRules();
1303
+ };
1304
+
1305
+ oop.inherits(CssHighlightRules, TextHighlightRules);
1306
+
1307
+ exports.CssHighlightRules = CssHighlightRules;
1308
+
1309
+ });
1310
+
1311
+ define('ace/mode/scss_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1312
+
1313
+
1314
+ var oop = require("../lib/oop");
1315
+ var lang = require("../lib/lang");
1316
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1317
+
1318
+ var ScssHighlightRules = function() {
1319
+
1320
+ var properties = lang.arrayToMap( (function () {
1321
+
1322
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
1323
+
1324
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
1325
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
1326
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
1327
+ "border-end-style|border-end-width|border-image|border-start|" +
1328
+ "border-start-color|border-start-style|border-start-width|box-align|" +
1329
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
1330
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
1331
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
1332
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
1333
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
1334
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
1335
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
1336
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
1337
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
1338
+ "text-decoration-style|transform|transform-origin|transition|" +
1339
+ "transition-delay|transition-duration|transition-property|" +
1340
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
1341
+ "window-shadow|border-radius").split("|");
1342
+
1343
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
1344
+ "background-position|background-repeat|background|border-bottom-color|" +
1345
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
1346
+ "border-color|border-left-color|border-left-style|border-left-width|" +
1347
+ "border-left|border-right-color|border-right-style|border-right-width|" +
1348
+ "border-right|border-spacing|border-style|border-top-color|" +
1349
+ "border-top-style|border-top-width|border-top|border-width|border|bottom|" +
1350
+ "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
1351
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
1352
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
1353
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
1354
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
1355
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
1356
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
1357
+ "min-width|opacity|orphans|outline-color|" +
1358
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
1359
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
1360
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
1361
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
1362
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
1363
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
1364
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
1365
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
1366
+ "z-index").split("|");
1367
+ var ret = [];
1368
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
1369
+ Array.prototype.push.apply(
1370
+ ret,
1371
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
1372
+ );
1373
+ }
1374
+ Array.prototype.push.apply(ret, prefixProperties);
1375
+ Array.prototype.push.apply(ret, properties);
1376
+
1377
+ return ret;
1378
+
1379
+ })() );
1380
+
1381
+
1382
+
1383
+ var functions = lang.arrayToMap(
1384
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" +
1385
+ "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" +
1386
+ "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" +
1387
+ "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" +
1388
+ "scale_color|transparentize|type_of|unit|unitless|unqoute").split("|")
1389
+ );
1390
+
1391
+ var constants = lang.arrayToMap(
1392
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
1393
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
1394
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
1395
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
1396
+ "distribute-all-lines|distribute-letter|distribute-space|" +
1397
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
1398
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
1399
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
1400
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
1401
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
1402
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
1403
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
1404
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
1405
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
1406
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
1407
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
1408
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
1409
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
1410
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
1411
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
1412
+ "zero").split("|")
1413
+ );
1414
+
1415
+ var colors = lang.arrayToMap(
1416
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
1417
+ "purple|red|silver|teal|white|yellow").split("|")
1418
+ );
1419
+
1420
+ var keywords = lang.arrayToMap(
1421
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|")
1422
+ )
1423
+
1424
+ var tags = lang.arrayToMap(
1425
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
1426
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
1427
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
1428
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
1429
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
1430
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
1431
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
1432
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
1433
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
1434
+ );
1435
+
1436
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1437
+
1438
+ this.$rules = {
1439
+ "start" : [
1440
+ {
1441
+ token : "comment",
1442
+ regex : "\\/\\/.*$"
1443
+ },
1444
+ {
1445
+ token : "comment", // multi line comment
1446
+ regex : "\\/\\*",
1447
+ next : "comment"
1448
+ }, {
1449
+ token : "string", // single line
1450
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1451
+ }, {
1452
+ token : "string", // multi line string start
1453
+ regex : '["].*\\\\$',
1454
+ next : "qqstring"
1455
+ }, {
1456
+ token : "string", // single line
1457
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1458
+ }, {
1459
+ token : "string", // multi line string start
1460
+ regex : "['].*\\\\$",
1461
+ next : "qstring"
1462
+ }, {
1463
+ token : "constant.numeric",
1464
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
1465
+ }, {
1466
+ token : "constant.numeric", // hex6 color
1467
+ regex : "#[a-f0-9]{6}"
1468
+ }, {
1469
+ token : "constant.numeric", // hex3 color
1470
+ regex : "#[a-f0-9]{3}"
1471
+ }, {
1472
+ token : "constant.numeric",
1473
+ regex : numRe
1474
+ }, {
1475
+ token : ["support.function", "string", "support.function"],
1476
+ regex : "(url\\()(.*)(\\))"
1477
+ }, {
1478
+ token : function(value) {
1479
+ if (properties.hasOwnProperty(value.toLowerCase()))
1480
+ return "support.type";
1481
+ if (keywords.hasOwnProperty(value))
1482
+ return "keyword";
1483
+ else if (constants.hasOwnProperty(value))
1484
+ return "constant.language";
1485
+ else if (functions.hasOwnProperty(value))
1486
+ return "support.function";
1487
+ else if (colors.hasOwnProperty(value.toLowerCase()))
1488
+ return "support.constant.color";
1489
+ else if (tags.hasOwnProperty(value.toLowerCase()))
1490
+ return "variable.language";
1491
+ else
1492
+ return "text";
1493
+ },
1494
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
1495
+ }, {
1496
+ token : "variable",
1497
+ regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b"
1498
+ }, {
1499
+ token: "variable.language",
1500
+ regex: "#[a-z0-9-_]+"
1501
+ }, {
1502
+ token: "variable.language",
1503
+ regex: "\\.[a-z0-9-_]+"
1504
+ }, {
1505
+ token: "variable.language",
1506
+ regex: ":[a-z0-9-_]+"
1507
+ }, {
1508
+ token: "constant",
1509
+ regex: "[a-z0-9-_]+"
1510
+ }, {
1511
+ token : "keyword.operator",
1512
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
1513
+ }, {
1514
+ token : "paren.lparen",
1515
+ regex : "[[({]"
1516
+ }, {
1517
+ token : "paren.rparen",
1518
+ regex : "[\\])}]"
1519
+ }, {
1520
+ token : "text",
1521
+ regex : "\\s+"
1522
+ }, {
1523
+ caseInsensitive: true
1524
+ }
1525
+ ],
1526
+ "comment" : [
1527
+ {
1528
+ token : "comment", // closing comment
1529
+ regex : ".*?\\*\\/",
1530
+ next : "start"
1531
+ }, {
1532
+ token : "comment", // comment spanning whole line
1533
+ regex : ".+"
1534
+ }
1535
+ ],
1536
+ "qqstring" : [
1537
+ {
1538
+ token : "string",
1539
+ regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
1540
+ next : "start"
1541
+ }, {
1542
+ token : "string",
1543
+ regex : '.+'
1544
+ }
1545
+ ],
1546
+ "qstring" : [
1547
+ {
1548
+ token : "string",
1549
+ regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
1550
+ next : "start"
1551
+ }, {
1552
+ token : "string",
1553
+ regex : '.+'
1554
+ }
1555
+ ]
1556
+ };
1557
+ };
1558
+
1559
+ oop.inherits(ScssHighlightRules, TextHighlightRules);
1560
+
1561
+ exports.ScssHighlightRules = ScssHighlightRules;
1562
+
1563
+ });
1564
+
1565
+ define('ace/mode/less_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1566
+
1567
+
1568
+ var oop = require("../lib/oop");
1569
+ var lang = require("../lib/lang");
1570
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1571
+
1572
+ var LessHighlightRules = function() {
1573
+
1574
+ var properties = lang.arrayToMap( (function () {
1575
+
1576
+ var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|");
1577
+
1578
+ var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" +
1579
+ "background-size|binding|border-bottom-colors|border-left-colors|" +
1580
+ "border-right-colors|border-top-colors|border-end|border-end-color|" +
1581
+ "border-end-style|border-end-width|border-image|border-start|" +
1582
+ "border-start-color|border-start-style|border-start-width|box-align|" +
1583
+ "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" +
1584
+ "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" +
1585
+ "column-rule-width|column-rule-style|column-rule-color|float-edge|" +
1586
+ "font-feature-settings|font-language-override|force-broken-image-icon|" +
1587
+ "image-region|margin-end|margin-start|opacity|outline|outline-color|" +
1588
+ "outline-offset|outline-radius|outline-radius-bottomleft|" +
1589
+ "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" +
1590
+ "outline-style|outline-width|padding-end|padding-start|stack-sizing|" +
1591
+ "tab-size|text-blink|text-decoration-color|text-decoration-line|" +
1592
+ "text-decoration-style|transform|transform-origin|transition|" +
1593
+ "transition-delay|transition-duration|transition-property|" +
1594
+ "transition-timing-function|user-focus|user-input|user-modify|user-select|" +
1595
+ "window-shadow|border-radius").split("|");
1596
+
1597
+ var properties = ("azimuth|background-attachment|background-color|background-image|" +
1598
+ "background-position|background-repeat|background|border-bottom-color|" +
1599
+ "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" +
1600
+ "border-color|border-left-color|border-left-style|border-left-width|" +
1601
+ "border-left|border-right-color|border-right-style|border-right-width|" +
1602
+ "border-right|border-spacing|border-style|border-top-color|" +
1603
+ "border-top-style|border-top-width|border-top|border-width|border|" +
1604
+ "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" +
1605
+ "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" +
1606
+ "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" +
1607
+ "font-stretch|font-style|font-variant|font-weight|font|height|left|" +
1608
+ "letter-spacing|line-height|list-style-image|list-style-position|" +
1609
+ "list-style-type|list-style|margin-bottom|margin-left|margin-right|" +
1610
+ "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" +
1611
+ "min-width|opacity|orphans|outline-color|" +
1612
+ "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" +
1613
+ "padding-left|padding-right|padding-top|padding|page-break-after|" +
1614
+ "page-break-before|page-break-inside|page|pause-after|pause-before|" +
1615
+ "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" +
1616
+ "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" +
1617
+ "stress|table-layout|text-align|text-decoration|text-indent|" +
1618
+ "text-shadow|text-transform|top|unicode-bidi|vertical-align|" +
1619
+ "visibility|voice-family|volume|white-space|widows|width|word-spacing|" +
1620
+ "z-index").split("|");
1621
+ var ret = [];
1622
+ for (var i=0, ln=browserPrefix.length; i<ln; i++) {
1623
+ Array.prototype.push.apply(
1624
+ ret,
1625
+ (( browserPrefix[i] + prefixProperties.join("|" + browserPrefix[i]) ).split("|"))
1626
+ );
1627
+ }
1628
+ Array.prototype.push.apply(ret, prefixProperties);
1629
+ Array.prototype.push.apply(ret, properties);
1630
+
1631
+ return ret;
1632
+
1633
+ })() );
1634
+
1635
+
1636
+
1637
+ var functions = lang.arrayToMap(
1638
+ ("hsl|hsla|rgb|rgba|url|attr|counter|counters|lighten|darken|saturate|" +
1639
+ "desaturate|fadein|fadeout|fade|spin|mix|hue|saturation|lightness|" +
1640
+ "alpha|round|ceil|floor|percentage|color|iscolor|isnumber|isstring|" +
1641
+ "iskeyword|isurl|ispixel|ispercentage|isem").split("|")
1642
+ );
1643
+
1644
+ var constants = lang.arrayToMap(
1645
+ ("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|" +
1646
+ "block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|" +
1647
+ "char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|" +
1648
+ "decimal-leading-zero|decimal|default|disabled|disc|" +
1649
+ "distribute-all-lines|distribute-letter|distribute-space|" +
1650
+ "distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|" +
1651
+ "hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|" +
1652
+ "ideograph-alpha|ideograph-numeric|ideograph-parenthesis|" +
1653
+ "ideograph-space|inactive|inherit|inline-block|inline|inset|inside|" +
1654
+ "inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|" +
1655
+ "keep-all|left|lighter|line-edge|line-through|line|list-item|loose|" +
1656
+ "lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|" +
1657
+ "medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|" +
1658
+ "nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|" +
1659
+ "overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|" +
1660
+ "ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|" +
1661
+ "solid|square|static|strict|super|sw-resize|table-footer-group|" +
1662
+ "table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|" +
1663
+ "transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|" +
1664
+ "vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|" +
1665
+ "zero").split("|")
1666
+ );
1667
+
1668
+ var colors = lang.arrayToMap(
1669
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
1670
+ "purple|red|silver|teal|white|yellow").split("|")
1671
+ );
1672
+
1673
+ var keywords = lang.arrayToMap(
1674
+ ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|" +
1675
+ "@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|" +
1676
+ "def|end|declare|when|not|and").split("|")
1677
+ );
1678
+
1679
+ var tags = lang.arrayToMap(
1680
+ ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" +
1681
+ "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" +
1682
+ "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" +
1683
+ "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" +
1684
+ "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" +
1685
+ "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" +
1686
+ "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" +
1687
+ "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" +
1688
+ "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|")
1689
+ );
1690
+
1691
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1692
+
1693
+ this.$rules = {
1694
+ "start" : [
1695
+ {
1696
+ token : "comment",
1697
+ regex : "\\/\\/.*$"
1698
+ },
1699
+ {
1700
+ token : "comment", // multi line comment
1701
+ regex : "\\/\\*",
1702
+ next : "comment"
1703
+ }, {
1704
+ token : "string", // single line
1705
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1706
+ }, {
1707
+ token : "string", // single line
1708
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1709
+ }, {
1710
+ token : "constant.numeric",
1711
+ regex : numRe + "(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)"
1712
+ }, {
1713
+ token : "constant.numeric", // hex6 color
1714
+ regex : "#[a-f0-9]{6}"
1715
+ }, {
1716
+ token : "constant.numeric", // hex3 color
1717
+ regex : "#[a-f0-9]{3}"
1718
+ }, {
1719
+ token : "constant.numeric",
1720
+ regex : numRe
1721
+ }, {
1722
+ token : function(value) {
1723
+ if (keywords.hasOwnProperty(value))
1724
+ return "keyword";
1725
+ else
1726
+ return "variable";
1727
+ },
1728
+ regex : "@[a-z0-9_\\-@]*\\b"
1729
+ }, {
1730
+ token : function(value) {
1731
+ if (properties.hasOwnProperty(value.toLowerCase()))
1732
+ return "support.type";
1733
+ else if (keywords.hasOwnProperty(value))
1734
+ return "keyword";
1735
+ else if (constants.hasOwnProperty(value))
1736
+ return "constant.language";
1737
+ else if (functions.hasOwnProperty(value))
1738
+ return "support.function";
1739
+ else if (colors.hasOwnProperty(value.toLowerCase()))
1740
+ return "support.constant.color";
1741
+ else if (tags.hasOwnProperty(value.toLowerCase()))
1742
+ return "variable.language";
1743
+ else
1744
+ return "text";
1745
+ },
1746
+ regex : "\\-?[@a-z_][@a-z0-9_\\-]*"
1747
+ }, {
1748
+ token: "variable.language",
1749
+ regex: "#[a-z0-9-_]+"
1750
+ }, {
1751
+ token: "variable.language",
1752
+ regex: "\\.[a-z0-9-_]+"
1753
+ }, {
1754
+ token: "variable.language",
1755
+ regex: ":[a-z0-9-_]+"
1756
+ }, {
1757
+ token: "constant",
1758
+ regex: "[a-z0-9-_]+"
1759
+ }, {
1760
+ token : "keyword.operator",
1761
+ regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"
1762
+ }, {
1763
+ token : "paren.lparen",
1764
+ regex : "[[({]"
1765
+ }, {
1766
+ token : "paren.rparen",
1767
+ regex : "[\\])}]"
1768
+ }, {
1769
+ token : "text",
1770
+ regex : "\\s+"
1771
+ }, {
1772
+ caseInsensitive: true
1773
+ }
1774
+ ],
1775
+ "comment" : [
1776
+ {
1777
+ token : "comment", // closing comment
1778
+ regex : ".*?\\*\\/",
1779
+ next : "start"
1780
+ }, {
1781
+ token : "comment", // comment spanning whole line
1782
+ regex : ".+"
1783
+ }
1784
+ ]
1785
+ };
1786
+ };
1787
+
1788
+ oop.inherits(LessHighlightRules, TextHighlightRules);
1789
+
1790
+ exports.LessHighlightRules = LessHighlightRules;
1791
+
1792
+ });
1793
+
1794
+ define('ace/mode/coffee_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1795
+
1796
+
1797
+ var oop = require("../lib/oop");
1798
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1799
+
1800
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
1801
+
1802
+ function CoffeeHighlightRules() {
1803
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
1804
+
1805
+ var keywords = (
1806
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
1807
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
1808
+ "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" +
1809
+ "or|on|unless|until|and|yes"
1810
+ );
1811
+
1812
+ var langConstant = (
1813
+ "true|false|null|undefined|NaN|Infinity"
1814
+ );
1815
+
1816
+ var illegal = (
1817
+ "case|const|default|function|var|void|with|enum|export|implements|" +
1818
+ "interface|let|package|private|protected|public|static|yield|" +
1819
+ "__hasProp|slice|bind|indexOf"
1820
+ );
1821
+
1822
+ var supportClass = (
1823
+ "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" +
1824
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
1825
+ "SyntaxError|TypeError|URIError|" +
1826
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
1827
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray"
1828
+ );
1829
+
1830
+ var supportFunction = (
1831
+ "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" +
1832
+ "encodeURIComponent|decodeURI|decodeURIComponent|String|"
1833
+ );
1834
+
1835
+ var variableLanguage = (
1836
+ "window|arguments|prototype|document"
1837
+ );
1838
+
1839
+ var keywordMapper = this.createKeywordMapper({
1840
+ "keyword": keywords,
1841
+ "constant.language": langConstant,
1842
+ "invalid.illegal": illegal,
1843
+ "language.support.class": supportClass,
1844
+ "language.support.function": supportFunction,
1845
+ "variable.language": variableLanguage
1846
+ }, "identifier");
1847
+
1848
+ var functionRule = {
1849
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
1850
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source
1851
+ };
1852
+
1853
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
1854
+
1855
+ this.$rules = {
1856
+ start : [
1857
+ {
1858
+ token : "constant.numeric",
1859
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
1860
+ }, {
1861
+ stateName: "qdoc",
1862
+ token : "string", regex : "'''", next : [
1863
+ {token : "string", regex : "'''", next : "start"},
1864
+ {token : "constant.language.escape", regex : stringEscape},
1865
+ {defaultToken: "string"}
1866
+ ]
1867
+ }, {
1868
+ stateName: "qqdoc",
1869
+ token : "string",
1870
+ regex : '"""',
1871
+ next : [
1872
+ {token : "string", regex : '"""', next : "start"},
1873
+ {token : "paren.string", regex : '#{', push : "start"},
1874
+ {token : "constant.language.escape", regex : stringEscape},
1875
+ {defaultToken: "string"}
1876
+ ]
1877
+ }, {
1878
+ stateName: "qstring",
1879
+ token : "string", regex : "'", next : [
1880
+ {token : "string", regex : "'", next : "start"},
1881
+ {token : "constant.language.escape", regex : stringEscape},
1882
+ {defaultToken: "string"}
1883
+ ]
1884
+ }, {
1885
+ stateName: "qqstring",
1886
+ token : "string.start", regex : '"', next : [
1887
+ {token : "string.end", regex : '"', next : "start"},
1888
+ {token : "paren.string", regex : '#{', push : "start"},
1889
+ {token : "constant.language.escape", regex : stringEscape},
1890
+ {defaultToken: "string"}
1891
+ ]
1892
+ }, {
1893
+ stateName: "js",
1894
+ token : "string", regex : "`", next : [
1895
+ {token : "string", regex : "`", next : "start"},
1896
+ {token : "constant.language.escape", regex : stringEscape},
1897
+ {defaultToken: "string"}
1898
+ ]
1899
+ }, {
1900
+ regex: "[{}]", onMatch: function(val, state, stack) {
1901
+ this.next = "";
1902
+ if (val == "{" && stack.length) {
1903
+ stack.unshift("start", state);
1904
+ return "paren";
1905
+ }
1906
+ if (val == "}" && stack.length) {
1907
+ stack.shift();
1908
+ this.next = stack.shift();
1909
+ if (this.next.indexOf("string") != -1)
1910
+ return "paren.string";
1911
+ }
1912
+ return "paren";
1913
+ }
1914
+ }, {
1915
+ token : "string.regex",
1916
+ regex : "///",
1917
+ next : "heregex"
1918
+ }, {
1919
+ token : "string.regex",
1920
+ regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/
1921
+ }, {
1922
+ token : "comment",
1923
+ regex : "###(?!#)",
1924
+ next : "comment"
1925
+ }, {
1926
+ token : "comment",
1927
+ regex : "#.*"
1928
+ }, {
1929
+ token : ["punctuation.operator", "text", "identifier"],
1930
+ regex : "(\\.)(\\s*)(" + illegal + ")"
1931
+ }, {
1932
+ token : "punctuation.operator",
1933
+ regex : "\\."
1934
+ }, {
1935
+ token : ["keyword", "text", "language.support.class",
1936
+ "text", "keyword", "text", "language.support.class"],
1937
+ regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
1938
+ }, {
1939
+ token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
1940
+ regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
1941
+ },
1942
+ functionRule,
1943
+ {
1944
+ token : "variable",
1945
+ regex : "@(?:" + identifier + ")?"
1946
+ }, {
1947
+ token: keywordMapper,
1948
+ regex : identifier
1949
+ }, {
1950
+ token : "punctuation.operator",
1951
+ regex : "\\,|\\."
1952
+ }, {
1953
+ token : "storage.type",
1954
+ regex : "[\\-=]>"
1955
+ }, {
1956
+ token : "keyword.operator",
1957
+ regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])"
1958
+ }, {
1959
+ token : "paren.lparen",
1960
+ regex : "[({[]"
1961
+ }, {
1962
+ token : "paren.rparen",
1963
+ regex : "[\\]})]"
1964
+ }, {
1965
+ token : "text",
1966
+ regex : "\\s+"
1967
+ }],
1968
+
1969
+
1970
+ heregex : [{
1971
+ token : "string.regex",
1972
+ regex : '.*?///[imgy]{0,4}',
1973
+ next : "start"
1974
+ }, {
1975
+ token : "comment.regex",
1976
+ regex : "\\s+(?:#.*)?"
1977
+ }, {
1978
+ token : "string.regex",
1979
+ regex : "\\S+"
1980
+ }],
1981
+
1982
+ comment : [{
1983
+ token : "comment",
1984
+ regex : '###',
1985
+ next : "start"
1986
+ }, {
1987
+ defaultToken : "comment"
1988
+ }]
1989
+ };
1990
+ this.normalizeRules();
1991
+ }
1992
+
1993
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
1994
+ });
1995
+
1996
+ define('ace/mode/folding/coffee', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(require, exports, module) {
1997
+
1998
+
1999
+ var oop = require("../../lib/oop");
2000
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2001
+ var Range = require("../../range").Range;
2002
+
2003
+ var FoldMode = exports.FoldMode = function() {};
2004
+ oop.inherits(FoldMode, BaseFoldMode);
2005
+
2006
+ (function() {
2007
+
2008
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2009
+ var range = this.indentationBlock(session, row);
2010
+ if (range)
2011
+ return range;
2012
+
2013
+ var re = /\S/;
2014
+ var line = session.getLine(row);
2015
+ var startLevel = line.search(re);
2016
+ if (startLevel == -1 || line[startLevel] != "#")
2017
+ return;
2018
+
2019
+ var startColumn = line.length;
2020
+ var maxRow = session.getLength();
2021
+ var startRow = row;
2022
+ var endRow = row;
2023
+
2024
+ while (++row < maxRow) {
2025
+ line = session.getLine(row);
2026
+ var level = line.search(re);
2027
+
2028
+ if (level == -1)
2029
+ continue;
2030
+
2031
+ if (line[level] != "#")
2032
+ break;
2033
+
2034
+ endRow = row;
2035
+ }
2036
+
2037
+ if (endRow > startRow) {
2038
+ var endColumn = session.getLine(endRow).length;
2039
+ return new Range(startRow, startColumn, endRow, endColumn);
2040
+ }
2041
+ };
2042
+ this.getFoldWidget = function(session, foldStyle, row) {
2043
+ var line = session.getLine(row);
2044
+ var indent = line.search(/\S/);
2045
+ var next = session.getLine(row + 1);
2046
+ var prev = session.getLine(row - 1);
2047
+ var prevIndent = prev.search(/\S/);
2048
+ var nextIndent = next.search(/\S/);
2049
+
2050
+ if (indent == -1) {
2051
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
2052
+ return "";
2053
+ }
2054
+ if (prevIndent == -1) {
2055
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
2056
+ session.foldWidgets[row - 1] = "";
2057
+ session.foldWidgets[row + 1] = "";
2058
+ return "start";
2059
+ }
2060
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
2061
+ if (session.getLine(row - 2).search(/\S/) == -1) {
2062
+ session.foldWidgets[row - 1] = "start";
2063
+ session.foldWidgets[row + 1] = "";
2064
+ return "";
2065
+ }
2066
+ }
2067
+
2068
+ if (prevIndent!= -1 && prevIndent < indent)
2069
+ session.foldWidgets[row - 1] = "start";
2070
+ else
2071
+ session.foldWidgets[row - 1] = "";
2072
+
2073
+ if (indent < nextIndent)
2074
+ return "start";
2075
+ else
2076
+ return "";
2077
+ };
2078
+
2079
+ }).call(FoldMode.prototype);
2080
+
2081
+ });