ace-rails-ap 0.0.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (267) hide show
  1. data/lib/ace/rails/version.rb +1 -1
  2. data/vendor/assets/javascripts/ace.js +15680 -1
  3. data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
  4. data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
  5. data/vendor/assets/javascripts/mode-c9search.js +275 -0
  6. data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
  7. data/vendor/assets/javascripts/mode-clojure.js +364 -1
  8. data/vendor/assets/javascripts/mode-coffee.js +527 -1
  9. data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
  10. data/vendor/assets/javascripts/mode-csharp.js +633 -1
  11. data/vendor/assets/javascripts/mode-css.js +499 -1
  12. data/vendor/assets/javascripts/mode-diff.js +250 -0
  13. data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
  14. data/vendor/assets/javascripts/mode-golang.js +681 -1
  15. data/vendor/assets/javascripts/mode-groovy.js +1240 -1
  16. data/vendor/assets/javascripts/mode-haxe.js +633 -1
  17. data/vendor/assets/javascripts/mode-html.js +2064 -1
  18. data/vendor/assets/javascripts/mode-java.js +1202 -1
  19. data/vendor/assets/javascripts/mode-javascript.js +1069 -1
  20. data/vendor/assets/javascripts/mode-json.js +588 -1
  21. data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
  22. data/vendor/assets/javascripts/mode-latex.js +95 -1
  23. data/vendor/assets/javascripts/mode-less.js +512 -1
  24. data/vendor/assets/javascripts/mode-liquid.js +1125 -1
  25. data/vendor/assets/javascripts/mode-lua.js +551 -1
  26. data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
  27. data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
  28. data/vendor/assets/javascripts/mode-markdown.js +2369 -1
  29. data/vendor/assets/javascripts/mode-ocaml.js +464 -1
  30. data/vendor/assets/javascripts/mode-perl.js +432 -1
  31. data/vendor/assets/javascripts/mode-pgsql.js +970 -1
  32. data/vendor/assets/javascripts/mode-php.js +1718 -1
  33. data/vendor/assets/javascripts/mode-powershell.js +610 -1
  34. data/vendor/assets/javascripts/mode-python.js +397 -1
  35. data/vendor/assets/javascripts/mode-ruby.js +318 -1
  36. data/vendor/assets/javascripts/mode-scad.js +732 -1
  37. data/vendor/assets/javascripts/mode-scala.js +1237 -1
  38. data/vendor/assets/javascripts/mode-scss.js +537 -1
  39. data/vendor/assets/javascripts/mode-sh.js +250 -1
  40. data/vendor/assets/javascripts/mode-sql.js +140 -1
  41. data/vendor/assets/javascripts/mode-svg.js +1681 -1
  42. data/vendor/assets/javascripts/mode-tcl.js +320 -0
  43. data/vendor/assets/javascripts/mode-textile.js +182 -1
  44. data/vendor/assets/javascripts/mode-xml.js +829 -1
  45. data/vendor/assets/javascripts/mode-xquery.js +605 -1
  46. data/vendor/assets/javascripts/mode-yaml.js +189 -0
  47. data/vendor/assets/javascripts/theme-chrome.js +213 -1
  48. data/vendor/assets/javascripts/theme-clouds.js +167 -1
  49. data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
  50. data/vendor/assets/javascripts/theme-cobalt.js +194 -1
  51. data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
  52. data/vendor/assets/javascripts/theme-dawn.js +198 -1
  53. data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
  54. data/vendor/assets/javascripts/theme-eclipse.js +157 -1
  55. data/vendor/assets/javascripts/theme-github.js +182 -0
  56. data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
  57. data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
  58. data/vendor/assets/javascripts/theme-merbivore.js +189 -1
  59. data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
  60. data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
  61. data/vendor/assets/javascripts/theme-monokai.js +194 -1
  62. data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
  63. data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
  64. data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
  65. data/vendor/assets/javascripts/theme-textmate.js +216 -0
  66. data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
  67. data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
  68. data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
  69. data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
  70. data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
  71. data/vendor/assets/javascripts/theme-twilight.js +211 -1
  72. data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
  73. data/vendor/assets/javascripts/worker-coffee.js +83 -893
  74. data/vendor/assets/javascripts/worker-css.js +88 -1402
  75. data/vendor/assets/javascripts/worker-javascript.js +97 -812
  76. data/vendor/assets/javascripts/worker-json.js +84 -761
  77. data/vendor/assets/javascripts/worker-xquery.js +66464 -0
  78. metadata +12 -195
  79. data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
  80. data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
  81. data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
  82. data/vendor/assets/javascripts/ace-compat.js +0 -1
  83. data/vendor/assets/javascripts/ace-noconflict.js +0 -10
  84. data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
  85. data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
  86. data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
  87. data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
  88. data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
  89. data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
  90. data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
  91. data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
  92. data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
  93. data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
  94. data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
  95. data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
  96. data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
  97. data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
  98. data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
  99. data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
  100. data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
  101. data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
  102. data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
  103. data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
  104. data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
  105. data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
  106. data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
  107. data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
  108. data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
  109. data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
  110. data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
  111. data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
  112. data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
  113. data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
  114. data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
  115. data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
  116. data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
  117. data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
  118. data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
  119. data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
  120. data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
  121. data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
  122. data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
  123. data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
  124. data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
  125. data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
  126. data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
  127. data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
  128. data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
  129. data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
  130. data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
  131. data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
  132. data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
  133. data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
  134. data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
  135. data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
  136. data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
  137. data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
  138. data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
  139. data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
  140. data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
  141. data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
  142. data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
  143. data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
  144. data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
  145. data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
  146. data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
  147. data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
  148. data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
  149. data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
  150. data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
  151. data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
  152. data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
  153. data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
  154. data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
  155. data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
  156. data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
  157. data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
  158. data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
  159. data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
  160. data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
  161. data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
  162. data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
  163. data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
  164. data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
  165. data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
  166. data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
  167. data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
  168. data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
  169. data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
  170. data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
  171. data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
  172. data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
  173. data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
  174. data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
  175. data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
  176. data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
  177. data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
  178. data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
  179. data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
  180. data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
  181. data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
  182. data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
  183. data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
  184. data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
  185. data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
  186. data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
  187. data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
  188. data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
  189. data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
  190. data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
  191. data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
  192. data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
  193. data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
  194. data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
  195. data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
  196. data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
  197. data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
  198. data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
  199. data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
  200. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
  201. data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
  202. data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
  203. data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
  204. data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
  205. data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
  206. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
  207. data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
  208. data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
  209. data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
  210. data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
  211. data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
  212. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
  213. data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
  214. data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
  215. data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
  216. data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
  217. data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
  218. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
  219. data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
  220. data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
  221. data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
  222. data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
  223. data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
  224. data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
  225. data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
  226. data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
  227. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
  228. data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
  229. data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
  230. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
  231. data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
  232. data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
  233. data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
  234. data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
  235. data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
  236. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
  237. data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
  238. data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
  239. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
  240. data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
  241. data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
  242. data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
  243. data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
  244. data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
  245. data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
  246. data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
  247. data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
  248. data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
  249. data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
  250. data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
  251. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
  252. data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
  253. data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
  254. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
  255. data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
  256. data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
  257. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
  258. data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
  259. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
  260. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
  261. data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
  262. data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
  263. data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
  264. data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
  265. data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
  266. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
  267. data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
