ace-oqc 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/package.json +7 -0
  2. package/src-noconflict/ace.js +21402 -0
  3. package/src-noconflict/ext-beautify.js +331 -0
  4. package/src-noconflict/ext-elastic_tabstops_lite.js +277 -0
  5. package/src-noconflict/ext-emmet.js +1331 -0
  6. package/src-noconflict/ext-error_marker.js +9 -0
  7. package/src-noconflict/ext-keybinding_menu.js +193 -0
  8. package/src-noconflict/ext-language_tools.js +2166 -0
  9. package/src-noconflict/ext-linking.js +64 -0
  10. package/src-noconflict/ext-modelist.js +248 -0
  11. package/src-noconflict/ext-options.js +799 -0
  12. package/src-noconflict/ext-prompt.js +2806 -0
  13. package/src-noconflict/ext-rtl.js +122 -0
  14. package/src-noconflict/ext-searchbox.js +514 -0
  15. package/src-noconflict/ext-settings_menu.js +820 -0
  16. package/src-noconflict/ext-spellcheck.js +73 -0
  17. package/src-noconflict/ext-split.js +207 -0
  18. package/src-noconflict/ext-static_highlight.js +229 -0
  19. package/src-noconflict/ext-statusbar.js +56 -0
  20. package/src-noconflict/ext-textarea.js +430 -0
  21. package/src-noconflict/ext-themelist.js +67 -0
  22. package/src-noconflict/ext-whitespace.js +213 -0
  23. package/src-noconflict/keybinding-emacs.js +1169 -0
  24. package/src-noconflict/keybinding-sublime.js +422 -0
  25. package/src-noconflict/keybinding-vim.js +6198 -0
  26. package/src-noconflict/mode-abap.js +221 -0
  27. package/src-noconflict/mode-abc.js +271 -0
  28. package/src-noconflict/mode-actionscript.js +275 -0
  29. package/src-noconflict/mode-ada.js +137 -0
  30. package/src-noconflict/mode-apache_conf.js +363 -0
  31. package/src-noconflict/mode-apex.js +457 -0
  32. package/src-noconflict/mode-applescript.js +278 -0
  33. package/src-noconflict/mode-aql.js +102 -0
  34. package/src-noconflict/mode-asciidoc.js +349 -0
  35. package/src-noconflict/mode-asl.js +422 -0
  36. package/src-noconflict/mode-assembly_x86.js +193 -0
  37. package/src-noconflict/mode-autohotkey.js +244 -0
  38. package/src-noconflict/mode-batchfile.js +230 -0
  39. package/src-noconflict/mode-c9search.js +293 -0
  40. package/src-noconflict/mode-c_cpp.js +503 -0
  41. package/src-noconflict/mode-cirru.js +210 -0
  42. package/src-noconflict/mode-clojure.js +315 -0
  43. package/src-noconflict/mode-cobol.js +101 -0
  44. package/src-noconflict/mode-coffee.js +400 -0
  45. package/src-noconflict/mode-coldfusion.js +2596 -0
  46. package/src-noconflict/mode-crystal.js +642 -0
  47. package/src-noconflict/mode-csharp.js +502 -0
  48. package/src-noconflict/mode-csound_document.js +4105 -0
  49. package/src-noconflict/mode-csound_orchestra.js +3035 -0
  50. package/src-noconflict/mode-csound_score.js +462 -0
  51. package/src-noconflict/mode-csp.js +59 -0
  52. package/src-noconflict/mode-css.js +720 -0
  53. package/src-noconflict/mode-curly.js +2564 -0
  54. package/src-noconflict/mode-d.js +520 -0
  55. package/src-noconflict/mode-dart.js +715 -0
  56. package/src-noconflict/mode-diff.js +147 -0
  57. package/src-noconflict/mode-django.js +2595 -0
  58. package/src-noconflict/mode-dockerfile.js +500 -0
  59. package/src-noconflict/mode-dot.js +417 -0
  60. package/src-noconflict/mode-drools.js +498 -0
  61. package/src-noconflict/mode-edifact.js +166 -0
  62. package/src-noconflict/mode-eiffel.js +135 -0
  63. package/src-noconflict/mode-ejs.js +3533 -0
  64. package/src-noconflict/mode-elixir.js +501 -0
  65. package/src-noconflict/mode-elm.js +306 -0
  66. package/src-noconflict/mode-erlang.js +1010 -0
  67. package/src-noconflict/mode-forth.js +297 -0
  68. package/src-noconflict/mode-fortran.js +430 -0
  69. package/src-noconflict/mode-fsharp.js +316 -0
  70. package/src-noconflict/mode-fsl.js +259 -0
  71. package/src-noconflict/mode-ftl.js +1193 -0
  72. package/src-noconflict/mode-gcode.js +93 -0
  73. package/src-noconflict/mode-gherkin.js +168 -0
  74. package/src-noconflict/mode-gitignore.js +59 -0
  75. package/src-noconflict/mode-glsl.js +580 -0
  76. package/src-noconflict/mode-gobstones.js +1090 -0
  77. package/src-noconflict/mode-golang.js +413 -0
  78. package/src-noconflict/mode-graphqlschema.js +214 -0
  79. package/src-noconflict/mode-groovy.js +989 -0
  80. package/src-noconflict/mode-haml.js +1873 -0
  81. package/src-noconflict/mode-handlebars.js +2622 -0
  82. package/src-noconflict/mode-haskell.js +380 -0
  83. package/src-noconflict/mode-haskell_cabal.js +141 -0
  84. package/src-noconflict/mode-haxe.js +386 -0
  85. package/src-noconflict/mode-hjson.js +353 -0
  86. package/src-noconflict/mode-html.js +2509 -0
  87. package/src-noconflict/mode-html_elixir.js +3088 -0
  88. package/src-noconflict/mode-html_ruby.js +3550 -0
  89. package/src-noconflict/mode-ini.js +162 -0
  90. package/src-noconflict/mode-io.js +248 -0
  91. package/src-noconflict/mode-jack.js +346 -0
  92. package/src-noconflict/mode-jade.js +2025 -0
  93. package/src-noconflict/mode-java.js +1038 -0
  94. package/src-noconflict/mode-javascript.js +798 -0
  95. package/src-noconflict/mode-json.js +329 -0
  96. package/src-noconflict/mode-jsoniq.js +2632 -0
  97. package/src-noconflict/mode-jsp.js +1433 -0
  98. package/src-noconflict/mode-jssm.js +325 -0
  99. package/src-noconflict/mode-jsx.js +411 -0
  100. package/src-noconflict/mode-julia.js +303 -0
  101. package/src-noconflict/mode-kotlin.js +797 -0
  102. package/src-noconflict/mode-latex.js +296 -0
  103. package/src-noconflict/mode-less.js +839 -0
  104. package/src-noconflict/mode-liquid.js +2742 -0
  105. package/src-noconflict/mode-lisp.js +112 -0
  106. package/src-noconflict/mode-livescript.js +279 -0
  107. package/src-noconflict/mode-logiql.js +317 -0
  108. package/src-noconflict/mode-logtalk.js +352 -0
  109. package/src-noconflict/mode-lsl.js +343 -0
  110. package/src-noconflict/mode-lua.js +452 -0
  111. package/src-noconflict/mode-luapage.js +3028 -0
  112. package/src-noconflict/mode-lucene.js +154 -0
  113. package/src-noconflict/mode-makefile.js +412 -0
  114. package/src-noconflict/mode-markdown.js +3194 -0
  115. package/src-noconflict/mode-mask.js +1803 -0
  116. package/src-noconflict/mode-matlab.js +263 -0
  117. package/src-noconflict/mode-maze.js +292 -0
  118. package/src-noconflict/mode-mel.js +263 -0
  119. package/src-noconflict/mode-mixal.js +122 -0
  120. package/src-noconflict/mode-mushcode.js +681 -0
  121. package/src-noconflict/mode-mysql.js +167 -0
  122. package/src-noconflict/mode-nginx.js +298 -0
  123. package/src-noconflict/mode-nim.js +363 -0
  124. package/src-noconflict/mode-nix.js +647 -0
  125. package/src-noconflict/mode-nsis.js +312 -0
  126. package/src-noconflict/mode-objectivec.js +740 -0
  127. package/src-noconflict/mode-ocaml.js +421 -0
  128. package/src-noconflict/mode-pascal.js +223 -0
  129. package/src-noconflict/mode-perl.js +381 -0
  130. package/src-noconflict/mode-pgsql.js +1743 -0
  131. package/src-noconflict/mode-php.js +13110 -0
  132. package/src-noconflict/mode-php_laravel_blade.js +13311 -0
  133. package/src-noconflict/mode-pig.js +310 -0
  134. package/src-noconflict/mode-plain_text.js +32 -0
  135. package/src-noconflict/mode-powershell.js +418 -0
  136. package/src-noconflict/mode-praat.js +478 -0
  137. package/src-noconflict/mode-prolog.js +371 -0
  138. package/src-noconflict/mode-properties.js +80 -0
  139. package/src-noconflict/mode-protobuf.js +593 -0
  140. package/src-noconflict/mode-puppet.js +368 -0
  141. package/src-noconflict/mode-python.js +508 -0
  142. package/src-noconflict/mode-r.js +312 -0
  143. package/src-noconflict/mode-razor.js +2875 -0
  144. package/src-noconflict/mode-rdoc.js +243 -0
  145. package/src-noconflict/mode-red.js +450 -0
  146. package/src-noconflict/mode-redshift.js +360 -0
  147. package/src-noconflict/mode-rhtml.js +2808 -0
  148. package/src-noconflict/mode-rst.js +257 -0
  149. package/src-noconflict/mode-ruby.js +1003 -0
  150. package/src-noconflict/mode-rust.js +282 -0
  151. package/src-noconflict/mode-sass.js +529 -0
  152. package/src-noconflict/mode-scad.js +414 -0
  153. package/src-noconflict/mode-scala.js +984 -0
  154. package/src-noconflict/mode-scheme.js +232 -0
  155. package/src-noconflict/mode-scss.js +873 -0
  156. package/src-noconflict/mode-sh.js +449 -0
  157. package/src-noconflict/mode-sjs.js +1015 -0
  158. package/src-noconflict/mode-slim.js +5240 -0
  159. package/src-noconflict/mode-smarty.js +2635 -0
  160. package/src-noconflict/mode-snippets.js +207 -0
  161. package/src-noconflict/mode-soy_template.js +2848 -0
  162. package/src-noconflict/mode-space.js +167 -0
  163. package/src-noconflict/mode-sparql.js +320 -0
  164. package/src-noconflict/mode-sql.js +271 -0
  165. package/src-noconflict/mode-sqlserver.js +445 -0
  166. package/src-noconflict/mode-stylus.js +472 -0
  167. package/src-noconflict/mode-svg.js +1582 -0
  168. package/src-noconflict/mode-swift.js +395 -0
  169. package/src-noconflict/mode-tcl.js +387 -0
  170. package/src-noconflict/mode-terraform.js +400 -0
  171. package/src-noconflict/mode-tex.js +160 -0
  172. package/src-noconflict/mode-text.js +9 -0
  173. package/src-noconflict/mode-textile.js +150 -0
  174. package/src-noconflict/mode-toml.js +153 -0
  175. package/src-noconflict/mode-tsx.js +888 -0
  176. package/src-noconflict/mode-turtle.js +296 -0
  177. package/src-noconflict/mode-twig.js +2693 -0
  178. package/src-noconflict/mode-typescript.js +869 -0
  179. package/src-noconflict/mode-vala.js +677 -0
  180. package/src-noconflict/mode-vbscript.js +635 -0
  181. package/src-noconflict/mode-velocity.js +2792 -0
  182. package/src-noconflict/mode-verilog.js +118 -0
  183. package/src-noconflict/mode-vhdl.js +116 -0
  184. package/src-noconflict/mode-visualforce.js +2640 -0
  185. package/src-noconflict/mode-wollok.js +914 -0
  186. package/src-noconflict/mode-xml.js +676 -0
  187. package/src-noconflict/mode-xquery.js +2644 -0
  188. package/src-noconflict/mode-yaml.js +330 -0
  189. package/src-noconflict/mode-zeek.js +539 -0
  190. package/src-noconflict/qurator-mode.js +120 -0
  191. package/src-noconflict/qurator-worker.js +91 -0
  192. package/src-noconflict/snippets/abap.js +9 -0
  193. package/src-noconflict/snippets/abc.js +45 -0
  194. package/src-noconflict/snippets/actionscript.js +171 -0
  195. package/src-noconflict/snippets/ada.js +9 -0
  196. package/src-noconflict/snippets/apache_conf.js +9 -0
  197. package/src-noconflict/snippets/apex.js +9 -0
  198. package/src-noconflict/snippets/applescript.js +9 -0
  199. package/src-noconflict/snippets/aql.js +9 -0
  200. package/src-noconflict/snippets/asciidoc.js +9 -0
  201. package/src-noconflict/snippets/asl.js +9 -0
  202. package/src-noconflict/snippets/assembly_x86.js +9 -0
  203. package/src-noconflict/snippets/autohotkey.js +9 -0
  204. package/src-noconflict/snippets/batchfile.js +9 -0
  205. package/src-noconflict/snippets/c9search.js +9 -0
  206. package/src-noconflict/snippets/c_cpp.js +145 -0
  207. package/src-noconflict/snippets/cirru.js +9 -0
  208. package/src-noconflict/snippets/clojure.js +104 -0
  209. package/src-noconflict/snippets/cobol.js +9 -0
  210. package/src-noconflict/snippets/coffee.js +109 -0
  211. package/src-noconflict/snippets/coldfusion.js +9 -0
  212. package/src-noconflict/snippets/crystal.js +9 -0
  213. package/src-noconflict/snippets/csharp.js +9 -0
  214. package/src-noconflict/snippets/csound_document.js +24 -0
  215. package/src-noconflict/snippets/csound_orchestra.js +61 -0
  216. package/src-noconflict/snippets/csound_score.js +9 -0
  217. package/src-noconflict/snippets/csp.js +9 -0
  218. package/src-noconflict/snippets/css.js +981 -0
  219. package/src-noconflict/snippets/curly.js +9 -0
  220. package/src-noconflict/snippets/d.js +9 -0
  221. package/src-noconflict/snippets/dart.js +97 -0
  222. package/src-noconflict/snippets/diff.js +25 -0
  223. package/src-noconflict/snippets/django.js +122 -0
  224. package/src-noconflict/snippets/dockerfile.js +9 -0
  225. package/src-noconflict/snippets/dot.js +9 -0
  226. package/src-noconflict/snippets/drools.js +33 -0
  227. package/src-noconflict/snippets/edifact.js +254 -0
  228. package/src-noconflict/snippets/eiffel.js +9 -0
  229. package/src-noconflict/snippets/ejs.js +9 -0
  230. package/src-noconflict/snippets/elixir.js +9 -0
  231. package/src-noconflict/snippets/elm.js +9 -0
  232. package/src-noconflict/snippets/erlang.js +174 -0
  233. package/src-noconflict/snippets/forth.js +9 -0
  234. package/src-noconflict/snippets/fortran.js +9 -0
  235. package/src-noconflict/snippets/fsharp.js +9 -0
  236. package/src-noconflict/snippets/fsl.js +14 -0
  237. package/src-noconflict/snippets/ftl.js +9 -0
  238. package/src-noconflict/snippets/gcode.js +9 -0
  239. package/src-noconflict/snippets/gherkin.js +9 -0
  240. package/src-noconflict/snippets/gitignore.js +9 -0
  241. package/src-noconflict/snippets/glsl.js +9 -0
  242. package/src-noconflict/snippets/gobstones.js +1718 -0
  243. package/src-noconflict/snippets/golang.js +9 -0
  244. package/src-noconflict/snippets/graphqlschema.js +46 -0
  245. package/src-noconflict/snippets/groovy.js +9 -0
  246. package/src-noconflict/snippets/haml.js +34 -0
  247. package/src-noconflict/snippets/handlebars.js +9 -0
  248. package/src-noconflict/snippets/haskell.js +96 -0
  249. package/src-noconflict/snippets/haskell_cabal.js +9 -0
  250. package/src-noconflict/snippets/haxe.js +9 -0
  251. package/src-noconflict/snippets/hjson.js +9 -0
  252. package/src-noconflict/snippets/html.js +867 -0
  253. package/src-noconflict/snippets/html_elixir.js +9 -0
  254. package/src-noconflict/snippets/html_ruby.js +9 -0
  255. package/src-noconflict/snippets/ini.js +9 -0
  256. package/src-noconflict/snippets/io.js +76 -0
  257. package/src-noconflict/snippets/jack.js +9 -0
  258. package/src-noconflict/snippets/jade.js +9 -0
  259. package/src-noconflict/snippets/java.js +254 -0
  260. package/src-noconflict/snippets/javascript.js +209 -0
  261. package/src-noconflict/snippets/json.js +9 -0
  262. package/src-noconflict/snippets/jsoniq.js +75 -0
  263. package/src-noconflict/snippets/jsp.js +113 -0
  264. package/src-noconflict/snippets/jssm.js +9 -0
  265. package/src-noconflict/snippets/jsx.js +9 -0
  266. package/src-noconflict/snippets/julia.js +9 -0
  267. package/src-noconflict/snippets/kotlin.js +9 -0
  268. package/src-noconflict/snippets/latex.js +9 -0
  269. package/src-noconflict/snippets/less.js +9 -0
  270. package/src-noconflict/snippets/liquid.js +895 -0
  271. package/src-noconflict/snippets/lisp.js +9 -0
  272. package/src-noconflict/snippets/livescript.js +9 -0
  273. package/src-noconflict/snippets/logiql.js +9 -0
  274. package/src-noconflict/snippets/logtalk.js +9 -0
  275. package/src-noconflict/snippets/lsl.js +1246 -0
  276. package/src-noconflict/snippets/lua.js +35 -0
  277. package/src-noconflict/snippets/luapage.js +9 -0
  278. package/src-noconflict/snippets/lucene.js +9 -0
  279. package/src-noconflict/snippets/makefile.js +18 -0
  280. package/src-noconflict/snippets/markdown.js +102 -0
  281. package/src-noconflict/snippets/mask.js +9 -0
  282. package/src-noconflict/snippets/matlab.js +9 -0
  283. package/src-noconflict/snippets/maze.js +23 -0
  284. package/src-noconflict/snippets/mel.js +9 -0
  285. package/src-noconflict/snippets/mixal.js +9 -0
  286. package/src-noconflict/snippets/mushcode.js +9 -0
  287. package/src-noconflict/snippets/mysql.js +9 -0
  288. package/src-noconflict/snippets/nginx.js +9 -0
  289. package/src-noconflict/snippets/nim.js +9 -0
  290. package/src-noconflict/snippets/nix.js +9 -0
  291. package/src-noconflict/snippets/nsis.js +9 -0
  292. package/src-noconflict/snippets/objectivec.js +9 -0
  293. package/src-noconflict/snippets/ocaml.js +9 -0
  294. package/src-noconflict/snippets/pascal.js +9 -0
  295. package/src-noconflict/snippets/perl.js +361 -0
  296. package/src-noconflict/snippets/pgsql.js +9 -0
  297. package/src-noconflict/snippets/php.js +397 -0
  298. package/src-noconflict/snippets/php_laravel_blade.js +9 -0
  299. package/src-noconflict/snippets/pig.js +9 -0
  300. package/src-noconflict/snippets/plain_text.js +9 -0
  301. package/src-noconflict/snippets/powershell.js +9 -0
  302. package/src-noconflict/snippets/praat.js +9 -0
  303. package/src-noconflict/snippets/prolog.js +9 -0
  304. package/src-noconflict/snippets/properties.js +9 -0
  305. package/src-noconflict/snippets/protobuf.js +9 -0
  306. package/src-noconflict/snippets/puppet.js +9 -0
  307. package/src-noconflict/snippets/python.js +172 -0
  308. package/src-noconflict/snippets/r.js +135 -0
  309. package/src-noconflict/snippets/razor.js +17 -0
  310. package/src-noconflict/snippets/rdoc.js +9 -0
  311. package/src-noconflict/snippets/red.js +9 -0
  312. package/src-noconflict/snippets/redshift.js +9 -0
  313. package/src-noconflict/snippets/rhtml.js +9 -0
  314. package/src-noconflict/snippets/rst.js +36 -0
  315. package/src-noconflict/snippets/ruby.js +942 -0
  316. package/src-noconflict/snippets/rust.js +9 -0
  317. package/src-noconflict/snippets/sass.js +9 -0
  318. package/src-noconflict/snippets/scad.js +9 -0
  319. package/src-noconflict/snippets/scala.js +9 -0
  320. package/src-noconflict/snippets/scheme.js +9 -0
  321. package/src-noconflict/snippets/scss.js +9 -0
  322. package/src-noconflict/snippets/sh.js +97 -0
  323. package/src-noconflict/snippets/sjs.js +9 -0
  324. package/src-noconflict/snippets/slim.js +9 -0
  325. package/src-noconflict/snippets/smarty.js +9 -0
  326. package/src-noconflict/snippets/snippets.js +23 -0
  327. package/src-noconflict/snippets/soy_template.js +9 -0
  328. package/src-noconflict/snippets/space.js +9 -0
  329. package/src-noconflict/snippets/sparql.js +9 -0
  330. package/src-noconflict/snippets/sql.js +40 -0
  331. package/src-noconflict/snippets/sqlserver.js +83 -0
  332. package/src-noconflict/snippets/stylus.js +9 -0
  333. package/src-noconflict/snippets/svg.js +9 -0
  334. package/src-noconflict/snippets/swift.js +9 -0
  335. package/src-noconflict/snippets/tcl.js +106 -0
  336. package/src-noconflict/snippets/terraform.js +9 -0
  337. package/src-noconflict/snippets/tex.js +204 -0
  338. package/src-noconflict/snippets/text.js +9 -0
  339. package/src-noconflict/snippets/textile.js +44 -0
  340. package/src-noconflict/snippets/toml.js +9 -0
  341. package/src-noconflict/snippets/tsx.js +9 -0
  342. package/src-noconflict/snippets/turtle.js +9 -0
  343. package/src-noconflict/snippets/twig.js +9 -0
  344. package/src-noconflict/snippets/typescript.js +9 -0
  345. package/src-noconflict/snippets/vala.js +200 -0
  346. package/src-noconflict/snippets/vbscript.js +9 -0
  347. package/src-noconflict/snippets/velocity.js +43 -0
  348. package/src-noconflict/snippets/verilog.js +9 -0
  349. package/src-noconflict/snippets/vhdl.js +9 -0
  350. package/src-noconflict/snippets/visualforce.js +9 -0
  351. package/src-noconflict/snippets/wollok.js +98 -0
  352. package/src-noconflict/snippets/xml.js +9 -0
  353. package/src-noconflict/snippets/xquery.js +75 -0
  354. package/src-noconflict/snippets/yaml.js +9 -0
  355. package/src-noconflict/snippets/zeek.js +9 -0
  356. package/src-noconflict/theme-ambiance.js +185 -0
  357. package/src-noconflict/theme-chaos.js +163 -0
  358. package/src-noconflict/theme-chrome.js +135 -0
  359. package/src-noconflict/theme-clouds.js +102 -0
  360. package/src-noconflict/theme-clouds_midnight.js +103 -0
  361. package/src-noconflict/theme-cobalt.js +120 -0
  362. package/src-noconflict/theme-crimson_editor.js +125 -0
  363. package/src-noconflict/theme-dawn.js +115 -0
  364. package/src-noconflict/theme-dracula.js +135 -0
  365. package/src-noconflict/theme-dreamweaver.js +148 -0
  366. package/src-noconflict/theme-eclipse.js +105 -0
  367. package/src-noconflict/theme-github.js +110 -0
  368. package/src-noconflict/theme-gob.js +119 -0
  369. package/src-noconflict/theme-gruvbox.js +89 -0
  370. package/src-noconflict/theme-idle_fingers.js +103 -0
  371. package/src-noconflict/theme-iplastic.js +128 -0
  372. package/src-noconflict/theme-katzenmilch.js +128 -0
  373. package/src-noconflict/theme-kr_theme.js +111 -0
  374. package/src-noconflict/theme-kuroir.js +68 -0
  375. package/src-noconflict/theme-merbivore.js +102 -0
  376. package/src-noconflict/theme-merbivore_soft.js +103 -0
  377. package/src-noconflict/theme-mono_industrial.js +114 -0
  378. package/src-noconflict/theme-monokai.js +112 -0
  379. package/src-noconflict/theme-pastel_on_dark.js +115 -0
  380. package/src-noconflict/theme-solarized_dark.js +95 -0
  381. package/src-noconflict/theme-solarized_light.js +98 -0
  382. package/src-noconflict/theme-sqlserver.js +145 -0
  383. package/src-noconflict/theme-terminal.js +121 -0
  384. package/src-noconflict/theme-textmate.js +137 -0
  385. package/src-noconflict/theme-tomorrow.js +115 -0
  386. package/src-noconflict/theme-tomorrow_night.js +115 -0
  387. package/src-noconflict/theme-tomorrow_night_blue.js +113 -0
  388. package/src-noconflict/theme-tomorrow_night_bright.js +128 -0
  389. package/src-noconflict/theme-tomorrow_night_eighties.js +115 -0
  390. package/src-noconflict/theme-twilight.js +116 -0
  391. package/src-noconflict/theme-vibrant_ink.js +101 -0
  392. package/src-noconflict/theme-xcode.js +95 -0
  393. package/src-noconflict/worker-coffee.js +1470 -0
  394. package/src-noconflict/worker-css.js +9000 -0
  395. package/src-noconflict/worker-html.js +10922 -0
  396. package/src-noconflict/worker-javascript.js +15001 -0
  397. package/src-noconflict/worker-json.js +1715 -0
  398. package/src-noconflict/worker-lua.js +3608 -0
  399. package/src-noconflict/worker-php.js +3687 -0
  400. package/src-noconflict/worker-xml.js +3208 -0
  401. package/src-noconflict/worker-xquery.js +57668 -0
@@ -0,0 +1,3088 @@
1
+ ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var lang = require("../lib/lang");
6
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
7
+ var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
8
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
9
+ var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
10
+ var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
11
+ var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
12
+
13
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
14
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
15
+ var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
16
+
17
+ var CssHighlightRules = function() {
18
+
19
+ var keywordMapper = this.createKeywordMapper({
20
+ "support.function": supportFunction,
21
+ "support.constant": supportConstant,
22
+ "support.type": supportType,
23
+ "support.constant.color": supportConstantColor,
24
+ "support.constant.fonts": supportConstantFonts
25
+ }, "text", true);
26
+
27
+ this.$rules = {
28
+ "start" : [{
29
+ include : ["strings", "url", "comments"]
30
+ }, {
31
+ token: "paren.lparen",
32
+ regex: "\\{",
33
+ next: "ruleset"
34
+ }, {
35
+ token: "paren.rparen",
36
+ regex: "\\}"
37
+ }, {
38
+ token: "string",
39
+ regex: "@(?!viewport)",
40
+ next: "media"
41
+ }, {
42
+ token: "keyword",
43
+ regex: "#[a-z0-9-_]+"
44
+ }, {
45
+ token: "keyword",
46
+ regex: "%"
47
+ }, {
48
+ token: "variable",
49
+ regex: "\\.[a-z0-9-_]+"
50
+ }, {
51
+ token: "string",
52
+ regex: ":[a-z0-9-_]+"
53
+ }, {
54
+ token : "constant.numeric",
55
+ regex : numRe
56
+ }, {
57
+ token: "constant",
58
+ regex: "[a-z0-9-_]+"
59
+ }, {
60
+ caseInsensitive: true
61
+ }],
62
+
63
+ "media": [{
64
+ include : ["strings", "url", "comments"]
65
+ }, {
66
+ token: "paren.lparen",
67
+ regex: "\\{",
68
+ next: "start"
69
+ }, {
70
+ token: "paren.rparen",
71
+ regex: "\\}",
72
+ next: "start"
73
+ }, {
74
+ token: "string",
75
+ regex: ";",
76
+ next: "start"
77
+ }, {
78
+ token: "keyword",
79
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
80
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
81
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
82
+ }],
83
+
84
+ "comments" : [{
85
+ token: "comment", // multi line comment
86
+ regex: "\\/\\*",
87
+ push: [{
88
+ token : "comment",
89
+ regex : "\\*\\/",
90
+ next : "pop"
91
+ }, {
92
+ defaultToken : "comment"
93
+ }]
94
+ }],
95
+
96
+ "ruleset" : [{
97
+ regex : "-(webkit|ms|moz|o)-",
98
+ token : "text"
99
+ }, {
100
+ token : "punctuation.operator",
101
+ regex : "[:;]"
102
+ }, {
103
+ token : "paren.rparen",
104
+ regex : "\\}",
105
+ next : "start"
106
+ }, {
107
+ include : ["strings", "url", "comments"]
108
+ }, {
109
+ token : ["constant.numeric", "keyword"],
110
+ regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
111
+ }, {
112
+ token : "constant.numeric",
113
+ regex : numRe
114
+ }, {
115
+ token : "constant.numeric", // hex6 color
116
+ regex : "#[a-f0-9]{6}"
117
+ }, {
118
+ token : "constant.numeric", // hex3 color
119
+ regex : "#[a-f0-9]{3}"
120
+ }, {
121
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
122
+ regex : pseudoElements
123
+ }, {
124
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
125
+ regex : pseudoClasses
126
+ }, {
127
+ include: "url"
128
+ }, {
129
+ token : keywordMapper,
130
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
131
+ }, {
132
+ caseInsensitive: true
133
+ }],
134
+
135
+ url: [{
136
+ token : "support.function",
137
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
138
+ push: [{
139
+ token : "support.function",
140
+ regex : "\\)",
141
+ next : "pop"
142
+ }, {
143
+ defaultToken: "string"
144
+ }]
145
+ }],
146
+
147
+ strings: [{
148
+ token : "string.start",
149
+ regex : "'",
150
+ push : [{
151
+ token : "string.end",
152
+ regex : "'|$",
153
+ next: "pop"
154
+ }, {
155
+ include : "escapes"
156
+ }, {
157
+ token : "constant.language.escape",
158
+ regex : /\\$/,
159
+ consumeLineEnd: true
160
+ }, {
161
+ defaultToken: "string"
162
+ }]
163
+ }, {
164
+ token : "string.start",
165
+ regex : '"',
166
+ push : [{
167
+ token : "string.end",
168
+ regex : '"|$',
169
+ next: "pop"
170
+ }, {
171
+ include : "escapes"
172
+ }, {
173
+ token : "constant.language.escape",
174
+ regex : /\\$/,
175
+ consumeLineEnd: true
176
+ }, {
177
+ defaultToken: "string"
178
+ }]
179
+ }],
180
+ escapes: [{
181
+ token : "constant.language.escape",
182
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
183
+ }]
184
+
185
+ };
186
+
187
+ this.normalizeRules();
188
+ };
189
+
190
+ oop.inherits(CssHighlightRules, TextHighlightRules);
191
+
192
+ exports.CssHighlightRules = CssHighlightRules;
193
+
194
+ });
195
+
196
+ ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
197
+ "use strict";
198
+
199
+ var oop = require("../lib/oop");
200
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
201
+
202
+ var DocCommentHighlightRules = function() {
203
+ this.$rules = {
204
+ "start" : [ {
205
+ token : "comment.doc.tag",
206
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
207
+ },
208
+ DocCommentHighlightRules.getTagRule(),
209
+ {
210
+ defaultToken : "comment.doc",
211
+ caseInsensitive: true
212
+ }]
213
+ };
214
+ };
215
+
216
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
217
+
218
+ DocCommentHighlightRules.getTagRule = function(start) {
219
+ return {
220
+ token : "comment.doc.tag.storage.type",
221
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
222
+ };
223
+ };
224
+
225
+ DocCommentHighlightRules.getStartRule = function(start) {
226
+ return {
227
+ token : "comment.doc", // doc comment
228
+ regex : "\\/\\*(?=\\*)",
229
+ next : start
230
+ };
231
+ };
232
+
233
+ DocCommentHighlightRules.getEndRule = function (start) {
234
+ return {
235
+ token : "comment.doc", // closing comment
236
+ regex : "\\*\\/",
237
+ next : start
238
+ };
239
+ };
240
+
241
+
242
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
243
+
244
+ });
245
+
246
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
247
+ "use strict";
248
+
249
+ var oop = require("../lib/oop");
250
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
251
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
252
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
253
+
254
+ var JavaScriptHighlightRules = function(options) {
255
+ var keywordMapper = this.createKeywordMapper({
256
+ "variable.language":
257
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
258
+ "Namespace|QName|XML|XMLList|" + // E4X
259
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
260
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
261
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
262
+ "SyntaxError|TypeError|URIError|" +
263
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
264
+ "isNaN|parseFloat|parseInt|" +
265
+ "JSON|Math|" + // Other
266
+ "this|arguments|prototype|window|document" , // Pseudo
267
+ "keyword":
268
+ "const|yield|import|get|set|async|await|" +
269
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
270
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
271
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
272
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
273
+ "storage.type":
274
+ "const|let|var|function",
275
+ "constant.language":
276
+ "null|Infinity|NaN|undefined",
277
+ "support.function":
278
+ "alert",
279
+ "constant.language.boolean": "true|false"
280
+ }, "identifier");
281
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
282
+
283
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
284
+ "u[0-9a-fA-F]{4}|" + // unicode
285
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
286
+ "[0-2][0-7]{0,2}|" + // oct
287
+ "3[0-7][0-7]?|" + // oct
288
+ "[4-7][0-7]?|" + //oct
289
+ ".)";
290
+
291
+ this.$rules = {
292
+ "no_regex" : [
293
+ DocCommentHighlightRules.getStartRule("doc-start"),
294
+ comments("no_regex"),
295
+ {
296
+ token : "string",
297
+ regex : "'(?=.)",
298
+ next : "qstring"
299
+ }, {
300
+ token : "string",
301
+ regex : '"(?=.)',
302
+ next : "qqstring"
303
+ }, {
304
+ token : "constant.numeric", // hexadecimal, octal and binary
305
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
306
+ }, {
307
+ token : "constant.numeric", // decimal integers and floats
308
+ regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
309
+ }, {
310
+ token : [
311
+ "storage.type", "punctuation.operator", "support.function",
312
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
313
+ ],
314
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
315
+ next: "function_arguments"
316
+ }, {
317
+ token : [
318
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
319
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
320
+ ],
321
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
322
+ next: "function_arguments"
323
+ }, {
324
+ token : [
325
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
326
+ "text", "paren.lparen"
327
+ ],
328
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
329
+ next: "function_arguments"
330
+ }, {
331
+ token : [
332
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
333
+ "keyword.operator", "text",
334
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
335
+ ],
336
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
337
+ next: "function_arguments"
338
+ }, {
339
+ token : [
340
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
341
+ ],
342
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
343
+ next: "function_arguments"
344
+ }, {
345
+ token : [
346
+ "entity.name.function", "text", "punctuation.operator",
347
+ "text", "storage.type", "text", "paren.lparen"
348
+ ],
349
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
350
+ next: "function_arguments"
351
+ }, {
352
+ token : [
353
+ "text", "text", "storage.type", "text", "paren.lparen"
354
+ ],
355
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
356
+ next: "function_arguments"
357
+ }, {
358
+ token : "keyword",
359
+ regex : "from(?=\\s*('|\"))"
360
+ }, {
361
+ token : "keyword",
362
+ regex : "(?:" + kwBeforeRe + ")\\b",
363
+ next : "start"
364
+ }, {
365
+ token : ["support.constant"],
366
+ regex : /that\b/
367
+ }, {
368
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
369
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
370
+ }, {
371
+ token : keywordMapper,
372
+ regex : identifierRe
373
+ }, {
374
+ token : "punctuation.operator",
375
+ regex : /[.](?![.])/,
376
+ next : "property"
377
+ }, {
378
+ token : "storage.type",
379
+ regex : /=>/,
380
+ next : "start"
381
+ }, {
382
+ token : "keyword.operator",
383
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
384
+ next : "start"
385
+ }, {
386
+ token : "punctuation.operator",
387
+ regex : /[?:,;.]/,
388
+ next : "start"
389
+ }, {
390
+ token : "paren.lparen",
391
+ regex : /[\[({]/,
392
+ next : "start"
393
+ }, {
394
+ token : "paren.rparen",
395
+ regex : /[\])}]/
396
+ }, {
397
+ token: "comment",
398
+ regex: /^#!.*$/
399
+ }
400
+ ],
401
+ property: [{
402
+ token : "text",
403
+ regex : "\\s+"
404
+ }, {
405
+ token : [
406
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
407
+ "keyword.operator", "text",
408
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
409
+ ],
410
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
411
+ next: "function_arguments"
412
+ }, {
413
+ token : "punctuation.operator",
414
+ regex : /[.](?![.])/
415
+ }, {
416
+ token : "support.function",
417
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
418
+ }, {
419
+ token : "support.function.dom",
420
+ 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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
421
+ }, {
422
+ token : "support.constant",
423
+ 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/
424
+ }, {
425
+ token : "identifier",
426
+ regex : identifierRe
427
+ }, {
428
+ regex: "",
429
+ token: "empty",
430
+ next: "no_regex"
431
+ }
432
+ ],
433
+ "start": [
434
+ DocCommentHighlightRules.getStartRule("doc-start"),
435
+ comments("start"),
436
+ {
437
+ token: "string.regexp",
438
+ regex: "\\/",
439
+ next: "regex"
440
+ }, {
441
+ token : "text",
442
+ regex : "\\s+|^$",
443
+ next : "start"
444
+ }, {
445
+ token: "empty",
446
+ regex: "",
447
+ next: "no_regex"
448
+ }
449
+ ],
450
+ "regex": [
451
+ {
452
+ token: "regexp.keyword.operator",
453
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
454
+ }, {
455
+ token: "string.regexp",
456
+ regex: "/[sxngimy]*",
457
+ next: "no_regex"
458
+ }, {
459
+ token : "invalid",
460
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
461
+ }, {
462
+ token : "constant.language.escape",
463
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
464
+ }, {
465
+ token : "constant.language.delimiter",
466
+ regex: /\|/
467
+ }, {
468
+ token: "constant.language.escape",
469
+ regex: /\[\^?/,
470
+ next: "regex_character_class"
471
+ }, {
472
+ token: "empty",
473
+ regex: "$",
474
+ next: "no_regex"
475
+ }, {
476
+ defaultToken: "string.regexp"
477
+ }
478
+ ],
479
+ "regex_character_class": [
480
+ {
481
+ token: "regexp.charclass.keyword.operator",
482
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
483
+ }, {
484
+ token: "constant.language.escape",
485
+ regex: "]",
486
+ next: "regex"
487
+ }, {
488
+ token: "constant.language.escape",
489
+ regex: "-"
490
+ }, {
491
+ token: "empty",
492
+ regex: "$",
493
+ next: "no_regex"
494
+ }, {
495
+ defaultToken: "string.regexp.charachterclass"
496
+ }
497
+ ],
498
+ "function_arguments": [
499
+ {
500
+ token: "variable.parameter",
501
+ regex: identifierRe
502
+ }, {
503
+ token: "punctuation.operator",
504
+ regex: "[, ]+"
505
+ }, {
506
+ token: "punctuation.operator",
507
+ regex: "$"
508
+ }, {
509
+ token: "empty",
510
+ regex: "",
511
+ next: "no_regex"
512
+ }
513
+ ],
514
+ "qqstring" : [
515
+ {
516
+ token : "constant.language.escape",
517
+ regex : escapedRe
518
+ }, {
519
+ token : "string",
520
+ regex : "\\\\$",
521
+ consumeLineEnd : true
522
+ }, {
523
+ token : "string",
524
+ regex : '"|$',
525
+ next : "no_regex"
526
+ }, {
527
+ defaultToken: "string"
528
+ }
529
+ ],
530
+ "qstring" : [
531
+ {
532
+ token : "constant.language.escape",
533
+ regex : escapedRe
534
+ }, {
535
+ token : "string",
536
+ regex : "\\\\$",
537
+ consumeLineEnd : true
538
+ }, {
539
+ token : "string",
540
+ regex : "'|$",
541
+ next : "no_regex"
542
+ }, {
543
+ defaultToken: "string"
544
+ }
545
+ ]
546
+ };
547
+
548
+
549
+ if (!options || !options.noES6) {
550
+ this.$rules.no_regex.unshift({
551
+ regex: "[{}]", onMatch: function(val, state, stack) {
552
+ this.next = val == "{" ? this.nextState : "";
553
+ if (val == "{" && stack.length) {
554
+ stack.unshift("start", state);
555
+ }
556
+ else if (val == "}" && stack.length) {
557
+ stack.shift();
558
+ this.next = stack.shift();
559
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
560
+ return "paren.quasi.end";
561
+ }
562
+ return val == "{" ? "paren.lparen" : "paren.rparen";
563
+ },
564
+ nextState: "start"
565
+ }, {
566
+ token : "string.quasi.start",
567
+ regex : /`/,
568
+ push : [{
569
+ token : "constant.language.escape",
570
+ regex : escapedRe
571
+ }, {
572
+ token : "paren.quasi.start",
573
+ regex : /\${/,
574
+ push : "start"
575
+ }, {
576
+ token : "string.quasi.end",
577
+ regex : /`/,
578
+ next : "pop"
579
+ }, {
580
+ defaultToken: "string.quasi"
581
+ }]
582
+ });
583
+
584
+ if (!options || options.jsx != false)
585
+ JSX.call(this);
586
+ }
587
+
588
+ this.embedRules(DocCommentHighlightRules, "doc-",
589
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
590
+
591
+ this.normalizeRules();
592
+ };
593
+
594
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
595
+
596
+ function JSX() {
597
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
598
+ var jsxTag = {
599
+ onMatch : function(val, state, stack) {
600
+ var offset = val.charAt(1) == "/" ? 2 : 1;
601
+ if (offset == 1) {
602
+ if (state != this.nextState)
603
+ stack.unshift(this.next, this.nextState, 0);
604
+ else
605
+ stack.unshift(this.next);
606
+ stack[2]++;
607
+ } else if (offset == 2) {
608
+ if (state == this.nextState) {
609
+ stack[1]--;
610
+ if (!stack[1] || stack[1] < 0) {
611
+ stack.shift();
612
+ stack.shift();
613
+ }
614
+ }
615
+ }
616
+ return [{
617
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
618
+ value: val.slice(0, offset)
619
+ }, {
620
+ type: "meta.tag.tag-name.xml",
621
+ value: val.substr(offset)
622
+ }];
623
+ },
624
+ regex : "</?" + tagRegex + "",
625
+ next: "jsxAttributes",
626
+ nextState: "jsx"
627
+ };
628
+ this.$rules.start.unshift(jsxTag);
629
+ var jsxJsRule = {
630
+ regex: "{",
631
+ token: "paren.quasi.start",
632
+ push: "start"
633
+ };
634
+ this.$rules.jsx = [
635
+ jsxJsRule,
636
+ jsxTag,
637
+ {include : "reference"},
638
+ {defaultToken: "string"}
639
+ ];
640
+ this.$rules.jsxAttributes = [{
641
+ token : "meta.tag.punctuation.tag-close.xml",
642
+ regex : "/?>",
643
+ onMatch : function(value, currentState, stack) {
644
+ if (currentState == stack[0])
645
+ stack.shift();
646
+ if (value.length == 2) {
647
+ if (stack[0] == this.nextState)
648
+ stack[1]--;
649
+ if (!stack[1] || stack[1] < 0) {
650
+ stack.splice(0, 2);
651
+ }
652
+ }
653
+ this.next = stack[0] || "start";
654
+ return [{type: this.token, value: value}];
655
+ },
656
+ nextState: "jsx"
657
+ },
658
+ jsxJsRule,
659
+ comments("jsxAttributes"),
660
+ {
661
+ token : "entity.other.attribute-name.xml",
662
+ regex : tagRegex
663
+ }, {
664
+ token : "keyword.operator.attribute-equals.xml",
665
+ regex : "="
666
+ }, {
667
+ token : "text.tag-whitespace.xml",
668
+ regex : "\\s+"
669
+ }, {
670
+ token : "string.attribute-value.xml",
671
+ regex : "'",
672
+ stateName : "jsx_attr_q",
673
+ push : [
674
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
675
+ {include : "reference"},
676
+ {defaultToken : "string.attribute-value.xml"}
677
+ ]
678
+ }, {
679
+ token : "string.attribute-value.xml",
680
+ regex : '"',
681
+ stateName : "jsx_attr_qq",
682
+ push : [
683
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
684
+ {include : "reference"},
685
+ {defaultToken : "string.attribute-value.xml"}
686
+ ]
687
+ },
688
+ jsxTag
689
+ ];
690
+ this.$rules.reference = [{
691
+ token : "constant.language.escape.reference.xml",
692
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
693
+ }];
694
+ }
695
+
696
+ function comments(next) {
697
+ return [
698
+ {
699
+ token : "comment", // multi line comment
700
+ regex : /\/\*/,
701
+ next: [
702
+ DocCommentHighlightRules.getTagRule(),
703
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
704
+ {defaultToken : "comment", caseInsensitive: true}
705
+ ]
706
+ }, {
707
+ token : "comment",
708
+ regex : "\\/\\/",
709
+ next: [
710
+ DocCommentHighlightRules.getTagRule(),
711
+ {token : "comment", regex : "$|^", next : next || "pop"},
712
+ {defaultToken : "comment", caseInsensitive: true}
713
+ ]
714
+ }
715
+ ];
716
+ }
717
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
718
+ });
719
+
720
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
721
+ "use strict";
722
+
723
+ var oop = require("../lib/oop");
724
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
725
+
726
+ var XmlHighlightRules = function(normalize) {
727
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
728
+
729
+ this.$rules = {
730
+ start : [
731
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
732
+ {
733
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
734
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
735
+ },
736
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
737
+ {
738
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
739
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
740
+ },
741
+ {include : "tag"},
742
+ {token : "text.end-tag-open.xml", regex: "</"},
743
+ {token : "text.tag-open.xml", regex: "<"},
744
+ {include : "reference"},
745
+ {defaultToken : "text.xml"}
746
+ ],
747
+
748
+ processing_instruction : [{
749
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
750
+ regex : tagRegex
751
+ }, {
752
+ token : "keyword.operator.decl-attribute-equals.xml",
753
+ regex : "="
754
+ }, {
755
+ include: "whitespace"
756
+ }, {
757
+ include: "string"
758
+ }, {
759
+ token : "punctuation.xml-decl.xml",
760
+ regex : "\\?>",
761
+ next : "start"
762
+ }],
763
+
764
+ doctype : [
765
+ {include : "whitespace"},
766
+ {include : "string"},
767
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
768
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
769
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
770
+ ],
771
+
772
+ int_subset : [{
773
+ token : "text.xml",
774
+ regex : "\\s+"
775
+ }, {
776
+ token: "punctuation.int-subset.xml",
777
+ regex: "]",
778
+ next: "pop"
779
+ }, {
780
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
781
+ regex : "(<\\!)(" + tagRegex + ")",
782
+ push : [{
783
+ token : "text",
784
+ regex : "\\s+"
785
+ },
786
+ {
787
+ token : "punctuation.markup-decl.xml",
788
+ regex : ">",
789
+ next : "pop"
790
+ },
791
+ {include : "string"}]
792
+ }],
793
+
794
+ cdata : [
795
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
796
+ {token : "text.xml", regex : "\\s+"},
797
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
798
+ ],
799
+
800
+ comment : [
801
+ {token : "comment.end.xml", regex : "-->", next : "start"},
802
+ {defaultToken : "comment.xml"}
803
+ ],
804
+
805
+ reference : [{
806
+ token : "constant.language.escape.reference.xml",
807
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
808
+ }],
809
+
810
+ attr_reference : [{
811
+ token : "constant.language.escape.reference.attribute-value.xml",
812
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
813
+ }],
814
+
815
+ tag : [{
816
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
817
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
818
+ next: [
819
+ {include : "attributes"},
820
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
821
+ ]
822
+ }],
823
+
824
+ tag_whitespace : [
825
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
826
+ ],
827
+ whitespace : [
828
+ {token : "text.whitespace.xml", regex : "\\s+"}
829
+ ],
830
+ string: [{
831
+ token : "string.xml",
832
+ regex : "'",
833
+ push : [
834
+ {token : "string.xml", regex: "'", next: "pop"},
835
+ {defaultToken : "string.xml"}
836
+ ]
837
+ }, {
838
+ token : "string.xml",
839
+ regex : '"',
840
+ push : [
841
+ {token : "string.xml", regex: '"', next: "pop"},
842
+ {defaultToken : "string.xml"}
843
+ ]
844
+ }],
845
+
846
+ attributes: [{
847
+ token : "entity.other.attribute-name.xml",
848
+ regex : tagRegex
849
+ }, {
850
+ token : "keyword.operator.attribute-equals.xml",
851
+ regex : "="
852
+ }, {
853
+ include: "tag_whitespace"
854
+ }, {
855
+ include: "attribute_value"
856
+ }],
857
+
858
+ attribute_value: [{
859
+ token : "string.attribute-value.xml",
860
+ regex : "'",
861
+ push : [
862
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
863
+ {include : "attr_reference"},
864
+ {defaultToken : "string.attribute-value.xml"}
865
+ ]
866
+ }, {
867
+ token : "string.attribute-value.xml",
868
+ regex : '"',
869
+ push : [
870
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
871
+ {include : "attr_reference"},
872
+ {defaultToken : "string.attribute-value.xml"}
873
+ ]
874
+ }]
875
+ };
876
+
877
+ if (this.constructor === XmlHighlightRules)
878
+ this.normalizeRules();
879
+ };
880
+
881
+
882
+ (function() {
883
+
884
+ this.embedTagRules = function(HighlightRules, prefix, tag){
885
+ this.$rules.tag.unshift({
886
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
887
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
888
+ next: [
889
+ {include : "attributes"},
890
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
891
+ ]
892
+ });
893
+
894
+ this.$rules[tag + "-end"] = [
895
+ {include : "attributes"},
896
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
897
+ onMatch : function(value, currentState, stack) {
898
+ stack.splice(0);
899
+ return this.token;
900
+ }}
901
+ ];
902
+
903
+ this.embedRules(HighlightRules, prefix, [{
904
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
905
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
906
+ next: tag + "-end"
907
+ }, {
908
+ token: "string.cdata.xml",
909
+ regex : "<\\!\\[CDATA\\["
910
+ }, {
911
+ token: "string.cdata.xml",
912
+ regex : "\\]\\]>"
913
+ }]);
914
+ };
915
+
916
+ }).call(TextHighlightRules.prototype);
917
+
918
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
919
+
920
+ exports.XmlHighlightRules = XmlHighlightRules;
921
+ });
922
+
923
+ ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
924
+ "use strict";
925
+
926
+ var oop = require("../lib/oop");
927
+ var lang = require("../lib/lang");
928
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
929
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
930
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
931
+
932
+ var tagMap = lang.createMap({
933
+ a : 'anchor',
934
+ button : 'form',
935
+ form : 'form',
936
+ img : 'image',
937
+ input : 'form',
938
+ label : 'form',
939
+ option : 'form',
940
+ script : 'script',
941
+ select : 'form',
942
+ textarea : 'form',
943
+ style : 'style',
944
+ table : 'table',
945
+ tbody : 'table',
946
+ td : 'table',
947
+ tfoot : 'table',
948
+ th : 'table',
949
+ tr : 'table'
950
+ });
951
+
952
+ var HtmlHighlightRules = function() {
953
+ XmlHighlightRules.call(this);
954
+
955
+ this.addRules({
956
+ attributes: [{
957
+ include : "tag_whitespace"
958
+ }, {
959
+ token : "entity.other.attribute-name.xml",
960
+ regex : "[-_a-zA-Z0-9:.]+"
961
+ }, {
962
+ token : "keyword.operator.attribute-equals.xml",
963
+ regex : "=",
964
+ push : [{
965
+ include: "tag_whitespace"
966
+ }, {
967
+ token : "string.unquoted.attribute-value.html",
968
+ regex : "[^<>='\"`\\s]+",
969
+ next : "pop"
970
+ }, {
971
+ token : "empty",
972
+ regex : "",
973
+ next : "pop"
974
+ }]
975
+ }, {
976
+ include : "attribute_value"
977
+ }],
978
+ tag: [{
979
+ token : function(start, tag) {
980
+ var group = tagMap[tag];
981
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
982
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
983
+ },
984
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
985
+ next: "tag_stuff"
986
+ }],
987
+ tag_stuff: [
988
+ {include : "attributes"},
989
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
990
+ ]
991
+ });
992
+
993
+ this.embedTagRules(CssHighlightRules, "css-", "style");
994
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
995
+
996
+ if (this.constructor === HtmlHighlightRules)
997
+ this.normalizeRules();
998
+ };
999
+
1000
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1001
+
1002
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1003
+ });
1004
+
1005
+ ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
1006
+ "use strict";
1007
+
1008
+ var oop = require("../lib/oop");
1009
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1010
+
1011
+ var ElixirHighlightRules = function() {
1012
+
1013
+ this.$rules = { start:
1014
+ [ { token:
1015
+ [ 'meta.module.elixir',
1016
+ 'keyword.control.module.elixir',
1017
+ 'meta.module.elixir',
1018
+ 'entity.name.type.module.elixir' ],
1019
+ regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' },
1020
+ { token: 'comment.documentation.heredoc',
1021
+ regex: '@(?:module|type)?doc (?:~[a-z])?"""',
1022
+ push:
1023
+ [ { token: 'comment.documentation.heredoc',
1024
+ regex: '\\s*"""',
1025
+ next: 'pop' },
1026
+ { include: '#interpolated_elixir' },
1027
+ { include: '#escaped_char' },
1028
+ { defaultToken: 'comment.documentation.heredoc' } ],
1029
+ comment: '@doc with heredocs is treated as documentation' },
1030
+ { token: 'comment.documentation.heredoc',
1031
+ regex: '@(?:module|type)?doc ~[A-Z]"""',
1032
+ push:
1033
+ [ { token: 'comment.documentation.heredoc',
1034
+ regex: '\\s*"""',
1035
+ next: 'pop' },
1036
+ { defaultToken: 'comment.documentation.heredoc' } ],
1037
+ comment: '@doc with heredocs is treated as documentation' },
1038
+ { token: 'comment.documentation.heredoc',
1039
+ regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'',
1040
+ push:
1041
+ [ { token: 'comment.documentation.heredoc',
1042
+ regex: '\\s*\'\'\'',
1043
+ next: 'pop' },
1044
+ { include: '#interpolated_elixir' },
1045
+ { include: '#escaped_char' },
1046
+ { defaultToken: 'comment.documentation.heredoc' } ],
1047
+ comment: '@doc with heredocs is treated as documentation' },
1048
+ { token: 'comment.documentation.heredoc',
1049
+ regex: '@(?:module|type)?doc ~[A-Z]\'\'\'',
1050
+ push:
1051
+ [ { token: 'comment.documentation.heredoc',
1052
+ regex: '\\s*\'\'\'',
1053
+ next: 'pop' },
1054
+ { defaultToken: 'comment.documentation.heredoc' } ],
1055
+ comment: '@doc with heredocs is treated as documentation' },
1056
+ { token: 'comment.documentation.false',
1057
+ regex: '@(?:module|type)?doc false',
1058
+ comment: '@doc false is treated as documentation' },
1059
+ { token: 'comment.documentation.string',
1060
+ regex: '@(?:module|type)?doc "',
1061
+ push:
1062
+ [ { token: 'comment.documentation.string',
1063
+ regex: '"',
1064
+ next: 'pop' },
1065
+ { include: '#interpolated_elixir' },
1066
+ { include: '#escaped_char' },
1067
+ { defaultToken: 'comment.documentation.string' } ],
1068
+ comment: '@doc with string is treated as documentation' },
1069
+ { token: 'keyword.control.elixir',
1070
+ regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])',
1071
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1072
+ originalRegex: '(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])' },
1073
+ { token: 'keyword.operator.elixir',
1074
+ regex: '\\b(?:and|not|or|when|xor|in|inlist|inbits)\\b',
1075
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1076
+ originalRegex: '(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b',
1077
+ comment: ' as above, just doesn\'t need a \'end\' and does a logic operation' },
1078
+ { token: 'constant.language.elixir',
1079
+ regex: '\\b(?:nil|true|false)\\b(?![?!])' },
1080
+ { token: 'variable.language.elixir',
1081
+ regex: '\\b__(?:CALLER|ENV|MODULE|DIR)__\\b(?![?!])' },
1082
+ { token:
1083
+ [ 'punctuation.definition.variable.elixir',
1084
+ 'variable.other.readwrite.module.elixir' ],
1085
+ regex: '(@)([a-zA-Z_]\\w*)' },
1086
+ { token:
1087
+ [ 'punctuation.definition.variable.elixir',
1088
+ 'variable.other.anonymous.elixir' ],
1089
+ regex: '(&)(\\d*)' },
1090
+ { token: 'variable.other.constant.elixir',
1091
+ regex: '\\b[A-Z]\\w*\\b' },
1092
+ { token: 'constant.numeric.elixir',
1093
+ regex: '\\b(?:0x[\\da-fA-F](?:_?[\\da-fA-F])*|\\d(?:_?\\d)*(?:\\.(?![^[:space:][:digit:]])(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|0b[01]+|0o[0-7]+)\\b',
1094
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1095
+ originalRegex: '\\b(0x\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' },
1096
+ { token: 'punctuation.definition.constant.elixir',
1097
+ regex: ':\'',
1098
+ push:
1099
+ [ { token: 'punctuation.definition.constant.elixir',
1100
+ regex: '\'',
1101
+ next: 'pop' },
1102
+ { include: '#interpolated_elixir' },
1103
+ { include: '#escaped_char' },
1104
+ { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] },
1105
+ { token: 'punctuation.definition.constant.elixir',
1106
+ regex: ':"',
1107
+ push:
1108
+ [ { token: 'punctuation.definition.constant.elixir',
1109
+ regex: '"',
1110
+ next: 'pop' },
1111
+ { include: '#interpolated_elixir' },
1112
+ { include: '#escaped_char' },
1113
+ { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] },
1114
+ { token: 'punctuation.definition.string.begin.elixir',
1115
+ regex: '(?:\'\'\')',
1116
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1117
+ originalRegex: '(?>\'\'\')',
1118
+ push:
1119
+ [ { token: 'punctuation.definition.string.end.elixir',
1120
+ regex: '^\\s*\'\'\'',
1121
+ next: 'pop' },
1122
+ { include: '#interpolated_elixir' },
1123
+ { include: '#escaped_char' },
1124
+ { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ],
1125
+ comment: 'Single-quoted heredocs' },
1126
+ { token: 'punctuation.definition.string.begin.elixir',
1127
+ regex: '\'',
1128
+ push:
1129
+ [ { token: 'punctuation.definition.string.end.elixir',
1130
+ regex: '\'',
1131
+ next: 'pop' },
1132
+ { include: '#interpolated_elixir' },
1133
+ { include: '#escaped_char' },
1134
+ { defaultToken: 'support.function.variable.quoted.single.elixir' } ],
1135
+ comment: 'single quoted string (allows for interpolation)' },
1136
+ { token: 'punctuation.definition.string.begin.elixir',
1137
+ regex: '(?:""")',
1138
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1139
+ originalRegex: '(?>""")',
1140
+ push:
1141
+ [ { token: 'punctuation.definition.string.end.elixir',
1142
+ regex: '^\\s*"""',
1143
+ next: 'pop' },
1144
+ { include: '#interpolated_elixir' },
1145
+ { include: '#escaped_char' },
1146
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
1147
+ comment: 'Double-quoted heredocs' },
1148
+ { token: 'punctuation.definition.string.begin.elixir',
1149
+ regex: '"',
1150
+ push:
1151
+ [ { token: 'punctuation.definition.string.end.elixir',
1152
+ regex: '"',
1153
+ next: 'pop' },
1154
+ { include: '#interpolated_elixir' },
1155
+ { include: '#escaped_char' },
1156
+ { defaultToken: 'string.quoted.double.elixir' } ],
1157
+ comment: 'double quoted string (allows for interpolation)' },
1158
+ { token: 'punctuation.definition.string.begin.elixir',
1159
+ regex: '~[a-z](?:""")',
1160
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1161
+ originalRegex: '~[a-z](?>""")',
1162
+ push:
1163
+ [ { token: 'punctuation.definition.string.end.elixir',
1164
+ regex: '^\\s*"""',
1165
+ next: 'pop' },
1166
+ { include: '#interpolated_elixir' },
1167
+ { include: '#escaped_char' },
1168
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
1169
+ comment: 'Double-quoted heredocs sigils' },
1170
+ { token: 'punctuation.definition.string.begin.elixir',
1171
+ regex: '~[a-z]\\{',
1172
+ push:
1173
+ [ { token: 'punctuation.definition.string.end.elixir',
1174
+ regex: '\\}[a-z]*',
1175
+ next: 'pop' },
1176
+ { include: '#interpolated_elixir' },
1177
+ { include: '#escaped_char' },
1178
+ { defaultToken: 'string.interpolated.elixir' } ],
1179
+ comment: 'sigil (allow for interpolation)' },
1180
+ { token: 'punctuation.definition.string.begin.elixir',
1181
+ regex: '~[a-z]\\[',
1182
+ push:
1183
+ [ { token: 'punctuation.definition.string.end.elixir',
1184
+ regex: '\\][a-z]*',
1185
+ next: 'pop' },
1186
+ { include: '#interpolated_elixir' },
1187
+ { include: '#escaped_char' },
1188
+ { defaultToken: 'string.interpolated.elixir' } ],
1189
+ comment: 'sigil (allow for interpolation)' },
1190
+ { token: 'punctuation.definition.string.begin.elixir',
1191
+ regex: '~[a-z]\\<',
1192
+ push:
1193
+ [ { token: 'punctuation.definition.string.end.elixir',
1194
+ regex: '\\>[a-z]*',
1195
+ next: 'pop' },
1196
+ { include: '#interpolated_elixir' },
1197
+ { include: '#escaped_char' },
1198
+ { defaultToken: 'string.interpolated.elixir' } ],
1199
+ comment: 'sigil (allow for interpolation)' },
1200
+ { token: 'punctuation.definition.string.begin.elixir',
1201
+ regex: '~[a-z]\\(',
1202
+ push:
1203
+ [ { token: 'punctuation.definition.string.end.elixir',
1204
+ regex: '\\)[a-z]*',
1205
+ next: 'pop' },
1206
+ { include: '#interpolated_elixir' },
1207
+ { include: '#escaped_char' },
1208
+ { defaultToken: 'string.interpolated.elixir' } ],
1209
+ comment: 'sigil (allow for interpolation)' },
1210
+ { token: 'punctuation.definition.string.begin.elixir',
1211
+ regex: '~[a-z][^\\w]',
1212
+ push:
1213
+ [ { token: 'punctuation.definition.string.end.elixir',
1214
+ regex: '[^\\w][a-z]*',
1215
+ next: 'pop' },
1216
+ { include: '#interpolated_elixir' },
1217
+ { include: '#escaped_char' },
1218
+ { include: '#escaped_char' },
1219
+ { defaultToken: 'string.interpolated.elixir' } ],
1220
+ comment: 'sigil (allow for interpolation)' },
1221
+ { token: 'punctuation.definition.string.begin.elixir',
1222
+ regex: '~[A-Z](?:""")',
1223
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1224
+ originalRegex: '~[A-Z](?>""")',
1225
+ push:
1226
+ [ { token: 'punctuation.definition.string.end.elixir',
1227
+ regex: '^\\s*"""',
1228
+ next: 'pop' },
1229
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1230
+ comment: 'Double-quoted heredocs sigils' },
1231
+ { token: 'punctuation.definition.string.begin.elixir',
1232
+ regex: '~[A-Z]\\{',
1233
+ push:
1234
+ [ { token: 'punctuation.definition.string.end.elixir',
1235
+ regex: '\\}[a-z]*',
1236
+ next: 'pop' },
1237
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1238
+ comment: 'sigil (without interpolation)' },
1239
+ { token: 'punctuation.definition.string.begin.elixir',
1240
+ regex: '~[A-Z]\\[',
1241
+ push:
1242
+ [ { token: 'punctuation.definition.string.end.elixir',
1243
+ regex: '\\][a-z]*',
1244
+ next: 'pop' },
1245
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1246
+ comment: 'sigil (without interpolation)' },
1247
+ { token: 'punctuation.definition.string.begin.elixir',
1248
+ regex: '~[A-Z]\\<',
1249
+ push:
1250
+ [ { token: 'punctuation.definition.string.end.elixir',
1251
+ regex: '\\>[a-z]*',
1252
+ next: 'pop' },
1253
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1254
+ comment: 'sigil (without interpolation)' },
1255
+ { token: 'punctuation.definition.string.begin.elixir',
1256
+ regex: '~[A-Z]\\(',
1257
+ push:
1258
+ [ { token: 'punctuation.definition.string.end.elixir',
1259
+ regex: '\\)[a-z]*',
1260
+ next: 'pop' },
1261
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1262
+ comment: 'sigil (without interpolation)' },
1263
+ { token: 'punctuation.definition.string.begin.elixir',
1264
+ regex: '~[A-Z][^\\w]',
1265
+ push:
1266
+ [ { token: 'punctuation.definition.string.end.elixir',
1267
+ regex: '[^\\w][a-z]*',
1268
+ next: 'pop' },
1269
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
1270
+ comment: 'sigil (without interpolation)' },
1271
+ { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'],
1272
+ regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)',
1273
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1274
+ originalRegex: '(?<!:)(:)(?>[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)',
1275
+ comment: 'symbols' },
1276
+ { token: 'punctuation.definition.constant.elixir',
1277
+ regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)',
1278
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1279
+ originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)',
1280
+ comment: 'symbols' },
1281
+ { token:
1282
+ [ 'punctuation.definition.comment.elixir',
1283
+ 'comment.line.number-sign.elixir' ],
1284
+ regex: '(#)(.*)' },
1285
+ { token: 'constant.numeric.elixir',
1286
+ regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])',
1287
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
1288
+ originalRegex: '(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|[^xMC])|[^\\s\\\\])',
1289
+ comment: '\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t' },
1290
+ { token: 'keyword.operator.assignment.augmented.elixir',
1291
+ regex: '\\+=|\\-=|\\|\\|=|~=|&&=' },
1292
+ { token: 'keyword.operator.comparison.elixir',
1293
+ regex: '===?|!==?|<=?|>=?' },
1294
+ { token: 'keyword.operator.bitwise.elixir',
1295
+ regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' },
1296
+ { token: 'keyword.operator.logical.elixir',
1297
+ regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b',
1298
+ originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' },
1299
+ { token: 'keyword.operator.arithmetic.elixir',
1300
+ regex: '\\*|\\+|\\-|/' },
1301
+ { token: 'keyword.operator.other.elixir',
1302
+ regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' },
1303
+ { token: 'keyword.operator.assignment.elixir', regex: '=' },
1304
+ { token: 'punctuation.separator.other.elixir', regex: ':' },
1305
+ { token: 'punctuation.separator.statement.elixir',
1306
+ regex: '\\;' },
1307
+ { token: 'punctuation.separator.object.elixir', regex: ',' },
1308
+ { token: 'punctuation.separator.method.elixir', regex: '\\.' },
1309
+ { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' },
1310
+ { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' },
1311
+ { token: 'punctuation.section.function.elixir',
1312
+ regex: '\\(|\\)' } ],
1313
+ '#escaped_char':
1314
+ [ { token: 'constant.character.escape.elixir',
1315
+ regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ],
1316
+ '#interpolated_elixir':
1317
+ [ { token:
1318
+ [ 'source.elixir.embedded.source',
1319
+ 'source.elixir.embedded.source.empty' ],
1320
+ regex: '(#\\{)(\\})' },
1321
+ { todo:
1322
+ { token: 'punctuation.section.embedded.elixir',
1323
+ regex: '#\\{',
1324
+ push:
1325
+ [ { token: 'punctuation.section.embedded.elixir',
1326
+ regex: '\\}',
1327
+ next: 'pop' },
1328
+ { include: '#nest_curly_and_self' },
1329
+ { include: '$self' },
1330
+ { defaultToken: 'source.elixir.embedded.source' } ] } } ],
1331
+ '#nest_curly_and_self':
1332
+ [ { token: 'punctuation.section.scope.elixir',
1333
+ regex: '\\{',
1334
+ push:
1335
+ [ { token: 'punctuation.section.scope.elixir',
1336
+ regex: '\\}',
1337
+ next: 'pop' },
1338
+ { include: '#nest_curly_and_self' } ] },
1339
+ { include: '$self' } ],
1340
+ '#regex_sub':
1341
+ [ { include: '#interpolated_elixir' },
1342
+ { include: '#escaped_char' },
1343
+ { token:
1344
+ [ 'punctuation.definition.arbitrary-repitition.elixir',
1345
+ 'string.regexp.arbitrary-repitition.elixir',
1346
+ 'string.regexp.arbitrary-repitition.elixir',
1347
+ 'punctuation.definition.arbitrary-repitition.elixir' ],
1348
+ regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' },
1349
+ { token: 'punctuation.definition.character-class.elixir',
1350
+ regex: '\\[(?:\\^?\\])?',
1351
+ push:
1352
+ [ { token: 'punctuation.definition.character-class.elixir',
1353
+ regex: '\\]',
1354
+ next: 'pop' },
1355
+ { include: '#escaped_char' },
1356
+ { defaultToken: 'string.regexp.character-class.elixir' } ] },
1357
+ { token: 'punctuation.definition.group.elixir',
1358
+ regex: '\\(',
1359
+ push:
1360
+ [ { token: 'punctuation.definition.group.elixir',
1361
+ regex: '\\)',
1362
+ next: 'pop' },
1363
+ { include: '#regex_sub' },
1364
+ { defaultToken: 'string.regexp.group.elixir' } ] },
1365
+ { token:
1366
+ [ 'punctuation.definition.comment.elixir',
1367
+ 'comment.line.number-sign.elixir' ],
1368
+ regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)',
1369
+ originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$',
1370
+ comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] };
1371
+
1372
+ this.normalizeRules();
1373
+ };
1374
+
1375
+ ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.',
1376
+ fileTypes: [ 'ex', 'exs' ],
1377
+ firstLineMatch: '^#!/.*\\belixir',
1378
+ foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$',
1379
+ foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)',
1380
+ keyEquivalent: '^~E',
1381
+ name: 'Elixir',
1382
+ scopeName: 'source.elixir' };
1383
+
1384
+
1385
+ oop.inherits(ElixirHighlightRules, TextHighlightRules);
1386
+
1387
+ exports.ElixirHighlightRules = ElixirHighlightRules;
1388
+ });
1389
+
1390
+ ace.define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"], function(require, exports, module) {
1391
+ "use strict";
1392
+
1393
+ var oop = require("../lib/oop");
1394
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
1395
+ var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
1396
+
1397
+ var HtmlElixirHighlightRules = function() {
1398
+ HtmlHighlightRules.call(this);
1399
+
1400
+ var startRules = [
1401
+ {
1402
+ regex: "<%%|%%>",
1403
+ token: "constant.language.escape"
1404
+ }, {
1405
+ token : "comment.start.eex",
1406
+ regex : "<%#",
1407
+ push : [{
1408
+ token : "comment.end.eex",
1409
+ regex: "%>",
1410
+ next: "pop",
1411
+ defaultToken:"comment"
1412
+ }]
1413
+ }, {
1414
+ token : "support.elixir_tag",
1415
+ regex : "<%+(?!>)[-=]?",
1416
+ push : "elixir-start"
1417
+ }
1418
+ ];
1419
+
1420
+ var endRules = [
1421
+ {
1422
+ token : "support.elixir_tag",
1423
+ regex : "%>",
1424
+ next : "pop"
1425
+ }, {
1426
+ token: "comment",
1427
+ regex: "#(?:[^%]|%[^>])*"
1428
+ }
1429
+ ];
1430
+
1431
+ for (var key in this.$rules)
1432
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
1433
+
1434
+ this.embedRules(ElixirHighlightRules, "elixir-", endRules, ["start"]);
1435
+
1436
+ this.normalizeRules();
1437
+ };
1438
+
1439
+
1440
+ oop.inherits(HtmlElixirHighlightRules, HtmlHighlightRules);
1441
+
1442
+ exports.HtmlElixirHighlightRules = HtmlElixirHighlightRules;
1443
+ });
1444
+
1445
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
1446
+ "use strict";
1447
+
1448
+ var Range = require("../range").Range;
1449
+
1450
+ var MatchingBraceOutdent = function() {};
1451
+
1452
+ (function() {
1453
+
1454
+ this.checkOutdent = function(line, input) {
1455
+ if (! /^\s+$/.test(line))
1456
+ return false;
1457
+
1458
+ return /^\s*\}/.test(input);
1459
+ };
1460
+
1461
+ this.autoOutdent = function(doc, row) {
1462
+ var line = doc.getLine(row);
1463
+ var match = line.match(/^(\s*\})/);
1464
+
1465
+ if (!match) return 0;
1466
+
1467
+ var column = match[1].length;
1468
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
1469
+
1470
+ if (!openBracePos || openBracePos.row == row) return 0;
1471
+
1472
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1473
+ doc.replace(new Range(row, 0, row, column-1), indent);
1474
+ };
1475
+
1476
+ this.$getIndent = function(line) {
1477
+ return line.match(/^\s*/)[0];
1478
+ };
1479
+
1480
+ }).call(MatchingBraceOutdent.prototype);
1481
+
1482
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1483
+ });
1484
+
1485
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
1486
+ "use strict";
1487
+
1488
+ var oop = require("../../lib/oop");
1489
+ var Range = require("../../range").Range;
1490
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1491
+
1492
+ var FoldMode = exports.FoldMode = function(commentRegex) {
1493
+ if (commentRegex) {
1494
+ this.foldingStartMarker = new RegExp(
1495
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
1496
+ );
1497
+ this.foldingStopMarker = new RegExp(
1498
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
1499
+ );
1500
+ }
1501
+ };
1502
+ oop.inherits(FoldMode, BaseFoldMode);
1503
+
1504
+ (function() {
1505
+
1506
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1507
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1508
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
1509
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1510
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1511
+ this._getFoldWidgetBase = this.getFoldWidget;
1512
+ this.getFoldWidget = function(session, foldStyle, row) {
1513
+ var line = session.getLine(row);
1514
+
1515
+ if (this.singleLineBlockCommentRe.test(line)) {
1516
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1517
+ return "";
1518
+ }
1519
+
1520
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
1521
+
1522
+ if (!fw && this.startRegionRe.test(line))
1523
+ return "start"; // lineCommentRegionStart
1524
+
1525
+ return fw;
1526
+ };
1527
+
1528
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
1529
+ var line = session.getLine(row);
1530
+
1531
+ if (this.startRegionRe.test(line))
1532
+ return this.getCommentRegionBlock(session, line, row);
1533
+
1534
+ var match = line.match(this.foldingStartMarker);
1535
+ if (match) {
1536
+ var i = match.index;
1537
+
1538
+ if (match[1])
1539
+ return this.openingBracketBlock(session, match[1], row, i);
1540
+
1541
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1542
+
1543
+ if (range && !range.isMultiLine()) {
1544
+ if (forceMultiline) {
1545
+ range = this.getSectionRange(session, row);
1546
+ } else if (foldStyle != "all")
1547
+ range = null;
1548
+ }
1549
+
1550
+ return range;
1551
+ }
1552
+
1553
+ if (foldStyle === "markbegin")
1554
+ return;
1555
+
1556
+ var match = line.match(this.foldingStopMarker);
1557
+ if (match) {
1558
+ var i = match.index + match[0].length;
1559
+
1560
+ if (match[1])
1561
+ return this.closingBracketBlock(session, match[1], row, i);
1562
+
1563
+ return session.getCommentFoldRange(row, i, -1);
1564
+ }
1565
+ };
1566
+
1567
+ this.getSectionRange = function(session, row) {
1568
+ var line = session.getLine(row);
1569
+ var startIndent = line.search(/\S/);
1570
+ var startRow = row;
1571
+ var startColumn = line.length;
1572
+ row = row + 1;
1573
+ var endRow = row;
1574
+ var maxRow = session.getLength();
1575
+ while (++row < maxRow) {
1576
+ line = session.getLine(row);
1577
+ var indent = line.search(/\S/);
1578
+ if (indent === -1)
1579
+ continue;
1580
+ if (startIndent > indent)
1581
+ break;
1582
+ var subRange = this.getFoldWidgetRange(session, "all", row);
1583
+
1584
+ if (subRange) {
1585
+ if (subRange.start.row <= startRow) {
1586
+ break;
1587
+ } else if (subRange.isMultiLine()) {
1588
+ row = subRange.end.row;
1589
+ } else if (startIndent == indent) {
1590
+ break;
1591
+ }
1592
+ }
1593
+ endRow = row;
1594
+ }
1595
+
1596
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1597
+ };
1598
+ this.getCommentRegionBlock = function(session, line, row) {
1599
+ var startColumn = line.search(/\s*$/);
1600
+ var maxRow = session.getLength();
1601
+ var startRow = row;
1602
+
1603
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1604
+ var depth = 1;
1605
+ while (++row < maxRow) {
1606
+ line = session.getLine(row);
1607
+ var m = re.exec(line);
1608
+ if (!m) continue;
1609
+ if (m[1]) depth--;
1610
+ else depth++;
1611
+
1612
+ if (!depth) break;
1613
+ }
1614
+
1615
+ var endRow = row;
1616
+ if (endRow > startRow) {
1617
+ return new Range(startRow, startColumn, endRow, line.length);
1618
+ }
1619
+ };
1620
+
1621
+ }).call(FoldMode.prototype);
1622
+
1623
+ });
1624
+
1625
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
1626
+ "use strict";
1627
+
1628
+ var oop = require("../lib/oop");
1629
+ var TextMode = require("./text").Mode;
1630
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1631
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1632
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1633
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1634
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1635
+
1636
+ var Mode = function() {
1637
+ this.HighlightRules = JavaScriptHighlightRules;
1638
+
1639
+ this.$outdent = new MatchingBraceOutdent();
1640
+ this.$behaviour = new CstyleBehaviour();
1641
+ this.foldingRules = new CStyleFoldMode();
1642
+ };
1643
+ oop.inherits(Mode, TextMode);
1644
+
1645
+ (function() {
1646
+
1647
+ this.lineCommentStart = "//";
1648
+ this.blockComment = {start: "/*", end: "*/"};
1649
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
1650
+
1651
+ this.getNextLineIndent = function(state, line, tab) {
1652
+ var indent = this.$getIndent(line);
1653
+
1654
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1655
+ var tokens = tokenizedLine.tokens;
1656
+ var endState = tokenizedLine.state;
1657
+
1658
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
1659
+ return indent;
1660
+ }
1661
+
1662
+ if (state == "start" || state == "no_regex") {
1663
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1664
+ if (match) {
1665
+ indent += tab;
1666
+ }
1667
+ } else if (state == "doc-start") {
1668
+ if (endState == "start" || endState == "no_regex") {
1669
+ return "";
1670
+ }
1671
+ var match = line.match(/^\s*(\/?)\*/);
1672
+ if (match) {
1673
+ if (match[1]) {
1674
+ indent += " ";
1675
+ }
1676
+ indent += "* ";
1677
+ }
1678
+ }
1679
+
1680
+ return indent;
1681
+ };
1682
+
1683
+ this.checkOutdent = function(state, line, input) {
1684
+ return this.$outdent.checkOutdent(line, input);
1685
+ };
1686
+
1687
+ this.autoOutdent = function(state, doc, row) {
1688
+ this.$outdent.autoOutdent(doc, row);
1689
+ };
1690
+
1691
+ this.createWorker = function(session) {
1692
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1693
+ worker.attachToDocument(session.getDocument());
1694
+
1695
+ worker.on("annotate", function(results) {
1696
+ session.setAnnotations(results.data);
1697
+ });
1698
+
1699
+ worker.on("terminate", function() {
1700
+ session.clearAnnotations();
1701
+ });
1702
+
1703
+ return worker;
1704
+ };
1705
+
1706
+ this.$id = "ace/mode/javascript";
1707
+ this.snippetFileId = "ace/snippets/javascript";
1708
+ }).call(Mode.prototype);
1709
+
1710
+ exports.Mode = Mode;
1711
+ });
1712
+
1713
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
1714
+ "use strict";
1715
+
1716
+ var propertyMap = {
1717
+ "background": {"#$0": 1},
1718
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
1719
+ "background-image": {"url('/$0')": 1},
1720
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
1721
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
1722
+ "background-attachment": {"scroll": 1, "fixed": 1},
1723
+ "background-size": {"cover": 1, "contain": 1},
1724
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
1725
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
1726
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
1727
+ "border-color": {"#$0": 1},
1728
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1729
+ "border-collapse": {"collapse": 1, "separate": 1},
1730
+ "bottom": {"px": 1, "em": 1, "%": 1},
1731
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1732
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1733
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
1734
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1735
+ "empty-cells": {"show": 1, "hide": 1},
1736
+ "float": {"left": 1, "right": 1, "none": 1},
1737
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
1738
+ "font-size": {"px": 1, "em": 1, "%": 1},
1739
+ "font-weight": {"bold": 1, "normal": 1},
1740
+ "font-style": {"italic": 1, "normal": 1},
1741
+ "font-variant": {"normal": 1, "small-caps": 1},
1742
+ "height": {"px": 1, "em": 1, "%": 1},
1743
+ "left": {"px": 1, "em": 1, "%": 1},
1744
+ "letter-spacing": {"normal": 1},
1745
+ "line-height": {"normal": 1},
1746
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
1747
+ "margin": {"px": 1, "em": 1, "%": 1},
1748
+ "margin-right": {"px": 1, "em": 1, "%": 1},
1749
+ "margin-left": {"px": 1, "em": 1, "%": 1},
1750
+ "margin-top": {"px": 1, "em": 1, "%": 1},
1751
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
1752
+ "max-height": {"px": 1, "em": 1, "%": 1},
1753
+ "max-width": {"px": 1, "em": 1, "%": 1},
1754
+ "min-height": {"px": 1, "em": 1, "%": 1},
1755
+ "min-width": {"px": 1, "em": 1, "%": 1},
1756
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1757
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1758
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1759
+ "padding": {"px": 1, "em": 1, "%": 1},
1760
+ "padding-top": {"px": 1, "em": 1, "%": 1},
1761
+ "padding-right": {"px": 1, "em": 1, "%": 1},
1762
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
1763
+ "padding-left": {"px": 1, "em": 1, "%": 1},
1764
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1765
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1766
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1767
+ "right": {"px": 1, "em": 1, "%": 1},
1768
+ "table-layout": {"fixed": 1, "auto": 1},
1769
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1770
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1771
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1772
+ "top": {"px": 1, "em": 1, "%": 1},
1773
+ "vertical-align": {"top": 1, "bottom": 1},
1774
+ "visibility": {"hidden": 1, "visible": 1},
1775
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1776
+ "width": {"px": 1, "em": 1, "%": 1},
1777
+ "word-spacing": {"normal": 1},
1778
+ "filter": {"alpha(opacity=$0100)": 1},
1779
+
1780
+ "text-shadow": {"$02px 2px 2px #777": 1},
1781
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1782
+ "-moz-border-radius": 1,
1783
+ "-moz-border-radius-topright": 1,
1784
+ "-moz-border-radius-bottomright": 1,
1785
+ "-moz-border-radius-topleft": 1,
1786
+ "-moz-border-radius-bottomleft": 1,
1787
+ "-webkit-border-radius": 1,
1788
+ "-webkit-border-top-right-radius": 1,
1789
+ "-webkit-border-top-left-radius": 1,
1790
+ "-webkit-border-bottom-right-radius": 1,
1791
+ "-webkit-border-bottom-left-radius": 1,
1792
+ "-moz-box-shadow": 1,
1793
+ "-webkit-box-shadow": 1,
1794
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1795
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1796
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1797
+ };
1798
+
1799
+ var CssCompletions = function() {
1800
+
1801
+ };
1802
+
1803
+ (function() {
1804
+
1805
+ this.completionsDefined = false;
1806
+
1807
+ this.defineCompletions = function() {
1808
+ if (document) {
1809
+ var style = document.createElement('c').style;
1810
+
1811
+ for (var i in style) {
1812
+ if (typeof style[i] !== 'string')
1813
+ continue;
1814
+
1815
+ var name = i.replace(/[A-Z]/g, function(x) {
1816
+ return '-' + x.toLowerCase();
1817
+ });
1818
+
1819
+ if (!propertyMap.hasOwnProperty(name))
1820
+ propertyMap[name] = 1;
1821
+ }
1822
+ }
1823
+
1824
+ this.completionsDefined = true;
1825
+ };
1826
+
1827
+ this.getCompletions = function(state, session, pos, prefix) {
1828
+ if (!this.completionsDefined) {
1829
+ this.defineCompletions();
1830
+ }
1831
+
1832
+ if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") {
1833
+ var line = session.getLine(pos.row).substr(0, pos.column);
1834
+ if (/:[^;]+$/.test(line)) {
1835
+ /([\w\-]+):[^:]*$/.test(line);
1836
+
1837
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1838
+ } else {
1839
+ return this.getPropertyCompletions(state, session, pos, prefix);
1840
+ }
1841
+ }
1842
+
1843
+ return [];
1844
+ };
1845
+
1846
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
1847
+ var properties = Object.keys(propertyMap);
1848
+ return properties.map(function(property){
1849
+ return {
1850
+ caption: property,
1851
+ snippet: property + ': $0;',
1852
+ meta: "property",
1853
+ score: 1000000
1854
+ };
1855
+ });
1856
+ };
1857
+
1858
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1859
+ var line = session.getLine(pos.row).substr(0, pos.column);
1860
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1861
+
1862
+ if (!property)
1863
+ return [];
1864
+ var values = [];
1865
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1866
+ values = Object.keys(propertyMap[property]);
1867
+ }
1868
+ return values.map(function(value){
1869
+ return {
1870
+ caption: value,
1871
+ snippet: value,
1872
+ meta: "property value",
1873
+ score: 1000000
1874
+ };
1875
+ });
1876
+ };
1877
+
1878
+ }).call(CssCompletions.prototype);
1879
+
1880
+ exports.CssCompletions = CssCompletions;
1881
+ });
1882
+
1883
+ ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
1884
+ "use strict";
1885
+
1886
+ var oop = require("../../lib/oop");
1887
+ var Behaviour = require("../behaviour").Behaviour;
1888
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1889
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1890
+
1891
+ var CssBehaviour = function () {
1892
+
1893
+ this.inherit(CstyleBehaviour);
1894
+
1895
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1896
+ if (text === ':' && editor.selection.isEmpty()) {
1897
+ var cursor = editor.getCursorPosition();
1898
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1899
+ var token = iterator.getCurrentToken();
1900
+ if (token && token.value.match(/\s+/)) {
1901
+ token = iterator.stepBackward();
1902
+ }
1903
+ if (token && token.type === 'support.type') {
1904
+ var line = session.doc.getLine(cursor.row);
1905
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1906
+ if (rightChar === ':') {
1907
+ return {
1908
+ text: '',
1909
+ selection: [1, 1]
1910
+ };
1911
+ }
1912
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1913
+ return {
1914
+ text: ':;',
1915
+ selection: [1, 1]
1916
+ };
1917
+ }
1918
+ }
1919
+ }
1920
+ });
1921
+
1922
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1923
+ var selected = session.doc.getTextRange(range);
1924
+ if (!range.isMultiLine() && selected === ':') {
1925
+ var cursor = editor.getCursorPosition();
1926
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1927
+ var token = iterator.getCurrentToken();
1928
+ if (token && token.value.match(/\s+/)) {
1929
+ token = iterator.stepBackward();
1930
+ }
1931
+ if (token && token.type === 'support.type') {
1932
+ var line = session.doc.getLine(range.start.row);
1933
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1934
+ if (rightChar === ';') {
1935
+ range.end.column ++;
1936
+ return range;
1937
+ }
1938
+ }
1939
+ }
1940
+ });
1941
+
1942
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1943
+ if (text === ';' && editor.selection.isEmpty()) {
1944
+ var cursor = editor.getCursorPosition();
1945
+ var line = session.doc.getLine(cursor.row);
1946
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1947
+ if (rightChar === ';') {
1948
+ return {
1949
+ text: '',
1950
+ selection: [1, 1]
1951
+ };
1952
+ }
1953
+ }
1954
+ });
1955
+
1956
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1957
+ if (text === '!' && editor.selection.isEmpty()) {
1958
+ var cursor = editor.getCursorPosition();
1959
+ var line = session.doc.getLine(cursor.row);
1960
+
1961
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1962
+ return {
1963
+ text: '!important',
1964
+ selection: [10, 10]
1965
+ };
1966
+ }
1967
+ }
1968
+ });
1969
+
1970
+ };
1971
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1972
+
1973
+ exports.CssBehaviour = CssBehaviour;
1974
+ });
1975
+
1976
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
1977
+ "use strict";
1978
+
1979
+ var oop = require("../lib/oop");
1980
+ var TextMode = require("./text").Mode;
1981
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1982
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1983
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1984
+ var CssCompletions = require("./css_completions").CssCompletions;
1985
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1986
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1987
+
1988
+ var Mode = function() {
1989
+ this.HighlightRules = CssHighlightRules;
1990
+ this.$outdent = new MatchingBraceOutdent();
1991
+ this.$behaviour = new CssBehaviour();
1992
+ this.$completer = new CssCompletions();
1993
+ this.foldingRules = new CStyleFoldMode();
1994
+ };
1995
+ oop.inherits(Mode, TextMode);
1996
+
1997
+ (function() {
1998
+
1999
+ this.foldingRules = "cStyle";
2000
+ this.blockComment = {start: "/*", end: "*/"};
2001
+
2002
+ this.getNextLineIndent = function(state, line, tab) {
2003
+ var indent = this.$getIndent(line);
2004
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
2005
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
2006
+ return indent;
2007
+ }
2008
+
2009
+ var match = line.match(/^.*\{\s*$/);
2010
+ if (match) {
2011
+ indent += tab;
2012
+ }
2013
+
2014
+ return indent;
2015
+ };
2016
+
2017
+ this.checkOutdent = function(state, line, input) {
2018
+ return this.$outdent.checkOutdent(line, input);
2019
+ };
2020
+
2021
+ this.autoOutdent = function(state, doc, row) {
2022
+ this.$outdent.autoOutdent(doc, row);
2023
+ };
2024
+
2025
+ this.getCompletions = function(state, session, pos, prefix) {
2026
+ return this.$completer.getCompletions(state, session, pos, prefix);
2027
+ };
2028
+
2029
+ this.createWorker = function(session) {
2030
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
2031
+ worker.attachToDocument(session.getDocument());
2032
+
2033
+ worker.on("annotate", function(e) {
2034
+ session.setAnnotations(e.data);
2035
+ });
2036
+
2037
+ worker.on("terminate", function() {
2038
+ session.clearAnnotations();
2039
+ });
2040
+
2041
+ return worker;
2042
+ };
2043
+
2044
+ this.$id = "ace/mode/css";
2045
+ this.snippetFileId = "ace/snippets/css";
2046
+ }).call(Mode.prototype);
2047
+
2048
+ exports.Mode = Mode;
2049
+
2050
+ });
2051
+
2052
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
2053
+ "use strict";
2054
+
2055
+ var oop = require("../../lib/oop");
2056
+ var Behaviour = require("../behaviour").Behaviour;
2057
+ var TokenIterator = require("../../token_iterator").TokenIterator;
2058
+ var lang = require("../../lib/lang");
2059
+
2060
+ function is(token, type) {
2061
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
2062
+ }
2063
+
2064
+ var XmlBehaviour = function () {
2065
+
2066
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
2067
+ if (text == '"' || text == "'") {
2068
+ var quote = text;
2069
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
2070
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
2071
+ return {
2072
+ text: quote + selected + quote,
2073
+ selection: false
2074
+ };
2075
+ }
2076
+
2077
+ var cursor = editor.getCursorPosition();
2078
+ var line = session.doc.getLine(cursor.row);
2079
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
2080
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
2081
+ var token = iterator.getCurrentToken();
2082
+
2083
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
2084
+ return {
2085
+ text: "",
2086
+ selection: [1, 1]
2087
+ };
2088
+ }
2089
+
2090
+ if (!token)
2091
+ token = iterator.stepBackward();
2092
+
2093
+ if (!token)
2094
+ return;
2095
+
2096
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
2097
+ token = iterator.stepBackward();
2098
+ }
2099
+ var rightSpace = !rightChar || rightChar.match(/\s/);
2100
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
2101
+ return {
2102
+ text: quote + quote,
2103
+ selection: [1, 1]
2104
+ };
2105
+ }
2106
+ }
2107
+ });
2108
+
2109
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
2110
+ var selected = session.doc.getTextRange(range);
2111
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
2112
+ var line = session.doc.getLine(range.start.row);
2113
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
2114
+ if (rightChar == selected) {
2115
+ range.end.column++;
2116
+ return range;
2117
+ }
2118
+ }
2119
+ });
2120
+
2121
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
2122
+ if (text == '>') {
2123
+ var position = editor.getSelectionRange().start;
2124
+ var iterator = new TokenIterator(session, position.row, position.column);
2125
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
2126
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
2127
+ return;
2128
+ if (is(token, "reference.attribute-value"))
2129
+ return;
2130
+ if (is(token, "attribute-value")) {
2131
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
2132
+ if (position.column < tokenEndColumn)
2133
+ return;
2134
+ if (position.column == tokenEndColumn) {
2135
+ var nextToken = iterator.stepForward();
2136
+ if (nextToken && is(nextToken, "attribute-value"))
2137
+ return;
2138
+ iterator.stepBackward();
2139
+ }
2140
+ }
2141
+
2142
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
2143
+ return;
2144
+ while (!is(token, "tag-name")) {
2145
+ token = iterator.stepBackward();
2146
+ if (token.value == "<") {
2147
+ token = iterator.stepForward();
2148
+ break;
2149
+ }
2150
+ }
2151
+
2152
+ var tokenRow = iterator.getCurrentTokenRow();
2153
+ var tokenColumn = iterator.getCurrentTokenColumn();
2154
+ if (is(iterator.stepBackward(), "end-tag-open"))
2155
+ return;
2156
+
2157
+ var element = token.value;
2158
+ if (tokenRow == position.row)
2159
+ element = element.substring(0, position.column - tokenColumn);
2160
+
2161
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
2162
+ return;
2163
+
2164
+ return {
2165
+ text: ">" + "</" + element + ">",
2166
+ selection: [1, 1]
2167
+ };
2168
+ }
2169
+ });
2170
+
2171
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
2172
+ if (text == "\n") {
2173
+ var cursor = editor.getCursorPosition();
2174
+ var line = session.getLine(cursor.row);
2175
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
2176
+ var token = iterator.getCurrentToken();
2177
+
2178
+ if (token && token.type.indexOf("tag-close") !== -1) {
2179
+ if (token.value == "/>")
2180
+ return;
2181
+ while (token && token.type.indexOf("tag-name") === -1) {
2182
+ token = iterator.stepBackward();
2183
+ }
2184
+
2185
+ if (!token) {
2186
+ return;
2187
+ }
2188
+
2189
+ var tag = token.value;
2190
+ var row = iterator.getCurrentTokenRow();
2191
+ token = iterator.stepBackward();
2192
+ if (!token || token.type.indexOf("end-tag") !== -1) {
2193
+ return;
2194
+ }
2195
+
2196
+ if (this.voidElements && !this.voidElements[tag]) {
2197
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
2198
+ var line = session.getLine(row);
2199
+ var nextIndent = this.$getIndent(line);
2200
+ var indent = nextIndent + session.getTabString();
2201
+
2202
+ if (nextToken && nextToken.value === "</") {
2203
+ return {
2204
+ text: "\n" + indent + "\n" + nextIndent,
2205
+ selection: [1, indent.length, 1, indent.length]
2206
+ };
2207
+ } else {
2208
+ return {
2209
+ text: "\n" + indent
2210
+ };
2211
+ }
2212
+ }
2213
+ }
2214
+ }
2215
+ });
2216
+
2217
+ };
2218
+
2219
+ oop.inherits(XmlBehaviour, Behaviour);
2220
+
2221
+ exports.XmlBehaviour = XmlBehaviour;
2222
+ });
2223
+
2224
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
2225
+ "use strict";
2226
+
2227
+ var oop = require("../../lib/oop");
2228
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2229
+
2230
+ var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
2231
+ this.defaultMode = defaultMode;
2232
+ this.subModes = subModes;
2233
+ };
2234
+ oop.inherits(FoldMode, BaseFoldMode);
2235
+
2236
+ (function() {
2237
+
2238
+
2239
+ this.$getMode = function(state) {
2240
+ if (typeof state != "string")
2241
+ state = state[0];
2242
+ for (var key in this.subModes) {
2243
+ if (state.indexOf(key) === 0)
2244
+ return this.subModes[key];
2245
+ }
2246
+ return null;
2247
+ };
2248
+
2249
+ this.$tryMode = function(state, session, foldStyle, row) {
2250
+ var mode = this.$getMode(state);
2251
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
2252
+ };
2253
+
2254
+ this.getFoldWidget = function(session, foldStyle, row) {
2255
+ return (
2256
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
2257
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
2258
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
2259
+ );
2260
+ };
2261
+
2262
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2263
+ var mode = this.$getMode(session.getState(row-1));
2264
+
2265
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2266
+ mode = this.$getMode(session.getState(row));
2267
+
2268
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
2269
+ mode = this.defaultMode;
2270
+
2271
+ return mode.getFoldWidgetRange(session, foldStyle, row);
2272
+ };
2273
+
2274
+ }).call(FoldMode.prototype);
2275
+
2276
+ });
2277
+
2278
+ ace.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) {
2279
+ "use strict";
2280
+
2281
+ var oop = require("../../lib/oop");
2282
+ var lang = require("../../lib/lang");
2283
+ var Range = require("../../range").Range;
2284
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2285
+ var TokenIterator = require("../../token_iterator").TokenIterator;
2286
+
2287
+ var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
2288
+ BaseFoldMode.call(this);
2289
+ this.voidElements = voidElements || {};
2290
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
2291
+ if (optionalEndTags)
2292
+ oop.mixin(this.optionalEndTags, optionalEndTags);
2293
+
2294
+ };
2295
+ oop.inherits(FoldMode, BaseFoldMode);
2296
+
2297
+ var Tag = function() {
2298
+ this.tagName = "";
2299
+ this.closing = false;
2300
+ this.selfClosing = false;
2301
+ this.start = {row: 0, column: 0};
2302
+ this.end = {row: 0, column: 0};
2303
+ };
2304
+
2305
+ function is(token, type) {
2306
+ return token.type.lastIndexOf(type + ".xml") > -1;
2307
+ }
2308
+
2309
+ (function() {
2310
+
2311
+ this.getFoldWidget = function(session, foldStyle, row) {
2312
+ var tag = this._getFirstTagInLine(session, row);
2313
+
2314
+ if (!tag)
2315
+ return this.getCommentFoldWidget(session, row);
2316
+
2317
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
2318
+ return foldStyle == "markbeginend" ? "end" : "";
2319
+
2320
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
2321
+ return "";
2322
+
2323
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
2324
+ return "";
2325
+
2326
+ return "start";
2327
+ };
2328
+
2329
+ this.getCommentFoldWidget = function(session, row) {
2330
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
2331
+ return "start";
2332
+ return "";
2333
+ };
2334
+ this._getFirstTagInLine = function(session, row) {
2335
+ var tokens = session.getTokens(row);
2336
+ var tag = new Tag();
2337
+
2338
+ for (var i = 0; i < tokens.length; i++) {
2339
+ var token = tokens[i];
2340
+ if (is(token, "tag-open")) {
2341
+ tag.end.column = tag.start.column + token.value.length;
2342
+ tag.closing = is(token, "end-tag-open");
2343
+ token = tokens[++i];
2344
+ if (!token)
2345
+ return null;
2346
+ tag.tagName = token.value;
2347
+ tag.end.column += token.value.length;
2348
+ for (i++; i < tokens.length; i++) {
2349
+ token = tokens[i];
2350
+ tag.end.column += token.value.length;
2351
+ if (is(token, "tag-close")) {
2352
+ tag.selfClosing = token.value == '/>';
2353
+ break;
2354
+ }
2355
+ }
2356
+ return tag;
2357
+ } else if (is(token, "tag-close")) {
2358
+ tag.selfClosing = token.value == '/>';
2359
+ return tag;
2360
+ }
2361
+ tag.start.column += token.value.length;
2362
+ }
2363
+
2364
+ return null;
2365
+ };
2366
+
2367
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
2368
+ var tokens = session.getTokens(row);
2369
+ var column = 0;
2370
+ for (var i = 0; i < tokens.length; i++) {
2371
+ var token = tokens[i];
2372
+ column += token.value.length;
2373
+ if (column < startColumn)
2374
+ continue;
2375
+ if (is(token, "end-tag-open")) {
2376
+ token = tokens[i + 1];
2377
+ if (token && token.value == tagName)
2378
+ return true;
2379
+ }
2380
+ }
2381
+ return false;
2382
+ };
2383
+ this._readTagForward = function(iterator) {
2384
+ var token = iterator.getCurrentToken();
2385
+ if (!token)
2386
+ return null;
2387
+
2388
+ var tag = new Tag();
2389
+ do {
2390
+ if (is(token, "tag-open")) {
2391
+ tag.closing = is(token, "end-tag-open");
2392
+ tag.start.row = iterator.getCurrentTokenRow();
2393
+ tag.start.column = iterator.getCurrentTokenColumn();
2394
+ } else if (is(token, "tag-name")) {
2395
+ tag.tagName = token.value;
2396
+ } else if (is(token, "tag-close")) {
2397
+ tag.selfClosing = token.value == "/>";
2398
+ tag.end.row = iterator.getCurrentTokenRow();
2399
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
2400
+ iterator.stepForward();
2401
+ return tag;
2402
+ }
2403
+ } while(token = iterator.stepForward());
2404
+
2405
+ return null;
2406
+ };
2407
+
2408
+ this._readTagBackward = function(iterator) {
2409
+ var token = iterator.getCurrentToken();
2410
+ if (!token)
2411
+ return null;
2412
+
2413
+ var tag = new Tag();
2414
+ do {
2415
+ if (is(token, "tag-open")) {
2416
+ tag.closing = is(token, "end-tag-open");
2417
+ tag.start.row = iterator.getCurrentTokenRow();
2418
+ tag.start.column = iterator.getCurrentTokenColumn();
2419
+ iterator.stepBackward();
2420
+ return tag;
2421
+ } else if (is(token, "tag-name")) {
2422
+ tag.tagName = token.value;
2423
+ } else if (is(token, "tag-close")) {
2424
+ tag.selfClosing = token.value == "/>";
2425
+ tag.end.row = iterator.getCurrentTokenRow();
2426
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
2427
+ }
2428
+ } while(token = iterator.stepBackward());
2429
+
2430
+ return null;
2431
+ };
2432
+
2433
+ this._pop = function(stack, tag) {
2434
+ while (stack.length) {
2435
+
2436
+ var top = stack[stack.length-1];
2437
+ if (!tag || top.tagName == tag.tagName) {
2438
+ return stack.pop();
2439
+ }
2440
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
2441
+ stack.pop();
2442
+ continue;
2443
+ } else {
2444
+ return null;
2445
+ }
2446
+ }
2447
+ };
2448
+
2449
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2450
+ var firstTag = this._getFirstTagInLine(session, row);
2451
+
2452
+ if (!firstTag) {
2453
+ return this.getCommentFoldWidget(session, row)
2454
+ && session.getCommentFoldRange(row, session.getLine(row).length);
2455
+ }
2456
+
2457
+ var isBackward = firstTag.closing || firstTag.selfClosing;
2458
+ var stack = [];
2459
+ var tag;
2460
+
2461
+ if (!isBackward) {
2462
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
2463
+ var start = {
2464
+ row: row,
2465
+ column: firstTag.start.column + firstTag.tagName.length + 2
2466
+ };
2467
+ if (firstTag.start.row == firstTag.end.row)
2468
+ start.column = firstTag.end.column;
2469
+ while (tag = this._readTagForward(iterator)) {
2470
+ if (tag.selfClosing) {
2471
+ if (!stack.length) {
2472
+ tag.start.column += tag.tagName.length + 2;
2473
+ tag.end.column -= 2;
2474
+ return Range.fromPoints(tag.start, tag.end);
2475
+ } else
2476
+ continue;
2477
+ }
2478
+
2479
+ if (tag.closing) {
2480
+ this._pop(stack, tag);
2481
+ if (stack.length == 0)
2482
+ return Range.fromPoints(start, tag.start);
2483
+ }
2484
+ else {
2485
+ stack.push(tag);
2486
+ }
2487
+ }
2488
+ }
2489
+ else {
2490
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
2491
+ var end = {
2492
+ row: row,
2493
+ column: firstTag.start.column
2494
+ };
2495
+
2496
+ while (tag = this._readTagBackward(iterator)) {
2497
+ if (tag.selfClosing) {
2498
+ if (!stack.length) {
2499
+ tag.start.column += tag.tagName.length + 2;
2500
+ tag.end.column -= 2;
2501
+ return Range.fromPoints(tag.start, tag.end);
2502
+ } else
2503
+ continue;
2504
+ }
2505
+
2506
+ if (!tag.closing) {
2507
+ this._pop(stack, tag);
2508
+ if (stack.length == 0) {
2509
+ tag.start.column += tag.tagName.length + 2;
2510
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
2511
+ tag.start.column = tag.end.column;
2512
+ return Range.fromPoints(tag.start, end);
2513
+ }
2514
+ }
2515
+ else {
2516
+ stack.push(tag);
2517
+ }
2518
+ }
2519
+ }
2520
+
2521
+ };
2522
+
2523
+ }).call(FoldMode.prototype);
2524
+
2525
+ });
2526
+
2527
+ ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) {
2528
+ "use strict";
2529
+
2530
+ var oop = require("../../lib/oop");
2531
+ var MixedFoldMode = require("./mixed").FoldMode;
2532
+ var XmlFoldMode = require("./xml").FoldMode;
2533
+ var CStyleFoldMode = require("./cstyle").FoldMode;
2534
+
2535
+ var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
2536
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2537
+ "js-": new CStyleFoldMode(),
2538
+ "css-": new CStyleFoldMode()
2539
+ });
2540
+ };
2541
+
2542
+ oop.inherits(FoldMode, MixedFoldMode);
2543
+
2544
+ });
2545
+
2546
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
2547
+ "use strict";
2548
+
2549
+ var TokenIterator = require("../token_iterator").TokenIterator;
2550
+
2551
+ var commonAttributes = [
2552
+ "accesskey",
2553
+ "class",
2554
+ "contenteditable",
2555
+ "contextmenu",
2556
+ "dir",
2557
+ "draggable",
2558
+ "dropzone",
2559
+ "hidden",
2560
+ "id",
2561
+ "inert",
2562
+ "itemid",
2563
+ "itemprop",
2564
+ "itemref",
2565
+ "itemscope",
2566
+ "itemtype",
2567
+ "lang",
2568
+ "spellcheck",
2569
+ "style",
2570
+ "tabindex",
2571
+ "title",
2572
+ "translate"
2573
+ ];
2574
+
2575
+ var eventAttributes = [
2576
+ "onabort",
2577
+ "onblur",
2578
+ "oncancel",
2579
+ "oncanplay",
2580
+ "oncanplaythrough",
2581
+ "onchange",
2582
+ "onclick",
2583
+ "onclose",
2584
+ "oncontextmenu",
2585
+ "oncuechange",
2586
+ "ondblclick",
2587
+ "ondrag",
2588
+ "ondragend",
2589
+ "ondragenter",
2590
+ "ondragleave",
2591
+ "ondragover",
2592
+ "ondragstart",
2593
+ "ondrop",
2594
+ "ondurationchange",
2595
+ "onemptied",
2596
+ "onended",
2597
+ "onerror",
2598
+ "onfocus",
2599
+ "oninput",
2600
+ "oninvalid",
2601
+ "onkeydown",
2602
+ "onkeypress",
2603
+ "onkeyup",
2604
+ "onload",
2605
+ "onloadeddata",
2606
+ "onloadedmetadata",
2607
+ "onloadstart",
2608
+ "onmousedown",
2609
+ "onmousemove",
2610
+ "onmouseout",
2611
+ "onmouseover",
2612
+ "onmouseup",
2613
+ "onmousewheel",
2614
+ "onpause",
2615
+ "onplay",
2616
+ "onplaying",
2617
+ "onprogress",
2618
+ "onratechange",
2619
+ "onreset",
2620
+ "onscroll",
2621
+ "onseeked",
2622
+ "onseeking",
2623
+ "onselect",
2624
+ "onshow",
2625
+ "onstalled",
2626
+ "onsubmit",
2627
+ "onsuspend",
2628
+ "ontimeupdate",
2629
+ "onvolumechange",
2630
+ "onwaiting"
2631
+ ];
2632
+
2633
+ var globalAttributes = commonAttributes.concat(eventAttributes);
2634
+
2635
+ var attributeMap = {
2636
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
2637
+ "abbr": {},
2638
+ "address": {},
2639
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2640
+ "article": {"pubdate": 1},
2641
+ "aside": {},
2642
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2643
+ "b": {},
2644
+ "base": {"href": 1, "target": 1},
2645
+ "bdi": {},
2646
+ "bdo": {},
2647
+ "blockquote": {"cite": 1},
2648
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
2649
+ "br": {},
2650
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
2651
+ "canvas": {"width": 1, "height": 1},
2652
+ "caption": {},
2653
+ "cite": {},
2654
+ "code": {},
2655
+ "col": {"span": 1},
2656
+ "colgroup": {"span": 1},
2657
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2658
+ "data": {},
2659
+ "datalist": {},
2660
+ "dd": {},
2661
+ "del": {"cite": 1, "datetime": 1},
2662
+ "details": {"open": 1},
2663
+ "dfn": {},
2664
+ "dialog": {"open": 1},
2665
+ "div": {},
2666
+ "dl": {},
2667
+ "dt": {},
2668
+ "em": {},
2669
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2670
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
2671
+ "figcaption": {},
2672
+ "figure": {},
2673
+ "footer": {},
2674
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
2675
+ "h1": {},
2676
+ "h2": {},
2677
+ "h3": {},
2678
+ "h4": {},
2679
+ "h5": {},
2680
+ "h6": {},
2681
+ "head": {},
2682
+ "header": {},
2683
+ "hr": {},
2684
+ "html": {"manifest": 1},
2685
+ "i": {},
2686
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
2687
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2688
+ "input": {
2689
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
2690
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
2691
+ "ins": {"cite": 1, "datetime": 1},
2692
+ "kbd": {},
2693
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2694
+ "label": {"form": 1, "for": 1},
2695
+ "legend": {},
2696
+ "li": {"value": 1},
2697
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
2698
+ "main": {},
2699
+ "map": {"name": 1},
2700
+ "mark": {},
2701
+ "math": {},
2702
+ "menu": {"type": 1, "label": 1},
2703
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2704
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2705
+ "nav": {},
2706
+ "noscript": {"href": 1},
2707
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2708
+ "ol": {"start": 1, "reversed": 1},
2709
+ "optgroup": {"disabled": 1, "label": 1},
2710
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2711
+ "output": {"for": 1, "form": 1, "name": 1},
2712
+ "p": {},
2713
+ "param": {"name": 1, "value": 1},
2714
+ "pre": {},
2715
+ "progress": {"value": 1, "max": 1},
2716
+ "q": {"cite": 1},
2717
+ "rp": {},
2718
+ "rt": {},
2719
+ "ruby": {},
2720
+ "s": {},
2721
+ "samp": {},
2722
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2723
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2724
+ "small": {},
2725
+ "source": {"src": 1, "type": 1, "media": 1},
2726
+ "span": {},
2727
+ "strong": {},
2728
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2729
+ "sub": {},
2730
+ "sup": {},
2731
+ "svg": {},
2732
+ "table": {"summary": 1},
2733
+ "tbody": {},
2734
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2735
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
2736
+ "tfoot": {},
2737
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2738
+ "thead": {},
2739
+ "time": {"datetime": 1},
2740
+ "title": {},
2741
+ "tr": {},
2742
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2743
+ "section": {},
2744
+ "summary": {},
2745
+ "u": {},
2746
+ "ul": {},
2747
+ "var": {},
2748
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
2749
+ "wbr": {}
2750
+ };
2751
+
2752
+ var elements = Object.keys(attributeMap);
2753
+
2754
+ function is(token, type) {
2755
+ return token.type.lastIndexOf(type + ".xml") > -1;
2756
+ }
2757
+
2758
+ function findTagName(session, pos) {
2759
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2760
+ var token = iterator.getCurrentToken();
2761
+ while (token && !is(token, "tag-name")){
2762
+ token = iterator.stepBackward();
2763
+ }
2764
+ if (token)
2765
+ return token.value;
2766
+ }
2767
+
2768
+ function findAttributeName(session, pos) {
2769
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2770
+ var token = iterator.getCurrentToken();
2771
+ while (token && !is(token, "attribute-name")){
2772
+ token = iterator.stepBackward();
2773
+ }
2774
+ if (token)
2775
+ return token.value;
2776
+ }
2777
+
2778
+ var HtmlCompletions = function() {
2779
+
2780
+ };
2781
+
2782
+ (function() {
2783
+
2784
+ this.getCompletions = function(state, session, pos, prefix) {
2785
+ var token = session.getTokenAt(pos.row, pos.column);
2786
+
2787
+ if (!token)
2788
+ return [];
2789
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2790
+ return this.getTagCompletions(state, session, pos, prefix);
2791
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2792
+ return this.getAttributeCompletions(state, session, pos, prefix);
2793
+ if (is(token, "attribute-value"))
2794
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2795
+ var line = session.getLine(pos.row).substr(0, pos.column);
2796
+ if (/&[a-z]*$/i.test(line))
2797
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2798
+
2799
+ return [];
2800
+ };
2801
+
2802
+ this.getTagCompletions = function(state, session, pos, prefix) {
2803
+ return elements.map(function(element){
2804
+ return {
2805
+ value: element,
2806
+ meta: "tag",
2807
+ score: 1000000
2808
+ };
2809
+ });
2810
+ };
2811
+
2812
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
2813
+ var tagName = findTagName(session, pos);
2814
+ if (!tagName)
2815
+ return [];
2816
+ var attributes = globalAttributes;
2817
+ if (tagName in attributeMap) {
2818
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2819
+ }
2820
+ return attributes.map(function(attribute){
2821
+ return {
2822
+ caption: attribute,
2823
+ snippet: attribute + '="$0"',
2824
+ meta: "attribute",
2825
+ score: 1000000
2826
+ };
2827
+ });
2828
+ };
2829
+
2830
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2831
+ var tagName = findTagName(session, pos);
2832
+ var attributeName = findAttributeName(session, pos);
2833
+
2834
+ if (!tagName)
2835
+ return [];
2836
+ var values = [];
2837
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2838
+ values = Object.keys(attributeMap[tagName][attributeName]);
2839
+ }
2840
+ return values.map(function(value){
2841
+ return {
2842
+ caption: value,
2843
+ snippet: value,
2844
+ meta: "attribute value",
2845
+ score: 1000000
2846
+ };
2847
+ });
2848
+ };
2849
+
2850
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2851
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
2852
+
2853
+ return values.map(function(value){
2854
+ return {
2855
+ caption: value,
2856
+ snippet: value,
2857
+ meta: "html entity",
2858
+ score: 1000000
2859
+ };
2860
+ });
2861
+ };
2862
+
2863
+ }).call(HtmlCompletions.prototype);
2864
+
2865
+ exports.HtmlCompletions = HtmlCompletions;
2866
+ });
2867
+
2868
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
2869
+ "use strict";
2870
+
2871
+ var oop = require("../lib/oop");
2872
+ var lang = require("../lib/lang");
2873
+ var TextMode = require("./text").Mode;
2874
+ var JavaScriptMode = require("./javascript").Mode;
2875
+ var CssMode = require("./css").Mode;
2876
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2877
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2878
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2879
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2880
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2881
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2882
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2883
+
2884
+ var Mode = function(options) {
2885
+ this.fragmentContext = options && options.fragmentContext;
2886
+ this.HighlightRules = HtmlHighlightRules;
2887
+ this.$behaviour = new XmlBehaviour();
2888
+ this.$completer = new HtmlCompletions();
2889
+
2890
+ this.createModeDelegates({
2891
+ "js-": JavaScriptMode,
2892
+ "css-": CssMode
2893
+ });
2894
+
2895
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2896
+ };
2897
+ oop.inherits(Mode, TextMode);
2898
+
2899
+ (function() {
2900
+
2901
+ this.blockComment = {start: "<!--", end: "-->"};
2902
+
2903
+ this.voidElements = lang.arrayToMap(voidElements);
2904
+
2905
+ this.getNextLineIndent = function(state, line, tab) {
2906
+ return this.$getIndent(line);
2907
+ };
2908
+
2909
+ this.checkOutdent = function(state, line, input) {
2910
+ return false;
2911
+ };
2912
+
2913
+ this.getCompletions = function(state, session, pos, prefix) {
2914
+ return this.$completer.getCompletions(state, session, pos, prefix);
2915
+ };
2916
+
2917
+ this.createWorker = function(session) {
2918
+ if (this.constructor != Mode)
2919
+ return;
2920
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2921
+ worker.attachToDocument(session.getDocument());
2922
+
2923
+ if (this.fragmentContext)
2924
+ worker.call("setOptions", [{context: this.fragmentContext}]);
2925
+
2926
+ worker.on("error", function(e) {
2927
+ session.setAnnotations(e.data);
2928
+ });
2929
+
2930
+ worker.on("terminate", function() {
2931
+ session.clearAnnotations();
2932
+ });
2933
+
2934
+ return worker;
2935
+ };
2936
+
2937
+ this.$id = "ace/mode/html";
2938
+ this.snippetFileId = "ace/snippets/html";
2939
+ }).call(Mode.prototype);
2940
+
2941
+ exports.Mode = Mode;
2942
+ });
2943
+
2944
+ ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
2945
+ "use strict";
2946
+
2947
+ var oop = require("../../lib/oop");
2948
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2949
+ var Range = require("../../range").Range;
2950
+
2951
+ var FoldMode = exports.FoldMode = function() {};
2952
+ oop.inherits(FoldMode, BaseFoldMode);
2953
+
2954
+ (function() {
2955
+
2956
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2957
+ var range = this.indentationBlock(session, row);
2958
+ if (range)
2959
+ return range;
2960
+
2961
+ var re = /\S/;
2962
+ var line = session.getLine(row);
2963
+ var startLevel = line.search(re);
2964
+ if (startLevel == -1 || line[startLevel] != "#")
2965
+ return;
2966
+
2967
+ var startColumn = line.length;
2968
+ var maxRow = session.getLength();
2969
+ var startRow = row;
2970
+ var endRow = row;
2971
+
2972
+ while (++row < maxRow) {
2973
+ line = session.getLine(row);
2974
+ var level = line.search(re);
2975
+
2976
+ if (level == -1)
2977
+ continue;
2978
+
2979
+ if (line[level] != "#")
2980
+ break;
2981
+
2982
+ endRow = row;
2983
+ }
2984
+
2985
+ if (endRow > startRow) {
2986
+ var endColumn = session.getLine(endRow).length;
2987
+ return new Range(startRow, startColumn, endRow, endColumn);
2988
+ }
2989
+ };
2990
+ this.getFoldWidget = function(session, foldStyle, row) {
2991
+ var line = session.getLine(row);
2992
+ var indent = line.search(/\S/);
2993
+ var next = session.getLine(row + 1);
2994
+ var prev = session.getLine(row - 1);
2995
+ var prevIndent = prev.search(/\S/);
2996
+ var nextIndent = next.search(/\S/);
2997
+
2998
+ if (indent == -1) {
2999
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
3000
+ return "";
3001
+ }
3002
+ if (prevIndent == -1) {
3003
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
3004
+ session.foldWidgets[row - 1] = "";
3005
+ session.foldWidgets[row + 1] = "";
3006
+ return "start";
3007
+ }
3008
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
3009
+ if (session.getLine(row - 2).search(/\S/) == -1) {
3010
+ session.foldWidgets[row - 1] = "start";
3011
+ session.foldWidgets[row + 1] = "";
3012
+ return "";
3013
+ }
3014
+ }
3015
+
3016
+ if (prevIndent!= -1 && prevIndent < indent)
3017
+ session.foldWidgets[row - 1] = "start";
3018
+ else
3019
+ session.foldWidgets[row - 1] = "";
3020
+
3021
+ if (indent < nextIndent)
3022
+ return "start";
3023
+ else
3024
+ return "";
3025
+ };
3026
+
3027
+ }).call(FoldMode.prototype);
3028
+
3029
+ });
3030
+
3031
+ ace.define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
3032
+ "use strict";
3033
+
3034
+ var oop = require("../lib/oop");
3035
+ var TextMode = require("./text").Mode;
3036
+ var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
3037
+ var FoldMode = require("./folding/coffee").FoldMode;
3038
+
3039
+ var Mode = function() {
3040
+ this.HighlightRules = ElixirHighlightRules;
3041
+ this.foldingRules = new FoldMode();
3042
+ this.$behaviour = this.$defaultBehaviour;
3043
+ };
3044
+ oop.inherits(Mode, TextMode);
3045
+
3046
+ (function() {
3047
+ this.lineCommentStart = "#";
3048
+ this.$id = "ace/mode/elixir";
3049
+ }).call(Mode.prototype);
3050
+
3051
+ exports.Mode = Mode;
3052
+ });
3053
+
3054
+ ace.define("ace/mode/html_elixir",["require","exports","module","ace/lib/oop","ace/mode/html_elixir_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/elixir"], function(require, exports, module) {
3055
+ "use strict";
3056
+
3057
+ var oop = require("../lib/oop");
3058
+ var HtmlElixirHighlightRules = require("./html_elixir_highlight_rules").HtmlElixirHighlightRules;
3059
+ var HtmlMode = require("./html").Mode;
3060
+ var JavaScriptMode = require("./javascript").Mode;
3061
+ var CssMode = require("./css").Mode;
3062
+ var ElixirMode = require("./elixir").Mode;
3063
+
3064
+ var Mode = function() {
3065
+ HtmlMode.call(this);
3066
+ this.HighlightRules = HtmlElixirHighlightRules;
3067
+ this.createModeDelegates({
3068
+ "js-": JavaScriptMode,
3069
+ "css-": CssMode,
3070
+ "elixir-": ElixirMode
3071
+ });
3072
+ };
3073
+ oop.inherits(Mode, HtmlMode);
3074
+
3075
+ (function() {
3076
+
3077
+ this.$id = "ace/mode/html_elixir";
3078
+ }).call(Mode.prototype);
3079
+
3080
+ exports.Mode = Mode;
3081
+ }); (function() {
3082
+ ace.require(["ace/mode/html_elixir"], function(m) {
3083
+ if (typeof module == "object" && typeof exports == "object" && module) {
3084
+ module.exports = m;
3085
+ }
3086
+ });
3087
+ })();
3088
+