@@ -1 +1,1966 @@
1
- define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/coldfusion_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml").Mode,f=a("./javascript").Mode,g=a("./css").Mode,h=a("../tokenizer").Tokenizer,i=a("./coldfusion_highlight_rules").ColdfusionHighlightRules,j=function(){e.call(this);var a=new i;this.$tokenizer=new h(a.getRules()),this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g})};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./xml_highlight_rules").XmlHighlightRules,h=a("./behaviour/xml").XmlBehaviour,i=a("./folding/xml").FoldMode,j=function(){this.$tokenizer=new f((new g).getRules()),this.$behaviour=new h,this.foldingRules=new i};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)}}.call(j.prototype),b.Mode=j}),define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/xml_util","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./xml_util"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"xml_pe",regex:"<\\!.*?>"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"constant.character.entity",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},e.tag(this.$rules,"tag","start")};d.inherits(g,f),b.XmlHighlightRules=g}),define("ace/mode/xml_util",["require","exports","module","ace/lib/lang"],function(a,b,c){function g(a){return[{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*',next:a+"_qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*",next:a+"_qstring"}]}function h(a,b){return[{token:"string",merge:!0,regex:".*?"+a,next:b},{token:"string",merge:!0,regex:".+"}]}"use strict";var d=a("../lib/lang"),e=d.arrayToMap("button|form|input|label|select|textarea".split("|")),f=d.arrayToMap("table|tbody|td|tfoot|th|tr".split("|"));b.tag=function(a,b,c){a[b]=[{token:"text",regex:"\\s+"},{token:function(a){return a==="a"?"meta.tag.anchor":a==="img"?"meta.tag.image":a==="script"?"meta.tag.script":a==="style"?"meta.tag.style":e.hasOwnProperty(a.toLowerCase())?"meta.tag.form":f.hasOwnProperty(a.toLowerCase())?"meta.tag.table":"meta.tag"},merge:!0,regex:"[-_a-zA-Z0-9:]+",next:b+"_embed_attribute_list"},{token:"empty",regex:"",next:b+"_embed_attribute_list"}],a[b+"_qstring"]=h("'",b+"_embed_attribute_list"),a[b+"_qqstring"]=h('"',b+"_embed_attribute_list"),a[b+"_embed_attribute_list"]=[{token:"meta.tag",merge:!0,regex:"/?>",next:c},{token:"keyword.operator",regex:"="},{token:"entity.other.attribute-name",regex:"[-_a-zA-Z0-9:]+"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"text",regex:"\\s+"}].concat(g(b))}}),define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=a("./cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="</"){var l=this.$getIndent(d.doc.getLine(h.row))+d.getTabString(),m=this.$getIndent(d.doc.getLine(h.row));return{text:"\n"+l+"\n"+m,selection:[1,l.length,1,l.length]}}}})};d.inherits(g,e),b.XmlBehaviour=g}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row,g.start.row)[0].tokens,m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../lib/lang"),f=a("../../range").Range,g=a("./fold_mode").FoldMode,h=a("../../token_iterator").TokenIterator,i=b.FoldMode=function(a){g.call(this),this.voidElements=a||{}};d.inherits(i,g),function(){this.getFoldWidget=function(a,b,c){var d=this._getFirstTagInLine(a,c);return d.closing?b=="markbeginend"?"end":"":!d.tagName||this.voidElements[d.tagName.toLowerCase()]?"":d.selfClosing?"":d.value.indexOf("/"+d.tagName)!==-1?"":"start"},this._getFirstTagInLine=function(a,b){var c=a.getTokens(b,b)[0].tokens,d="";for(var f=0;f<c.length;f++){var g=c[f];g.type.indexOf("meta.tag")===0?d+=g.value:d+=e.stringRepeat(" ",g.value.length)}return this._parseTag(d)},this.tagRe=/^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/,this._parseTag=function(a){var b=this.tagRe.exec(a),c=this.tagRe.lastIndex||0;return this.tagRe.lastIndex=0,{value:a,match:b?b[2]:"",closing:b?!!b[3]:!1,selfClosing:b?!!b[5]||b[2]=="/>":!1,tagName:b?b[4]:"",column:b[1]?c+b[1].length:c}},this._readTagForward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){if(!d)var d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()};c+=b.value;if(c.indexOf(">")!==-1){var e=this._parseTag(c);return e.start=d,e.end={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length},a.stepForward(),e}}while(b=a.stepForward());return null},this._readTagBackward=function(a){var b=a.getCurrentToken();if(!b)return null;var c="",d;do if(b.type.indexOf("meta.tag")===0){d||(d={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()+b.value.length}),c=b.value+c;if(c.indexOf("<")!==-1){var e=this._parseTag(c);return e.end=d,e.start={row:a.getCurrentTokenRow(),column:a.getCurrentTokenColumn()},a.stepBackward(),e}}while(b=a.stepBackward());return null},this._pop=function(a,b){while(a.length){var c=a[a.length-1];if(!b||c.tagName==b.tagName)return a.pop();if(this.voidElements[b.tagName])return;if(this.voidElements[c.tagName]){a.pop();continue}return null}},this.getFoldWidgetRange=function(a,b,c){var d=this._getFirstTagInLine(a,c);if(!d.match)return null;var e=d.closing||d.selfClosing,g=[],i;if(!e){var j=new h(a,c,d.column),k={row:c,column:d.column+d.tagName.length+2};while(i=this._readTagForward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(i.closing){this._pop(g,i);if(g.length==0)return f.fromPoints(k,i.start)}else g.push(i)}}else{var j=new h(a,c,d.column+d.match.length),l={row:c,column:d.column};while(i=this._readTagBackward(j)){if(i.selfClosing){if(!g.length)return i.start.column+=i.tagName.length+2,i.end.column-=2,f.fromPoints(i.start,i.end);continue}if(!i.closing){this._pop(g,i);if(g.length==0)return i.start.column+=i.tagName.length+2,f.fromPoints(i.start,l)}else g.push(i)}}}}.call(i.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/^\s*/,f=b,g=b,h=a.getLine(b),i=c||h.length,j=h.match(e)[0].length,k=a.getLength();while(++b<k){h=a.getLine(b);var l=h.match(e)[0].length;if(l==h.length)continue;if(l<=j)break;g=b}if(g>f){var m=a.getLine(g).length;return new d(f,i,g,m)}},this.openingBracketBlock=function(a,b,c,e){var f={row:c,column:e+1},g=a.$findClosingBracket(b,f);if(!g)return;var h=a.foldWidgets[g.row];return h==null&&(h=this.getFoldWidget(a,g.row)),h=="start"&&(g.row--,g.column=a.getLine(g.row).length),d.fromPoints(f,g)}}).call(e.prototype)}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?: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]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/},{token:["punctuation.operator","support.function.dom"],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(?=\()/},{token:["punctuation.operator","support.constant"],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/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/folding/cstyle"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./css_highlight_rules").CssHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../worker/worker_client").WorkerClient,j=a("./folding/cstyle").FoldMode,k=function(){this.$tokenizer=new f((new g).getRules(),"i"),this.$outdent=new h,this.foldingRules=new j};d.inherits(k,e),function(){this.foldingRules="cStyle",this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);return f&&(d+=c),d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new i(["ace"],"worker-css.js","ace/mode/css_worker","Worker");return b.attachToDocument(a.getDocument()),b.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)}),b}}.call(k.prototype),b.Mode=k}),define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("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|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".split("|")),b=e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),c=e.arrayToMap("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero".split("|")),d=e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),f=e.arrayToMap("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace".split("|")),g="\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",h="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",i="(:)\\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",j=[{token:"comment",merge:!0,regex:"\\/\\*",next:"ruleset_comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:["constant.numeric","keyword"],regex:"("+g+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)"},{token:["constant.numeric"],regex:"([0-9]+)"},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:i},{token:function(e){return a.hasOwnProperty(e.toLowerCase())?"support.type":b.hasOwnProperty(e.toLowerCase())?"support.function":c.hasOwnProperty(e.toLowerCase())?"support.constant":d.hasOwnProperty(e.toLowerCase())?"support.constant.color":f.hasOwnProperty(e.toLowerCase())?"support.constant.fonts":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],k=e.copyArray(j);k.unshift({token:"paren.rparen",regex:"\\}",next:"start"});var l=e.copyArray(j);l.unshift({token:"paren.rparen",regex:"\\}",next:"media"});var m=[{token:"comment",merge:!0,regex:".+"}],n=e.copyArray(m);n.unshift({token:"comment",regex:".*?\\*\\/",next:"start"});var o=e.copyArray(m);o.unshift({token:"comment",regex:".*?\\*\\/",next:"media"});var p=e.copyArray(m);p.unshift({token:"comment",regex:".*?\\*\\/",next:"ruleset"}),this.$rules={start:[{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"string",regex:"@.*?{",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],media:[{token:"comment",merge:!0,regex:"\\/\\*",next:"media_comment"},{token:"paren.lparen",regex:"\\{",next:"media_ruleset"},{token:"string",regex:"\\}",next:"start"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant",regex:"[a-z0-9-_]+"}],comment:n,ruleset:k,ruleset_comment:p,media_ruleset:l,media_comment:o}};d.inherits(g,f),b.CssHighlightRules=g}),define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules","ace/mode/xml_util"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./css_highlight_rules").CssHighlightRules,f=a("./javascript_highlight_rules").JavaScriptHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=a("./xml_util"),i=function(){this.$rules={start:[{token:"text",merge:!0,regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"meta.tag",regex:"<(?=s*script)",next:"script"},{token:"meta.tag",regex:"<(?=s*style)",next:"style"},{token:"meta.tag",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},h.tag(this.$rules,"tag","start"),h.tag(this.$rules,"style","css-start"),h.tag(this.$rules,"script","js-start"),this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"meta.tag",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"meta.tag",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(i,g),b.ColdfusionHighlightRules=i})
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3
+ *
4
+ * The contents of this file are subject to the Mozilla Public License Version
5
+ * 1.1 (the "License"); you may not use this file except in compliance with
6
+ * the License. You may obtain a copy of the License at
7
+ * http://www.mozilla.org/MPL/
8
+ *
9
+ * Software distributed under the License is distributed on an "AS IS" basis,
10
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11
+ * for the specific language governing rights and limitations under the
12
+ * License.
13
+ *
14
+ * The Original Code is Ajax.org Code Editor (ACE).
15
+ *
16
+ * The Initial Developer of the Original Code is
17
+ * Ajax.org B.V.
18
+ * Portions created by the Initial Developer are Copyright (C) 2010
19
+ * the Initial Developer. All Rights Reserved.
20
+ *
21
+ * Contributor(s):
22
+ * Fabian Jakobs <fabian AT ajax DOT org>
23
+ *
24
+ * Alternatively, the contents of this file may be used under the terms of
25
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
26
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
+ * in which case the provisions of the GPL or the LGPL are applicable instead
28
+ * of those above. If you wish to allow use of your version of this file only
29
+ * under the terms of either the GPL or the LGPL, and not to allow others to
30
+ * use your version of this file under the terms of the MPL, indicate your
31
+ * decision by deleting the provisions above and replace them with the notice
32
+ * and other provisions required by the GPL or the LGPL. If you do not delete
33
+ * the provisions above, a recipient may use your version of this file under
34
+ * the terms of any one of the MPL, the GPL or the LGPL.
35
+ *
36
+ * ***** END LICENSE BLOCK ***** */
37
+
38
+ define('ace/mode/coldfusion', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/coldfusion_highlight_rules'], function(require, exports, module) {
39
+
40
+
41
+ var oop = require("../lib/oop");
42
+ var XmlMode = require("./xml").Mode;
43
+ var JavaScriptMode = require("./javascript").Mode;
44
+ var CssMode = require("./css").Mode;
45
+ var Tokenizer = require("../tokenizer").Tokenizer;
46
+ var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
47
+
48
+ var Mode = function() {
49
+ XmlMode.call(this);
50
+
51
+ var highlighter = new ColdfusionHighlightRules();
52
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
53
+
54
+ this.$embeds = highlighter.getEmbeds();
55
+ this.createModeDelegates({
56
+ "js-": JavaScriptMode,
57
+ "css-": CssMode
58
+ });
59
+ };
60
+ oop.inherits(Mode, XmlMode);
61
+
62
+ (function() {
63
+
64
+ this.getNextLineIndent = function(state, line, tab) {
65
+ return this.$getIndent(line);
66
+ };
67
+
68
+ }).call(Mode.prototype);
69
+
70
+ exports.Mode = Mode;
71
+ });
72
+
73
+ define('ace/mode/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(require, exports, module) {
74
+
75
+
76
+ var oop = require("../lib/oop");
77
+ var TextMode = require("./text").Mode;
78
+ var Tokenizer = require("../tokenizer").Tokenizer;
79
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
80
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
81
+ var XmlFoldMode = require("./folding/xml").FoldMode;
82
+
83
+ var Mode = function() {
84
+ this.$tokenizer = new Tokenizer(new XmlHighlightRules().getRules());
85
+ this.$behaviour = new XmlBehaviour();
86
+ this.foldingRules = new XmlFoldMode();
87
+ };
88
+
89
+ oop.inherits(Mode, TextMode);
90
+
91
+ (function() {
92
+
93
+ this.getNextLineIndent = function(state, line, tab) {
94
+ return this.$getIndent(line);
95
+ };
96
+
97
+ }).call(Mode.prototype);
98
+
99
+ exports.Mode = Mode;
100
+ });
101
+
102
+ 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) {
103
+
104
+
105
+ var oop = require("../lib/oop");
106
+ var xmlUtil = require("./xml_util");
107
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
108
+
109
+ var XmlHighlightRules = function() {
110
+
111
+ // regexp must not have capturing parentheses
112
+ // regexps are ordered -> the first match is used
113
+ this.$rules = {
114
+ start : [{
115
+ token : "text",
116
+ regex : "<\\!\\[CDATA\\[",
117
+ next : "cdata"
118
+ }, {
119
+ token : "xml_pe",
120
+ regex : "<\\?.*?\\?>"
121
+ }, {
122
+ token : "comment",
123
+ merge : true,
124
+ regex : "<\\!--",
125
+ next : "comment"
126
+ }, {
127
+ token : "xml_pe",
128
+ regex : "<\\!.*?>"
129
+ }, {
130
+ token : "meta.tag", // opening tag
131
+ regex : "<\\/?",
132
+ next : "tag"
133
+ }, {
134
+ token : "text",
135
+ regex : "\\s+"
136
+ }, {
137
+ token : "constant.character.entity",
138
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
139
+ }, {
140
+ token : "text",
141
+ regex : "[^<]+"
142
+ }],
143
+
144
+ cdata : [{
145
+ token : "text",
146
+ regex : "\\]\\]>",
147
+ next : "start"
148
+ }, {
149
+ token : "text",
150
+ regex : "\\s+"
151
+ }, {
152
+ token : "text",
153
+ regex : "(?:[^\\]]|\\](?!\\]>))+"
154
+ }],
155
+
156
+ comment : [{
157
+ token : "comment",
158
+ regex : ".*?-->",
159
+ next : "start"
160
+ }, {
161
+ token : "comment",
162
+ merge : true,
163
+ regex : ".+"
164
+ }]
165
+ };
166
+
167
+ xmlUtil.tag(this.$rules, "tag", "start");
168
+ };
169
+
170
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
171
+
172
+ exports.XmlHighlightRules = XmlHighlightRules;
173
+ });
174
+
175
+ define('ace/mode/xml_util', ['require', 'exports', 'module' ], function(require, exports, module) {
176
+
177
+
178
+ function string(state) {
179
+ return [{
180
+ token : "string",
181
+ regex : '".*?"'
182
+ }, {
183
+ token : "string", // multi line string start
184
+ merge : true,
185
+ regex : '["].*',
186
+ next : state + "_qqstring"
187
+ }, {
188
+ token : "string",
189
+ regex : "'.*?'"
190
+ }, {
191
+ token : "string", // multi line string start
192
+ merge : true,
193
+ regex : "['].*",
194
+ next : state + "_qstring"
195
+ }];
196
+ }
197
+
198
+ function multiLineString(quote, state) {
199
+ return [{
200
+ token : "string",
201
+ merge : true,
202
+ regex : ".*?" + quote,
203
+ next : state
204
+ }, {
205
+ token : "string",
206
+ merge : true,
207
+ regex : '.+'
208
+ }];
209
+ }
210
+
211
+ exports.tag = function(states, name, nextState, tagMap) {
212
+ states[name] = [{
213
+ token : "text",
214
+ regex : "\\s+"
215
+ }, {
216
+ //token : "meta.tag",
217
+
218
+ token : !tagMap ? "meta.tag.tag-name" : function(value) {
219
+ if (tagMap[value])
220
+ return "meta.tag.tag-name." + tagMap[value];
221
+ else
222
+ return "meta.tag.tag-name";
223
+ },
224
+ merge : true,
225
+ regex : "[-_a-zA-Z0-9:]+",
226
+ next : name + "_embed_attribute_list"
227
+ }, {
228
+ token: "empty",
229
+ regex: "",
230
+ next : name + "_embed_attribute_list"
231
+ }];
232
+
233
+ states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list");
234
+ states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list");
235
+
236
+ states[name + "_embed_attribute_list"] = [{
237
+ token : "meta.tag",
238
+ merge : true,
239
+ regex : "\/?>",
240
+ next : nextState
241
+ }, {
242
+ token : "keyword.operator",
243
+ regex : "="
244
+ }, {
245
+ token : "entity.other.attribute-name",
246
+ regex : "[-_a-zA-Z0-9:]+"
247
+ }, {
248
+ token : "constant.numeric", // float
249
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
250
+ }, {
251
+ token : "text",
252
+ regex : "\\s+"
253
+ }].concat(string(name));
254
+ };
255
+
256
+ });
257
+
258
+ define('ace/mode/behaviour/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(require, exports, module) {
259
+
260
+
261
+ var oop = require("../../lib/oop");
262
+ var Behaviour = require("../behaviour").Behaviour;
263
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
264
+ var TokenIterator = require("../../token_iterator").TokenIterator;
265
+
266
+ function hasType(token, type) {
267
+ var hasType = true;
268
+ var typeList = token.type.split('.');
269
+ var needleList = type.split('.');
270
+ needleList.forEach(function(needle){
271
+ if (typeList.indexOf(needle) == -1) {
272
+ hasType = false;
273
+ return false;
274
+ }
275
+ });
276
+ return hasType;
277
+ }
278
+
279
+ var XmlBehaviour = function () {
280
+
281
+ this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour
282
+
283
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
284
+ if (text == '>') {
285
+ var position = editor.getCursorPosition();
286
+ var iterator = new TokenIterator(session, position.row, position.column);
287
+ var token = iterator.getCurrentToken();
288
+ var atCursor = false;
289
+ if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){
290
+ do {
291
+ token = iterator.stepBackward();
292
+ } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text')));
293
+ } else {
294
+ atCursor = true;
295
+ }
296
+ if (!token || !hasType(token, 'meta.tag-name') || iterator.stepBackward().value.match('/')) {
297
+ return
298
+ }
299
+ var tag = token.value;
300
+ if (atCursor){
301
+ var tag = tag.substring(0, position.column - token.start);
302
+ }
303
+
304
+ return {
305
+ text: '>' + '</' + tag + '>',
306
+ selection: [1, 1]
307
+ }
308
+ }
309
+ });
310
+
311
+ this.add('autoindent', 'insertion', function (state, action, editor, session, text) {
312
+ if (text == "\n") {
313
+ var cursor = editor.getCursorPosition();
314
+ var line = session.doc.getLine(cursor.row);
315
+ var rightChars = line.substring(cursor.column, cursor.column + 2);
316
+ if (rightChars == '</') {
317
+ var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
318
+ var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
319
+
320
+ return {
321
+ text: '\n' + indent + '\n' + next_indent,
322
+ selection: [1, indent.length, 1, indent.length]
323
+ }
324
+ }
325
+ }
326
+ });
327
+
328
+ }
329
+ oop.inherits(XmlBehaviour, Behaviour);
330
+
331
+ exports.XmlBehaviour = XmlBehaviour;
332
+ });
333
+
334
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour'], function(require, exports, module) {
335
+
336
+
337
+ var oop = require("../../lib/oop");
338
+ var Behaviour = require("../behaviour").Behaviour;
339
+
340
+ var CstyleBehaviour = function () {
341
+
342
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
343
+ if (text == '{') {
344
+ var selection = editor.getSelectionRange();
345
+ var selected = session.doc.getTextRange(selection);
346
+ if (selected !== "") {
347
+ return {
348
+ text: '{' + selected + '}',
349
+ selection: false
350
+ };
351
+ } else {
352
+ return {
353
+ text: '{}',
354
+ selection: [1, 1]
355
+ };
356
+ }
357
+ } else if (text == '}') {
358
+ var cursor = editor.getCursorPosition();
359
+ var line = session.doc.getLine(cursor.row);
360
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
361
+ if (rightChar == '}') {
362
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
363
+ if (matching !== null) {
364
+ return {
365
+ text: '',
366
+ selection: [1, 1]
367
+ };
368
+ }
369
+ }
370
+ } else if (text == "\n") {
371
+ var cursor = editor.getCursorPosition();
372
+ var line = session.doc.getLine(cursor.row);
373
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
374
+ if (rightChar == '}') {
375
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column + 1});
376
+ if (!openBracePos)
377
+ return null;
378
+
379
+ var indent = this.getNextLineIndent(state, line.substring(0, line.length - 1), session.getTabString());
380
+ var next_indent = this.$getIndent(session.doc.getLine(openBracePos.row));
381
+
382
+ return {
383
+ text: '\n' + indent + '\n' + next_indent,
384
+ selection: [1, indent.length, 1, indent.length]
385
+ };
386
+ }
387
+ }
388
+ });
389
+
390
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
391
+ var selected = session.doc.getTextRange(range);
392
+ if (!range.isMultiLine() && selected == '{') {
393
+ var line = session.doc.getLine(range.start.row);
394
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
395
+ if (rightChar == '}') {
396
+ range.end.column++;
397
+ return range;
398
+ }
399
+ }
400
+ });
401
+
402
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
403
+ if (text == '(') {
404
+ var selection = editor.getSelectionRange();
405
+ var selected = session.doc.getTextRange(selection);
406
+ if (selected !== "") {
407
+ return {
408
+ text: '(' + selected + ')',
409
+ selection: false
410
+ };
411
+ } else {
412
+ return {
413
+ text: '()',
414
+ selection: [1, 1]
415
+ };
416
+ }
417
+ } else if (text == ')') {
418
+ var cursor = editor.getCursorPosition();
419
+ var line = session.doc.getLine(cursor.row);
420
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
421
+ if (rightChar == ')') {
422
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
423
+ if (matching !== null) {
424
+ return {
425
+ text: '',
426
+ selection: [1, 1]
427
+ };
428
+ }
429
+ }
430
+ }
431
+ });
432
+
433
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
434
+ var selected = session.doc.getTextRange(range);
435
+ if (!range.isMultiLine() && selected == '(') {
436
+ var line = session.doc.getLine(range.start.row);
437
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
438
+ if (rightChar == ')') {
439
+ range.end.column++;
440
+ return range;
441
+ }
442
+ }
443
+ });
444
+
445
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
446
+ if (text == '[') {
447
+ var selection = editor.getSelectionRange();
448
+ var selected = session.doc.getTextRange(selection);
449
+ if (selected !== "") {
450
+ return {
451
+ text: '[' + selected + ']',
452
+ selection: false
453
+ };
454
+ } else {
455
+ return {
456
+ text: '[]',
457
+ selection: [1, 1]
458
+ };
459
+ }
460
+ } else if (text == ']') {
461
+ var cursor = editor.getCursorPosition();
462
+ var line = session.doc.getLine(cursor.row);
463
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
464
+ if (rightChar == ']') {
465
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
466
+ if (matching !== null) {
467
+ return {
468
+ text: '',
469
+ selection: [1, 1]
470
+ };
471
+ }
472
+ }
473
+ }
474
+ });
475
+
476
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
477
+ var selected = session.doc.getTextRange(range);
478
+ if (!range.isMultiLine() && selected == '[') {
479
+ var line = session.doc.getLine(range.start.row);
480
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
481
+ if (rightChar == ']') {
482
+ range.end.column++;
483
+ return range;
484
+ }
485
+ }
486
+ });
487
+
488
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
489
+ if (text == '"' || text == "'") {
490
+ var quote = text;
491
+ var selection = editor.getSelectionRange();
492
+ var selected = session.doc.getTextRange(selection);
493
+ if (selected !== "") {
494
+ return {
495
+ text: quote + selected + quote,
496
+ selection: false
497
+ };
498
+ } else {
499
+ var cursor = editor.getCursorPosition();
500
+ var line = session.doc.getLine(cursor.row);
501
+ var leftChar = line.substring(cursor.column-1, cursor.column);
502
+
503
+ // We're escaped.
504
+ if (leftChar == '\\') {
505
+ return null;
506
+ }
507
+
508
+ // Find what token we're inside.
509
+ var tokens = session.getTokens(selection.start.row);
510
+ var col = 0, token;
511
+ var quotepos = -1; // Track whether we're inside an open quote.
512
+
513
+ for (var x = 0; x < tokens.length; x++) {
514
+ token = tokens[x];
515
+ if (token.type == "string") {
516
+ quotepos = -1;
517
+ } else if (quotepos < 0) {
518
+ quotepos = token.value.indexOf(quote);
519
+ }
520
+ if ((token.value.length + col) > selection.start.column) {
521
+ break;
522
+ }
523
+ col += tokens[x].value.length;
524
+ }
525
+
526
+ // Try and be smart about when we auto insert.
527
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
528
+ return {
529
+ text: quote + quote,
530
+ selection: [1,1]
531
+ };
532
+ } else if (token && token.type === "string") {
533
+ // Ignore input and move right one if we're typing over the closing quote.
534
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
535
+ if (rightChar == quote) {
536
+ return {
537
+ text: '',
538
+ selection: [1, 1]
539
+ };
540
+ }
541
+ }
542
+ }
543
+ }
544
+ });
545
+
546
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
547
+ var selected = session.doc.getTextRange(range);
548
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
549
+ var line = session.doc.getLine(range.start.row);
550
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
551
+ if (rightChar == '"') {
552
+ range.end.column++;
553
+ return range;
554
+ }
555
+ }
556
+ });
557
+
558
+ };
559
+
560
+ oop.inherits(CstyleBehaviour, Behaviour);
561
+
562
+ exports.CstyleBehaviour = CstyleBehaviour;
563
+ });
564
+
565
+ define('ace/mode/folding/xml', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(require, exports, module) {
566
+
567
+
568
+ var oop = require("../../lib/oop");
569
+ var lang = require("../../lib/lang");
570
+ var Range = require("../../range").Range;
571
+ var BaseFoldMode = require("./fold_mode").FoldMode;
572
+ var TokenIterator = require("../../token_iterator").TokenIterator;
573
+
574
+ var FoldMode = exports.FoldMode = function(voidElements) {
575
+ BaseFoldMode.call(this);
576
+ this.voidElements = voidElements || {};
577
+ };
578
+ oop.inherits(FoldMode, BaseFoldMode);
579
+
580
+ (function() {
581
+
582
+ this.getFoldWidget = function(session, foldStyle, row) {
583
+ var tag = this._getFirstTagInLine(session, row);
584
+
585
+ if (tag.closing)
586
+ return foldStyle == "markbeginend" ? "end" : "";
587
+
588
+ if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()])
589
+ return "";
590
+
591
+ if (tag.selfClosing)
592
+ return "";
593
+
594
+ if (tag.value.indexOf("/" + tag.tagName) !== -1)
595
+ return "";
596
+
597
+ return "start";
598
+ };
599
+
600
+ this._getFirstTagInLine = function(session, row) {
601
+ var tokens = session.getTokens(row);
602
+ var value = "";
603
+ for (var i = 0; i < tokens.length; i++) {
604
+ var token = tokens[i];
605
+ if (token.type.indexOf("meta.tag") === 0)
606
+ value += token.value;
607
+ else
608
+ value += lang.stringRepeat(" ", token.value.length);
609
+ }
610
+
611
+ return this._parseTag(value);
612
+ };
613
+
614
+ this.tagRe = /^(\s*)(<?(\/?)([-_a-zA-Z0-9:!]*)\s*(\/?)>?)/;
615
+ this._parseTag = function(tag) {
616
+
617
+ var match = this.tagRe.exec(tag);
618
+ var column = this.tagRe.lastIndex || 0;
619
+ this.tagRe.lastIndex = 0;
620
+
621
+ return {
622
+ value: tag,
623
+ match: match ? match[2] : "",
624
+ closing: match ? !!match[3] : false,
625
+ selfClosing: match ? !!match[5] || match[2] == "/>" : false,
626
+ tagName: match ? match[4] : "",
627
+ column: match[1] ? column + match[1].length : column
628
+ };
629
+ };
630
+ this._readTagForward = function(iterator) {
631
+ var token = iterator.getCurrentToken();
632
+ if (!token)
633
+ return null;
634
+
635
+ var value = "";
636
+ var start;
637
+
638
+ do {
639
+ if (token.type.indexOf("meta.tag") === 0) {
640
+ if (!start) {
641
+ var start = {
642
+ row: iterator.getCurrentTokenRow(),
643
+ column: iterator.getCurrentTokenColumn()
644
+ };
645
+ }
646
+ value += token.value;
647
+ if (value.indexOf(">") !== -1) {
648
+ var tag = this._parseTag(value);
649
+ tag.start = start;
650
+ tag.end = {
651
+ row: iterator.getCurrentTokenRow(),
652
+ column: iterator.getCurrentTokenColumn() + token.value.length
653
+ };
654
+ iterator.stepForward();
655
+ return tag;
656
+ }
657
+ }
658
+ } while(token = iterator.stepForward());
659
+
660
+ return null;
661
+ };
662
+
663
+ this._readTagBackward = function(iterator) {
664
+ var token = iterator.getCurrentToken();
665
+ if (!token)
666
+ return null;
667
+
668
+ var value = "";
669
+ var end;
670
+
671
+ do {
672
+ if (token.type.indexOf("meta.tag") === 0) {
673
+ if (!end) {
674
+ end = {
675
+ row: iterator.getCurrentTokenRow(),
676
+ column: iterator.getCurrentTokenColumn() + token.value.length
677
+ };
678
+ }
679
+ value = token.value + value;
680
+ if (value.indexOf("<") !== -1) {
681
+ var tag = this._parseTag(value);
682
+ tag.end = end;
683
+ tag.start = {
684
+ row: iterator.getCurrentTokenRow(),
685
+ column: iterator.getCurrentTokenColumn()
686
+ };
687
+ iterator.stepBackward();
688
+ return tag;
689
+ }
690
+ }
691
+ } while(token = iterator.stepBackward());
692
+
693
+ return null;
694
+ };
695
+
696
+ this._pop = function(stack, tag) {
697
+ while (stack.length) {
698
+
699
+ var top = stack[stack.length-1];
700
+ if (!tag || top.tagName == tag.tagName) {
701
+ return stack.pop();
702
+ }
703
+ else if (this.voidElements[tag.tagName]) {
704
+ return;
705
+ }
706
+ else if (this.voidElements[top.tagName]) {
707
+ stack.pop();
708
+ continue;
709
+ } else {
710
+ return null;
711
+ }
712
+ }
713
+ };
714
+
715
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
716
+ var firstTag = this._getFirstTagInLine(session, row);
717
+
718
+ if (!firstTag.match)
719
+ return null;
720
+
721
+ var isBackward = firstTag.closing || firstTag.selfClosing;
722
+ var stack = [];
723
+ var tag;
724
+
725
+ if (!isBackward) {
726
+ var iterator = new TokenIterator(session, row, firstTag.column);
727
+ var start = {
728
+ row: row,
729
+ column: firstTag.column + firstTag.tagName.length + 2
730
+ };
731
+ while (tag = this._readTagForward(iterator)) {
732
+ if (tag.selfClosing) {
733
+ if (!stack.length) {
734
+ tag.start.column += tag.tagName.length + 2;
735
+ tag.end.column -= 2;
736
+ return Range.fromPoints(tag.start, tag.end);
737
+ } else
738
+ continue;
739
+ }
740
+
741
+ if (tag.closing) {
742
+ this._pop(stack, tag);
743
+ if (stack.length == 0)
744
+ return Range.fromPoints(start, tag.start);
745
+ }
746
+ else {
747
+ stack.push(tag)
748
+ }
749
+ }
750
+ }
751
+ else {
752
+ var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length);
753
+ var end = {
754
+ row: row,
755
+ column: firstTag.column
756
+ };
757
+
758
+ while (tag = this._readTagBackward(iterator)) {
759
+ if (tag.selfClosing) {
760
+ if (!stack.length) {
761
+ tag.start.column += tag.tagName.length + 2;
762
+ tag.end.column -= 2;
763
+ return Range.fromPoints(tag.start, tag.end);
764
+ } else
765
+ continue;
766
+ }
767
+
768
+ if (!tag.closing) {
769
+ this._pop(stack, tag);
770
+ if (stack.length == 0) {
771
+ tag.start.column += tag.tagName.length + 2;
772
+ return Range.fromPoints(tag.start, end);
773
+ }
774
+ }
775
+ else {
776
+ stack.push(tag)
777
+ }
778
+ }
779
+ }
780
+
781
+ };
782
+
783
+ }).call(FoldMode.prototype);
784
+
785
+ });
786
+
787
+ define('ace/mode/folding/fold_mode', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
788
+
789
+
790
+ var Range = require("../../range").Range;
791
+
792
+ var FoldMode = exports.FoldMode = function() {};
793
+
794
+ (function() {
795
+
796
+ this.foldingStartMarker = null;
797
+ this.foldingStopMarker = null;
798
+
799
+ // must return "" if there's no fold, to enable caching
800
+ this.getFoldWidget = function(session, foldStyle, row) {
801
+ var line = session.getLine(row);
802
+ if (this.foldingStartMarker.test(line))
803
+ return "start";
804
+ if (foldStyle == "markbeginend"
805
+ && this.foldingStopMarker
806
+ && this.foldingStopMarker.test(line))
807
+ return "end";
808
+ return "";
809
+ };
810
+
811
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
812
+ return null;
813
+ };
814
+
815
+ this.indentationBlock = function(session, row, column) {
816
+ var re = /\S/;
817
+ var line = session.getLine(row);
818
+ var startLevel = line.search(re);
819
+ if (startLevel == -1)
820
+ return;
821
+
822
+ var startColumn = column || line.length;
823
+ var maxRow = session.getLength();
824
+ var startRow = row;
825
+ var endRow = row;
826
+
827
+ while (++row < maxRow) {
828
+ var level = session.getLine(row).search(re);
829
+
830
+ if (level == -1)
831
+ continue;
832
+
833
+ if (level <= startLevel)
834
+ break;
835
+
836
+ endRow = row;
837
+ }
838
+
839
+ if (endRow > startRow) {
840
+ var endColumn = session.getLine(endRow).length;
841
+ return new Range(startRow, startColumn, endRow, endColumn);
842
+ }
843
+ };
844
+
845
+ this.openingBracketBlock = function(session, bracket, row, column, typeRe) {
846
+ var start = {row: row, column: column + 1};
847
+ var end = session.$findClosingBracket(bracket, start, typeRe);
848
+ if (!end)
849
+ return;
850
+
851
+ var fw = session.foldWidgets[end.row];
852
+ if (fw == null)
853
+ fw = this.getFoldWidget(session, end.row);
854
+
855
+ if (fw == "start" && end.row > start.row) {
856
+ end.row --;
857
+ end.column = session.getLine(end.row).length;
858
+ }
859
+ return Range.fromPoints(start, end);
860
+ };
861
+
862
+ }).call(FoldMode.prototype);
863
+
864
+ });
865
+
866
+ define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
867
+
868
+
869
+ var oop = require("../lib/oop");
870
+ var TextMode = require("./text").Mode;
871
+ var Tokenizer = require("../tokenizer").Tokenizer;
872
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
873
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
874
+ var Range = require("../range").Range;
875
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
876
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
877
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
878
+
879
+ var Mode = function() {
880
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
881
+ this.$outdent = new MatchingBraceOutdent();
882
+ this.$behaviour = new CstyleBehaviour();
883
+ this.foldingRules = new CStyleFoldMode();
884
+ };
885
+ oop.inherits(Mode, TextMode);
886
+
887
+ (function() {
888
+
889
+
890
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
891
+ var outdent = true;
892
+ var re = /^(\s*)\/\//;
893
+
894
+ for (var i=startRow; i<= endRow; i++) {
895
+ if (!re.test(doc.getLine(i))) {
896
+ outdent = false;
897
+ break;
898
+ }
899
+ }
900
+
901
+ if (outdent) {
902
+ var deleteRange = new Range(0, 0, 0, 0);
903
+ for (var i=startRow; i<= endRow; i++)
904
+ {
905
+ var line = doc.getLine(i);
906
+ var m = line.match(re);
907
+ deleteRange.start.row = i;
908
+ deleteRange.end.row = i;
909
+ deleteRange.end.column = m[0].length;
910
+ doc.replace(deleteRange, m[1]);
911
+ }
912
+ }
913
+ else {
914
+ doc.indentRows(startRow, endRow, "//");
915
+ }
916
+ };
917
+
918
+ this.getNextLineIndent = function(state, line, tab) {
919
+ var indent = this.$getIndent(line);
920
+
921
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
922
+ var tokens = tokenizedLine.tokens;
923
+ var endState = tokenizedLine.state;
924
+
925
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
926
+ return indent;
927
+ }
928
+
929
+ if (state == "start" || state == "regex_allowed") {
930
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
931
+ if (match) {
932
+ indent += tab;
933
+ }
934
+ } else if (state == "doc-start") {
935
+ if (endState == "start" || state == "regex_allowed") {
936
+ return "";
937
+ }
938
+ var match = line.match(/^\s*(\/?)\*/);
939
+ if (match) {
940
+ if (match[1]) {
941
+ indent += " ";
942
+ }
943
+ indent += "* ";
944
+ }
945
+ }
946
+
947
+ return indent;
948
+ };
949
+
950
+ this.checkOutdent = function(state, line, input) {
951
+ return this.$outdent.checkOutdent(line, input);
952
+ };
953
+
954
+ this.autoOutdent = function(state, doc, row) {
955
+ this.$outdent.autoOutdent(doc, row);
956
+ };
957
+
958
+ this.createWorker = function(session) {
959
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
960
+ worker.attachToDocument(session.getDocument());
961
+
962
+ worker.on("jslint", function(results) {
963
+ var errors = [];
964
+ for (var i=0; i<results.data.length; i++) {
965
+ var error = results.data[i];
966
+ if (error)
967
+ errors.push({
968
+ row: error.line-1,
969
+ column: error.character-1,
970
+ text: error.reason,
971
+ type: "warning",
972
+ lint: error
973
+ });
974
+ }
975
+ session.setAnnotations(errors);
976
+ });
977
+
978
+ worker.on("narcissus", function(e) {
979
+ session.setAnnotations([e.data]);
980
+ });
981
+
982
+ worker.on("terminate", function() {
983
+ session.clearAnnotations();
984
+ });
985
+
986
+ return worker;
987
+ };
988
+
989
+ }).call(Mode.prototype);
990
+
991
+ exports.Mode = Mode;
992
+ });
993
+
994
+ define('ace/mode/javascript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/unicode', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
995
+
996
+
997
+ var oop = require("../lib/oop");
998
+ var lang = require("../lib/lang");
999
+ var unicode = require("../unicode");
1000
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
1001
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1002
+
1003
+ var JavaScriptHighlightRules = function() {
1004
+
1005
+ // see: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects
1006
+ var globals = lang.arrayToMap(
1007
+ // Constructors
1008
+ ("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" +
1009
+ // E4X
1010
+ "Namespace|QName|XML|XMLList|" +
1011
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
1012
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
1013
+ // Errors
1014
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" +
1015
+ "SyntaxError|TypeError|URIError|" +
1016
+ // Non-constructor functions
1017
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" +
1018
+ "isNaN|parseFloat|parseInt|" +
1019
+ // Other
1020
+ "JSON|Math|" +
1021
+ // Pseudo
1022
+ "this|arguments|prototype|window|document"
1023
+ ).split("|")
1024
+ );
1025
+
1026
+ var keywords = lang.arrayToMap(
1027
+ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
1028
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|" +
1029
+ "const|yield|import|get|set").split("|")
1030
+ );
1031
+
1032
+ // keywords which can be followed by regular expressions
1033
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield";
1034
+
1035
+ var deprecated = lang.arrayToMap(
1036
+ ("__parent__|__count__|escape|unescape|with|__proto__").split("|")
1037
+ );
1038
+
1039
+ var definitions = lang.arrayToMap(("const|let|var|function").split("|"));
1040
+
1041
+ var buildinConstants = lang.arrayToMap(
1042
+ ("null|Infinity|NaN|undefined").split("|")
1043
+ );
1044
+
1045
+ var futureReserved = lang.arrayToMap(
1046
+ ("class|enum|extends|super|export|implements|private|" +
1047
+ "public|interface|package|protected|static").split("|")
1048
+ );
1049
+
1050
+ // TODO: Unicode escape sequences
1051
+ var identifierRe = "[" + unicode.packages.L + "\\$_]["
1052
+ + unicode.packages.L
1053
+ + unicode.packages.Mn + unicode.packages.Mc
1054
+ + unicode.packages.Nd
1055
+ + unicode.packages.Pc + "\\$_]*\\b";
1056
+
1057
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
1058
+ "u[0-9a-fA-F]{4}|" + // unicode
1059
+ "[0-2][0-7]{0,2}|" + // oct
1060
+ "3[0-6][0-7]?|" + // oct
1061
+ "37[0-7]?|" + // oct
1062
+ "[4-7][0-7]?|" + //oct
1063
+ ".)";
1064
+
1065
+ // regexp must not have capturing parentheses. Use (?:) instead.
1066
+ // regexps are ordered -> the first match is used
1067
+
1068
+ this.$rules = {
1069
+ "start" : [
1070
+ {
1071
+ token : "comment",
1072
+ regex : /\/\/.*$/
1073
+ },
1074
+ DocCommentHighlightRules.getStartRule("doc-start"),
1075
+ {
1076
+ token : "comment", // multi line comment
1077
+ merge : true,
1078
+ regex : /\/\*/,
1079
+ next : "comment"
1080
+ }, {
1081
+ token : "string",
1082
+ regex : "'(?=.)",
1083
+ next : "qstring"
1084
+ }, {
1085
+ token : "string",
1086
+ regex : '"(?=.)',
1087
+ next : "qqstring"
1088
+ }, {
1089
+ token : "constant.numeric", // hex
1090
+ regex : /0[xX][0-9a-fA-F]+\b/
1091
+ }, {
1092
+ token : "constant.numeric", // float
1093
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
1094
+ }, { // match stuff like: Sound.prototype.play = function() { }
1095
+ token : [
1096
+ "storage.type",
1097
+ "punctuation.operator",
1098
+ "support.function",
1099
+ "punctuation.operator",
1100
+ "entity.name.function",
1101
+ "text",
1102
+ "keyword.operator",
1103
+ "text",
1104
+ "storage.type",
1105
+ "text",
1106
+ "paren.lparen"
1107
+ ],
1108
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
1109
+ next: "function_arguments"
1110
+ }, { // match stuff like: Sound.prototype.play = myfunc
1111
+ token : [
1112
+ "storage.type",
1113
+ "punctuation.operator",
1114
+ "support.function",
1115
+ "punctuation.operator",
1116
+ "entity.name.function",
1117
+ "text",
1118
+ "keyword.operator",
1119
+ "text"
1120
+ ],
1121
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)",
1122
+ next: "function_arguments"
1123
+ }, { // match stuff like: Sound.play = function() { }
1124
+ token : [
1125
+ "storage.type",
1126
+ "punctuation.operator",
1127
+ "entity.name.function",
1128
+ "text",
1129
+ "keyword.operator",
1130
+ "text",
1131
+ "storage.type",
1132
+ "text",
1133
+ "paren.lparen"
1134
+ ],
1135
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
1136
+ next: "function_arguments"
1137
+ }, { // match stuff like: play = function() { }
1138
+ token : [
1139
+ "entity.name.function",
1140
+ "text",
1141
+ "keyword.operator",
1142
+ "text",
1143
+ "storage.type",
1144
+ "text",
1145
+ "paren.lparen"
1146
+ ],
1147
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
1148
+ next: "function_arguments"
1149
+ }, { // match stuff like: Sound.play = function play() { }
1150
+ token : [
1151
+ "storage.type",
1152
+ "punctuation.operator",
1153
+ "entity.name.function",
1154
+ "text",
1155
+ "keyword.operator",
1156
+ "text",
1157
+ "storage.type",
1158
+ "text",
1159
+ "entity.name.function",
1160
+ "text",
1161
+ "paren.lparen"
1162
+ ],
1163
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
1164
+ next: "function_arguments"
1165
+ }, { // match regular function like: function myFunc(arg) { }
1166
+ token : [
1167
+ "storage.type",
1168
+ "text",
1169
+ "entity.name.function",
1170
+ "text",
1171
+ "paren.lparen"
1172
+ ],
1173
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
1174
+ next: "function_arguments"
1175
+ }, { // match stuff like: foobar: function() { }
1176
+ token : [
1177
+ "entity.name.function",
1178
+ "text",
1179
+ "punctuation.operator",
1180
+ "text",
1181
+ "storage.type",
1182
+ "text",
1183
+ "paren.lparen"
1184
+ ],
1185
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
1186
+ next: "function_arguments"
1187
+ }, { // Attempt to match : function() { } (this is for issues with 'foo': function() { })
1188
+ token : [
1189
+ "text",
1190
+ "text",
1191
+ "storage.type",
1192
+ "text",
1193
+ "paren.lparen"
1194
+ ],
1195
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
1196
+ next: "function_arguments"
1197
+ }, {
1198
+ token : "constant.language.boolean",
1199
+ regex : /(?:true|false)\b/
1200
+ }, {
1201
+ token : "keyword",
1202
+ regex : "(?:" + kwBeforeRe + ")\\b",
1203
+ next : "regex_allowed"
1204
+ }, {
1205
+ token : ["punctuation.operator", "support.function"],
1206
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|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(?=\()/
1207
+ }, {
1208
+ token : ["punctuation.operator", "support.function.dom"],
1209
+ 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(?=\()/
1210
+ }, {
1211
+ token : ["punctuation.operator", "support.constant"],
1212
+ 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/
1213
+ }, {
1214
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
1215
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
1216
+ }, {
1217
+ token : function(value) {
1218
+ if (globals.hasOwnProperty(value))
1219
+ return "variable.language";
1220
+ else if (deprecated.hasOwnProperty(value))
1221
+ return "invalid.deprecated";
1222
+ else if (definitions.hasOwnProperty(value))
1223
+ return "storage.type";
1224
+ else if (keywords.hasOwnProperty(value))
1225
+ return "keyword";
1226
+ else if (buildinConstants.hasOwnProperty(value))
1227
+ return "constant.language";
1228
+ else if (futureReserved.hasOwnProperty(value))
1229
+ return "invalid.illegal";
1230
+ else if (value == "debugger")
1231
+ return "invalid.deprecated";
1232
+ else
1233
+ return "identifier";
1234
+ },
1235
+ regex : identifierRe
1236
+ }, {
1237
+ token : "keyword.operator",
1238
+ regex : /!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,
1239
+ next : "regex_allowed"
1240
+ }, {
1241
+ token : "punctuation.operator",
1242
+ regex : /\?|\:|\,|\;|\./,
1243
+ next : "regex_allowed"
1244
+ }, {
1245
+ token : "paren.lparen",
1246
+ regex : /[\[({]/,
1247
+ next : "regex_allowed"
1248
+ }, {
1249
+ token : "paren.rparen",
1250
+ regex : /[\])}]/
1251
+ }, {
1252
+ token : "keyword.operator",
1253
+ regex : /\/=?/,
1254
+ next : "regex_allowed"
1255
+ }, {
1256
+ token: "comment",
1257
+ regex: /^#!.*$/
1258
+ }, {
1259
+ token : "text",
1260
+ regex : /\s+/
1261
+ }
1262
+ ],
1263
+ // regular expressions are only allowed after certain tokens. This
1264
+ // makes sure we don't mix up regexps with the divison operator
1265
+ "regex_allowed": [
1266
+ DocCommentHighlightRules.getStartRule("doc-start"),
1267
+ {
1268
+ token : "comment", // multi line comment
1269
+ merge : true,
1270
+ regex : "\\/\\*",
1271
+ next : "comment_regex_allowed"
1272
+ }, {
1273
+ token : "comment",
1274
+ regex : "\\/\\/.*$"
1275
+ }, {
1276
+ token: "string.regexp",
1277
+ regex: "\\/",
1278
+ next: "regex",
1279
+ merge: true
1280
+ }, {
1281
+ token : "text",
1282
+ regex : "\\s+"
1283
+ }, {
1284
+ // immediately return to the start mode without matching
1285
+ // anything
1286
+ token: "empty",
1287
+ regex: "",
1288
+ next: "start"
1289
+ }
1290
+ ],
1291
+ "regex": [
1292
+ {
1293
+ token: "regexp.keyword.operator",
1294
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1295
+ }, {
1296
+ // flag
1297
+ token: "string.regexp",
1298
+ regex: "/\\w*",
1299
+ next: "start",
1300
+ merge: true
1301
+ }, {
1302
+ token: "string.regexp",
1303
+ regex: "[^\\\\/\\[]+",
1304
+ merge: true
1305
+ }, {
1306
+ token: "string.regexp.charachterclass",
1307
+ regex: "\\[",
1308
+ next: "regex_character_class",
1309
+ merge: true
1310
+ }, {
1311
+ token: "empty",
1312
+ regex: "",
1313
+ next: "start"
1314
+ }
1315
+ ],
1316
+ "regex_character_class": [
1317
+ {
1318
+ token: "regexp.keyword.operator",
1319
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
1320
+ }, {
1321
+ token: "string.regexp.charachterclass",
1322
+ regex: "]",
1323
+ next: "regex",
1324
+ merge: true
1325
+ }, {
1326
+ token: "string.regexp.charachterclass",
1327
+ regex: "[^\\\\\\]]+",
1328
+ merge: true
1329
+ }, {
1330
+ token: "empty",
1331
+ regex: "",
1332
+ next: "start"
1333
+ }
1334
+ ],
1335
+ "function_arguments": [
1336
+ {
1337
+ token: "variable.parameter",
1338
+ regex: identifierRe
1339
+ }, {
1340
+ token: "punctuation.operator",
1341
+ regex: "[, ]+",
1342
+ merge: true
1343
+ }, {
1344
+ token: "punctuation.operator",
1345
+ regex: "$",
1346
+ merge: true
1347
+ }, {
1348
+ token: "empty",
1349
+ regex: "",
1350
+ next: "start"
1351
+ }
1352
+ ],
1353
+ "comment_regex_allowed" : [
1354
+ {
1355
+ token : "comment", // closing comment
1356
+ regex : ".*?\\*\\/",
1357
+ merge : true,
1358
+ next : "regex_allowed"
1359
+ }, {
1360
+ token : "comment", // comment spanning whole line
1361
+ merge : true,
1362
+ regex : ".+"
1363
+ }
1364
+ ],
1365
+ "comment" : [
1366
+ {
1367
+ token : "comment", // closing comment
1368
+ regex : ".*?\\*\\/",
1369
+ merge : true,
1370
+ next : "start"
1371
+ }, {
1372
+ token : "comment", // comment spanning whole line
1373
+ merge : true,
1374
+ regex : ".+"
1375
+ }
1376
+ ],
1377
+ "qqstring" : [
1378
+ {
1379
+ token : "constant.language.escape",
1380
+ regex : escapedRe
1381
+ }, {
1382
+ token : "string",
1383
+ regex : '[^"\\\\]+',
1384
+ merge : true
1385
+ }, {
1386
+ token : "string",
1387
+ regex : "\\\\$",
1388
+ next : "qqstring",
1389
+ merge : true
1390
+ }, {
1391
+ token : "string",
1392
+ regex : '"|$',
1393
+ next : "start",
1394
+ merge : true
1395
+ }
1396
+ ],
1397
+ "qstring" : [
1398
+ {
1399
+ token : "constant.language.escape",
1400
+ regex : escapedRe
1401
+ }, {
1402
+ token : "string",
1403
+ regex : "[^'\\\\]+",
1404
+ merge : true
1405
+ }, {
1406
+ token : "string",
1407
+ regex : "\\\\$",
1408
+ next : "qstring",
1409
+ merge : true
1410
+ }, {
1411
+ token : "string",
1412
+ regex : "'|$",
1413
+ next : "start",
1414
+ merge : true
1415
+ }
1416
+ ]
1417
+ };
1418
+
1419
+ this.embedRules(DocCommentHighlightRules, "doc-",
1420
+ [ DocCommentHighlightRules.getEndRule("start") ]);
1421
+ };
1422
+
1423
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
1424
+
1425
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
1426
+ });
1427
+
1428
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1429
+
1430
+
1431
+ var oop = require("../lib/oop");
1432
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1433
+
1434
+ var DocCommentHighlightRules = function() {
1435
+
1436
+ this.$rules = {
1437
+ "start" : [ {
1438
+ token : "comment.doc.tag",
1439
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
1440
+ }, {
1441
+ token : "comment.doc",
1442
+ merge : true,
1443
+ regex : "\\s+"
1444
+ }, {
1445
+ token : "comment.doc",
1446
+ merge : true,
1447
+ regex : "TODO"
1448
+ }, {
1449
+ token : "comment.doc",
1450
+ merge : true,
1451
+ regex : "[^@\\*]+"
1452
+ }, {
1453
+ token : "comment.doc",
1454
+ merge : true,
1455
+ regex : "."
1456
+ }]
1457
+ };
1458
+ };
1459
+
1460
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
1461
+
1462
+ DocCommentHighlightRules.getStartRule = function(start) {
1463
+ return {
1464
+ token : "comment.doc", // doc comment
1465
+ merge : true,
1466
+ regex : "\\/\\*(?=\\*)",
1467
+ next : start
1468
+ };
1469
+ };
1470
+
1471
+ DocCommentHighlightRules.getEndRule = function (start) {
1472
+ return {
1473
+ token : "comment.doc", // closing comment
1474
+ merge : true,
1475
+ regex : "\\*\\/",
1476
+ next : start
1477
+ };
1478
+ };
1479
+
1480
+
1481
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
1482
+
1483
+ });
1484
+
1485
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
1486
+
1487
+
1488
+ var Range = require("../range").Range;
1489
+
1490
+ var MatchingBraceOutdent = function() {};
1491
+
1492
+ (function() {
1493
+
1494
+ this.checkOutdent = function(line, input) {
1495
+ if (! /^\s+$/.test(line))
1496
+ return false;
1497
+
1498
+ return /^\s*\}/.test(input);
1499
+ };
1500
+
1501
+ this.autoOutdent = function(doc, row) {
1502
+ var line = doc.getLine(row);
1503
+ var match = line.match(/^(\s*\})/);
1504
+
1505
+ if (!match) return 0;
1506
+
1507
+ var column = match[1].length;
1508
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
1509
+
1510
+ if (!openBracePos || openBracePos.row == row) return 0;
1511
+
1512
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1513
+ doc.replace(new Range(row, 0, row, column-1), indent);
1514
+ };
1515
+
1516
+ this.$getIndent = function(line) {
1517
+ var match = line.match(/^(\s+)/);
1518
+ if (match) {
1519
+ return match[1];
1520
+ }
1521
+
1522
+ return "";
1523
+ };
1524
+
1525
+ }).call(MatchingBraceOutdent.prototype);
1526
+
1527
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1528
+ });
1529
+
1530
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
1531
+
1532
+
1533
+ var oop = require("../../lib/oop");
1534
+ var Range = require("../../range").Range;
1535
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1536
+
1537
+ var FoldMode = exports.FoldMode = function() {};
1538
+ oop.inherits(FoldMode, BaseFoldMode);
1539
+
1540
+ (function() {
1541
+
1542
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
1543
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
1544
+
1545
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
1546
+ var line = session.getLine(row);
1547
+ var match = line.match(this.foldingStartMarker);
1548
+ if (match) {
1549
+ var i = match.index;
1550
+
1551
+ if (match[1])
1552
+ return this.openingBracketBlock(session, match[1], row, i);
1553
+
1554
+ var range = session.getCommentFoldRange(row, i + match[0].length);
1555
+ range.end.column -= 2;
1556
+ return range;
1557
+ }
1558
+
1559
+ if (foldStyle !== "markbeginend")
1560
+ return;
1561
+
1562
+ var match = line.match(this.foldingStopMarker);
1563
+ if (match) {
1564
+ var i = match.index + match[0].length;
1565
+
1566
+ if (match[2]) {
1567
+ var range = session.getCommentFoldRange(row, i);
1568
+ range.end.column -= 2;
1569
+ return range;
1570
+ }
1571
+
1572
+ var end = {row: row, column: i};
1573
+ var start = session.$findOpeningBracket(match[1], end);
1574
+
1575
+ if (!start)
1576
+ return;
1577
+
1578
+ start.column++;
1579
+ end.column--;
1580
+
1581
+ return Range.fromPoints(start, end);
1582
+ }
1583
+ };
1584
+
1585
+ }).call(FoldMode.prototype);
1586
+
1587
+ });
1588
+
1589
+ define('ace/mode/css', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/folding/cstyle'], function(require, exports, module) {
1590
+
1591
+
1592
+ var oop = require("../lib/oop");
1593
+ var TextMode = require("./text").Mode;
1594
+ var Tokenizer = require("../tokenizer").Tokenizer;
1595
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1596
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1597
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1598
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1599
+
1600
+ var Mode = function() {
1601
+ this.$tokenizer = new Tokenizer(new CssHighlightRules().getRules(), "i");
1602
+ this.$outdent = new MatchingBraceOutdent();
1603
+ this.foldingRules = new CStyleFoldMode();
1604
+ };
1605
+ oop.inherits(Mode, TextMode);
1606
+
1607
+ (function() {
1608
+
1609
+ this.foldingRules = "cStyle";
1610
+
1611
+ this.getNextLineIndent = function(state, line, tab) {
1612
+ var indent = this.$getIndent(line);
1613
+
1614
+ // ignore braces in comments
1615
+ var tokens = this.$tokenizer.getLineTokens(line, state).tokens;
1616
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
1617
+ return indent;
1618
+ }
1619
+
1620
+ var match = line.match(/^.*\{\s*$/);
1621
+ if (match) {
1622
+ indent += tab;
1623
+ }
1624
+
1625
+ return indent;
1626
+ };
1627
+
1628
+ this.checkOutdent = function(state, line, input) {
1629
+ return this.$outdent.checkOutdent(line, input);
1630
+ };
1631
+
1632
+ this.autoOutdent = function(state, doc, row) {
1633
+ this.$outdent.autoOutdent(doc, row);
1634
+ };
1635
+
1636
+ this.createWorker = function(session) {
1637
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1638
+ worker.attachToDocument(session.getDocument());
1639
+
1640
+ worker.on("csslint", function(e) {
1641
+ var errors = [];
1642
+ e.data.forEach(function(message) {
1643
+ errors.push({
1644
+ row: message.line - 1,
1645
+ column: message.col - 1,
1646
+ text: message.message,
1647
+ type: message.type,
1648
+ lint: message
1649
+ });
1650
+ });
1651
+
1652
+ session.setAnnotations(errors);
1653
+ });
1654
+ return worker;
1655
+ };
1656
+
1657
+ }).call(Mode.prototype);
1658
+
1659
+ exports.Mode = Mode;
1660
+
1661
+ });
1662
+
1663
+ define('ace/mode/css_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
1664
+
1665
+
1666
+ var oop = require("../lib/oop");
1667
+ var lang = require("../lib/lang");
1668
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1669
+
1670
+ var CssHighlightRules = function() {
1671
+
1672
+ var properties = lang.arrayToMap(
1673
+ ("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|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").split("|")
1674
+ );
1675
+
1676
+ var functions = lang.arrayToMap(
1677
+ ("rgb|rgba|url|attr|counter|counters").split("|")
1678
+ );
1679
+
1680
+ var constants = lang.arrayToMap(
1681
+ ("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|font-size|font|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|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero").split("|")
1682
+ );
1683
+
1684
+ var colors = lang.arrayToMap(
1685
+ ("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|" +
1686
+ "purple|red|silver|teal|white|yellow").split("|")
1687
+ );
1688
+
1689
+ var fonts = lang.arrayToMap(
1690
+ ("arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|" +
1691
+ "symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|" +
1692
+ "serif|monospace").split("|")
1693
+ );
1694
+
1695
+ // regexp must not have capturing parentheses. Use (?:) instead.
1696
+ // regexps are ordered -> the first match is used
1697
+
1698
+ var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))";
1699
+ var pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
1700
+ var 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";
1701
+
1702
+ var base_ruleset = [
1703
+ {
1704
+ token : "comment", // multi line comment
1705
+ merge : true,
1706
+ regex : "\\/\\*",
1707
+ next : "ruleset_comment"
1708
+ }, {
1709
+ token : "string", // single line
1710
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
1711
+ }, {
1712
+ token : "string", // single line
1713
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
1714
+ }, {
1715
+ token : ["constant.numeric", "keyword"],
1716
+ 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|%)"
1717
+ }, {
1718
+ token : ["constant.numeric"],
1719
+ regex : "([0-9]+)"
1720
+ }, {
1721
+ token : "constant.numeric", // hex6 color
1722
+ regex : "#[a-f0-9]{6}"
1723
+ }, {
1724
+ token : "constant.numeric", // hex3 color
1725
+ regex : "#[a-f0-9]{3}"
1726
+ }, {
1727
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
1728
+ regex : pseudoElements
1729
+ }, {
1730
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
1731
+ regex : pseudoClasses
1732
+ }, {
1733
+ token : function(value) {
1734
+ if (properties.hasOwnProperty(value.toLowerCase())) {
1735
+ return "support.type";
1736
+ }
1737
+ else if (functions.hasOwnProperty(value.toLowerCase())) {
1738
+ return "support.function";
1739
+ }
1740
+ else if (constants.hasOwnProperty(value.toLowerCase())) {
1741
+ return "support.constant";
1742
+ }
1743
+ else if (colors.hasOwnProperty(value.toLowerCase())) {
1744
+ return "support.constant.color";
1745
+ }
1746
+ else if (fonts.hasOwnProperty(value.toLowerCase())) {
1747
+ return "support.constant.fonts";
1748
+ }
1749
+ else {
1750
+ return "text";
1751
+ }
1752
+ },
1753
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1754
+ }
1755
+ ];
1756
+
1757
+ var ruleset = lang.copyArray(base_ruleset);
1758
+ ruleset.unshift({
1759
+ token : "paren.rparen",
1760
+ regex : "\\}",
1761
+ next: "start"
1762
+ });
1763
+
1764
+ var media_ruleset = lang.copyArray( base_ruleset );
1765
+ media_ruleset.unshift({
1766
+ token : "paren.rparen",
1767
+ regex : "\\}",
1768
+ next: "media"
1769
+ });
1770
+
1771
+ var base_comment = [{
1772
+ token : "comment", // comment spanning whole line
1773
+ merge : true,
1774
+ regex : ".+"
1775
+ }];
1776
+
1777
+ var comment = lang.copyArray(base_comment);
1778
+ comment.unshift({
1779
+ token : "comment", // closing comment
1780
+ regex : ".*?\\*\\/",
1781
+ next : "start"
1782
+ });
1783
+
1784
+ var media_comment = lang.copyArray(base_comment);
1785
+ media_comment.unshift({
1786
+ token : "comment", // closing comment
1787
+ regex : ".*?\\*\\/",
1788
+ next : "media"
1789
+ });
1790
+
1791
+ var ruleset_comment = lang.copyArray(base_comment);
1792
+ ruleset_comment.unshift({
1793
+ token : "comment", // closing comment
1794
+ regex : ".*?\\*\\/",
1795
+ next : "ruleset"
1796
+ });
1797
+
1798
+ this.$rules = {
1799
+ "start" : [{
1800
+ token : "comment", // multi line comment
1801
+ merge : true,
1802
+ regex : "\\/\\*",
1803
+ next : "comment"
1804
+ }, {
1805
+ token: "paren.lparen",
1806
+ regex: "\\{",
1807
+ next: "ruleset"
1808
+ }, {
1809
+ token: "string",
1810
+ regex: "@.*?{",
1811
+ next: "media"
1812
+ },{
1813
+ token: "keyword",
1814
+ regex: "#[a-z0-9-_]+"
1815
+ },{
1816
+ token: "variable",
1817
+ regex: "\\.[a-z0-9-_]+"
1818
+ },{
1819
+ token: "string",
1820
+ regex: ":[a-z0-9-_]+"
1821
+ },{
1822
+ token: "constant",
1823
+ regex: "[a-z0-9-_]+"
1824
+ }],
1825
+
1826
+ "media" : [ {
1827
+ token : "comment", // multi line comment
1828
+ merge : true,
1829
+ regex : "\\/\\*",
1830
+ next : "media_comment"
1831
+ }, {
1832
+ token: "paren.lparen",
1833
+ regex: "\\{",
1834
+ next: "media_ruleset"
1835
+ },{
1836
+ token: "string",
1837
+ regex: "\\}",
1838
+ next: "start"
1839
+ },{
1840
+ token: "keyword",
1841
+ regex: "#[a-z0-9-_]+"
1842
+ },{
1843
+ token: "variable",
1844
+ regex: "\\.[a-z0-9-_]+"
1845
+ },{
1846
+ token: "string",
1847
+ regex: ":[a-z0-9-_]+"
1848
+ },{
1849
+ token: "constant",
1850
+ regex: "[a-z0-9-_]+"
1851
+ }],
1852
+
1853
+ "comment" : comment,
1854
+
1855
+ "ruleset" : ruleset,
1856
+ "ruleset_comment" : ruleset_comment,
1857
+
1858
+ "media_ruleset" : media_ruleset,
1859
+ "media_comment" : media_comment
1860
+ };
1861
+ };
1862
+
1863
+ oop.inherits(CssHighlightRules, TextHighlightRules);
1864
+
1865
+ exports.CssHighlightRules = CssHighlightRules;
1866
+
1867
+ });
1868
+
1869
+ define('ace/mode/coldfusion_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/xml_util'], function(require, exports, module) {
1870
+
1871
+
1872
+ var oop = require("../lib/oop");
1873
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1874
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1875
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1876
+ var xml_util = require("./xml_util");
1877
+
1878
+ var ColdfusionHighlightRules = function() {
1879
+
1880
+ // regexp must not have capturing parentheses
1881
+ // regexps are ordered -> the first match is used
1882
+
1883
+ this.$rules = {
1884
+ start : [ {
1885
+ token : "text",
1886
+ merge : true,
1887
+ regex : "<\\!\\[CDATA\\[",
1888
+ next : "cdata"
1889
+ }, {
1890
+ token : "xml_pe",
1891
+ regex : "<\\?.*?\\?>"
1892
+ }, {
1893
+ token : "comment",
1894
+ merge : true,
1895
+ regex : "<\\!--",
1896
+ next : "comment"
1897
+ }, {
1898
+ token : "meta.tag",
1899
+ regex : "<(?=\s*script)",
1900
+ next : "script"
1901
+ }, {
1902
+ token : "meta.tag",
1903
+ regex : "<(?=\s*style)",
1904
+ next : "style"
1905
+ }, {
1906
+ token : "meta.tag", // opening tag
1907
+ regex : "<\\/?",
1908
+ next : "tag"
1909
+ }, {
1910
+ token : "text",
1911
+ regex : "\\s+"
1912
+ }, {
1913
+ token : "text",
1914
+ regex : "[^<]+"
1915
+ } ],
1916
+
1917
+ cdata : [ {
1918
+ token : "text",
1919
+ regex : "\\]\\]>",
1920
+ next : "start"
1921
+ }, {
1922
+ token : "text",
1923
+ merge : true,
1924
+ regex : "\\s+"
1925
+ }, {
1926
+ token : "text",
1927
+ merge : true,
1928
+ regex : ".+"
1929
+ } ],
1930
+
1931
+ comment : [ {
1932
+ token : "comment",
1933
+ regex : ".*?-->",
1934
+ next : "start"
1935
+ }, {
1936
+ token : "comment",
1937
+ merge : true,
1938
+ regex : ".+"
1939
+ } ]
1940
+ };
1941
+
1942
+ xml_util.tag(this.$rules, "tag", "start");
1943
+ xml_util.tag(this.$rules, "style", "css-start");
1944
+ xml_util.tag(this.$rules, "script", "js-start");
1945
+
1946
+ this.embedRules(JavaScriptHighlightRules, "js-", [{
1947
+ token: "comment",
1948
+ regex: "\\/\\/.*(?=<\\/script>)",
1949
+ next: "tag"
1950
+ }, {
1951
+ token: "meta.tag",
1952
+ regex: "<\\/(?=script)",
1953
+ next: "tag"
1954
+ }]);
1955
+
1956
+ this.embedRules(CssHighlightRules, "css-", [{
1957
+ token: "meta.tag",
1958
+ regex: "<\\/(?=style)",
1959
+ next: "tag"
1960
+ }]);
1961
+ };
1962
+
1963
+ oop.inherits(ColdfusionHighlightRules, TextHighlightRules);
1964
+
1965
+ exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
1966
+ });