bedrock_sass 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (534) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -5
  3. data/assets/_vendor/ace/ace.js +21635 -0
  4. data/assets/_vendor/ace/ext-beautify.js +318 -0
  5. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
  6. data/assets/_vendor/ace/ext-emmet.js +1226 -0
  7. data/assets/_vendor/ace/ext-error_marker.js +10 -0
  8. data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
  9. data/assets/_vendor/ace/ext-language_tools.js +1997 -0
  10. data/assets/_vendor/ace/ext-linking.js +65 -0
  11. data/assets/_vendor/ace/ext-modelist.js +228 -0
  12. data/assets/_vendor/ace/ext-options.js +750 -0
  13. data/assets/_vendor/ace/ext-rtl.js +110 -0
  14. data/assets/_vendor/ace/ext-searchbox.js +512 -0
  15. data/assets/_vendor/ace/ext-settings_menu.js +771 -0
  16. data/assets/_vendor/ace/ext-spellcheck.js +75 -0
  17. data/assets/_vendor/ace/ext-split.js +208 -0
  18. data/assets/_vendor/ace/ext-static_highlight.js +226 -0
  19. data/assets/_vendor/ace/ext-statusbar.js +57 -0
  20. data/assets/_vendor/ace/ext-textarea.js +567 -0
  21. data/assets/_vendor/ace/ext-themelist.js +67 -0
  22. data/assets/_vendor/ace/ext-whitespace.js +210 -0
  23. data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
  24. data/assets/_vendor/ace/keybinding-vim.js +5673 -0
  25. data/assets/_vendor/ace/mode-abap.js +222 -0
  26. data/assets/_vendor/ace/mode-abc.js +267 -0
  27. data/assets/_vendor/ace/mode-actionscript.js +274 -0
  28. data/assets/_vendor/ace/mode-ada.js +138 -0
  29. data/assets/_vendor/ace/mode-apache_conf.js +363 -0
  30. data/assets/_vendor/ace/mode-applescript.js +279 -0
  31. data/assets/_vendor/ace/mode-asciidoc.js +349 -0
  32. data/assets/_vendor/ace/mode-asl.js +422 -0
  33. data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
  34. data/assets/_vendor/ace/mode-autohotkey.js +243 -0
  35. data/assets/_vendor/ace/mode-batchfile.js +230 -0
  36. data/assets/_vendor/ace/mode-bro.js +334 -0
  37. data/assets/_vendor/ace/mode-c9search.js +294 -0
  38. data/assets/_vendor/ace/mode-c_cpp.js +502 -0
  39. data/assets/_vendor/ace/mode-cirru.js +211 -0
  40. data/assets/_vendor/ace/mode-clojure.js +314 -0
  41. data/assets/_vendor/ace/mode-cobol.js +102 -0
  42. data/assets/_vendor/ace/mode-coffee.js +400 -0
  43. data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
  44. data/assets/_vendor/ace/mode-csharp.js +502 -0
  45. data/assets/_vendor/ace/mode-csound_document.js +3749 -0
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
  47. data/assets/_vendor/ace/mode-csound_score.js +454 -0
  48. data/assets/_vendor/ace/mode-csp.js +60 -0
  49. data/assets/_vendor/ace/mode-css.js +723 -0
  50. data/assets/_vendor/ace/mode-curly.js +2564 -0
  51. data/assets/_vendor/ace/mode-d.js +520 -0
  52. data/assets/_vendor/ace/mode-dart.js +703 -0
  53. data/assets/_vendor/ace/mode-diff.js +146 -0
  54. data/assets/_vendor/ace/mode-django.js +2594 -0
  55. data/assets/_vendor/ace/mode-dockerfile.js +498 -0
  56. data/assets/_vendor/ace/mode-dot.js +418 -0
  57. data/assets/_vendor/ace/mode-drools.js +496 -0
  58. data/assets/_vendor/ace/mode-edifact.js +165 -0
  59. data/assets/_vendor/ace/mode-eiffel.js +136 -0
  60. data/assets/_vendor/ace/mode-ejs.js +3026 -0
  61. data/assets/_vendor/ace/mode-elixir.js +501 -0
  62. data/assets/_vendor/ace/mode-elm.js +307 -0
  63. data/assets/_vendor/ace/mode-erlang.js +1009 -0
  64. data/assets/_vendor/ace/mode-forth.js +297 -0
  65. data/assets/_vendor/ace/mode-fortran.js +431 -0
  66. data/assets/_vendor/ace/mode-fsharp.js +314 -0
  67. data/assets/_vendor/ace/mode-ftl.js +1192 -0
  68. data/assets/_vendor/ace/mode-gcode.js +94 -0
  69. data/assets/_vendor/ace/mode-gherkin.js +172 -0
  70. data/assets/_vendor/ace/mode-gitignore.js +60 -0
  71. data/assets/_vendor/ace/mode-glsl.js +579 -0
  72. data/assets/_vendor/ace/mode-gobstones.js +929 -0
  73. data/assets/_vendor/ace/mode-golang.js +414 -0
  74. data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
  75. data/assets/_vendor/ace/mode-groovy.js +986 -0
  76. data/assets/_vendor/ace/mode-haml.js +1555 -0
  77. data/assets/_vendor/ace/mode-handlebars.js +2622 -0
  78. data/assets/_vendor/ace/mode-haskell.js +379 -0
  79. data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
  80. data/assets/_vendor/ace/mode-haxe.js +386 -0
  81. data/assets/_vendor/ace/mode-hjson.js +353 -0
  82. data/assets/_vendor/ace/mode-html.js +2509 -0
  83. data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
  84. data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
  85. data/assets/_vendor/ace/mode-ini.js +163 -0
  86. data/assets/_vendor/ace/mode-io.js +253 -0
  87. data/assets/_vendor/ace/mode-jack.js +347 -0
  88. data/assets/_vendor/ace/mode-jade.js +2126 -0
  89. data/assets/_vendor/ace/mode-java.js +975 -0
  90. data/assets/_vendor/ace/mode-javascript.js +797 -0
  91. data/assets/_vendor/ace/mode-json.js +327 -0
  92. data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
  93. data/assets/_vendor/ace/mode-jsp.js +1430 -0
  94. data/assets/_vendor/ace/mode-jssm.js +325 -0
  95. data/assets/_vendor/ace/mode-jsx.js +412 -0
  96. data/assets/_vendor/ace/mode-julia.js +303 -0
  97. data/assets/_vendor/ace/mode-kotlin.js +795 -0
  98. data/assets/_vendor/ace/mode-latex.js +297 -0
  99. data/assets/_vendor/ace/mode-less.js +841 -0
  100. data/assets/_vendor/ace/mode-liquid.js +1193 -0
  101. data/assets/_vendor/ace/mode-lisp.js +112 -0
  102. data/assets/_vendor/ace/mode-livescript.js +280 -0
  103. data/assets/_vendor/ace/mode-logiql.js +317 -0
  104. data/assets/_vendor/ace/mode-lsl.js +343 -0
  105. data/assets/_vendor/ace/mode-lua.js +432 -0
  106. data/assets/_vendor/ace/mode-luapage.js +3007 -0
  107. data/assets/_vendor/ace/mode-lucene.js +87 -0
  108. data/assets/_vendor/ace/mode-makefile.js +410 -0
  109. data/assets/_vendor/ace/mode-markdown.js +3189 -0
  110. data/assets/_vendor/ace/mode-mask.js +1802 -0
  111. data/assets/_vendor/ace/mode-matlab.js +264 -0
  112. data/assets/_vendor/ace/mode-maze.js +291 -0
  113. data/assets/_vendor/ace/mode-mel.js +263 -0
  114. data/assets/_vendor/ace/mode-mixal.js +123 -0
  115. data/assets/_vendor/ace/mode-mushcode.js +681 -0
  116. data/assets/_vendor/ace/mode-mysql.js +168 -0
  117. data/assets/_vendor/ace/mode-nix.js +646 -0
  118. data/assets/_vendor/ace/mode-nsis.js +312 -0
  119. data/assets/_vendor/ace/mode-objectivec.js +739 -0
  120. data/assets/_vendor/ace/mode-ocaml.js +422 -0
  121. data/assets/_vendor/ace/mode-pascal.js +205 -0
  122. data/assets/_vendor/ace/mode-perl.js +380 -0
  123. data/assets/_vendor/ace/mode-pgsql.js +1508 -0
  124. data/assets/_vendor/ace/mode-php.js +13088 -0
  125. data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
  126. data/assets/_vendor/ace/mode-pig.js +310 -0
  127. data/assets/_vendor/ace/mode-plain_text.js +33 -0
  128. data/assets/_vendor/ace/mode-powershell.js +418 -0
  129. data/assets/_vendor/ace/mode-praat.js +478 -0
  130. data/assets/_vendor/ace/mode-prolog.js +371 -0
  131. data/assets/_vendor/ace/mode-properties.js +81 -0
  132. data/assets/_vendor/ace/mode-protobuf.js +592 -0
  133. data/assets/_vendor/ace/mode-puppet.js +370 -0
  134. data/assets/_vendor/ace/mode-python.js +273 -0
  135. data/assets/_vendor/ace/mode-r.js +310 -0
  136. data/assets/_vendor/ace/mode-razor.js +2869 -0
  137. data/assets/_vendor/ace/mode-rdoc.js +243 -0
  138. data/assets/_vendor/ace/mode-red.js +450 -0
  139. data/assets/_vendor/ace/mode-redshift.js +361 -0
  140. data/assets/_vendor/ace/mode-rhtml.js +2806 -0
  141. data/assets/_vendor/ace/mode-rst.js +257 -0
  142. data/assets/_vendor/ace/mode-ruby.js +497 -0
  143. data/assets/_vendor/ace/mode-rust.js +279 -0
  144. data/assets/_vendor/ace/mode-sass.js +441 -0
  145. data/assets/_vendor/ace/mode-scad.js +414 -0
  146. data/assets/_vendor/ace/mode-scala.js +982 -0
  147. data/assets/_vendor/ace/mode-scheme.js +232 -0
  148. data/assets/_vendor/ace/mode-scss.js +606 -0
  149. data/assets/_vendor/ace/mode-sh.js +447 -0
  150. data/assets/_vendor/ace/mode-sjs.js +1014 -0
  151. data/assets/_vendor/ace/mode-slim.js +4736 -0
  152. data/assets/_vendor/ace/mode-smarty.js +2635 -0
  153. data/assets/_vendor/ace/mode-snippets.js +207 -0
  154. data/assets/_vendor/ace/mode-soy_template.js +2847 -0
  155. data/assets/_vendor/ace/mode-space.js +168 -0
  156. data/assets/_vendor/ace/mode-sparql.js +320 -0
  157. data/assets/_vendor/ace/mode-sql.js +111 -0
  158. data/assets/_vendor/ace/mode-sqlserver.js +444 -0
  159. data/assets/_vendor/ace/mode-stylus.js +471 -0
  160. data/assets/_vendor/ace/mode-svg.js +1581 -0
  161. data/assets/_vendor/ace/mode-swift.js +390 -0
  162. data/assets/_vendor/ace/mode-tcl.js +383 -0
  163. data/assets/_vendor/ace/mode-terraform.js +398 -0
  164. data/assets/_vendor/ace/mode-tex.js +159 -0
  165. data/assets/_vendor/ace/mode-text.js +10 -0
  166. data/assets/_vendor/ace/mode-textile.js +150 -0
  167. data/assets/_vendor/ace/mode-toml.js +154 -0
  168. data/assets/_vendor/ace/mode-tsx.js +887 -0
  169. data/assets/_vendor/ace/mode-turtle.js +296 -0
  170. data/assets/_vendor/ace/mode-twig.js +2693 -0
  171. data/assets/_vendor/ace/mode-typescript.js +868 -0
  172. data/assets/_vendor/ace/mode-vala.js +676 -0
  173. data/assets/_vendor/ace/mode-vbscript.js +207 -0
  174. data/assets/_vendor/ace/mode-velocity.js +2790 -0
  175. data/assets/_vendor/ace/mode-verilog.js +119 -0
  176. data/assets/_vendor/ace/mode-vhdl.js +118 -0
  177. data/assets/_vendor/ace/mode-wollok.js +911 -0
  178. data/assets/_vendor/ace/mode-xml.js +677 -0
  179. data/assets/_vendor/ace/mode-xquery.js +4922 -0
  180. data/assets/_vendor/ace/mode-yaml.js +300 -0
  181. data/assets/_vendor/ace/snippets/abap.js +15 -0
  182. data/assets/_vendor/ace/snippets/abc.js +46 -0
  183. data/assets/_vendor/ace/snippets/actionscript.js +172 -0
  184. data/assets/_vendor/ace/snippets/ada.js +15 -0
  185. data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
  186. data/assets/_vendor/ace/snippets/applescript.js +15 -0
  187. data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
  188. data/assets/_vendor/ace/snippets/asl.js +14 -0
  189. data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
  190. data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
  191. data/assets/_vendor/ace/snippets/batchfile.js +15 -0
  192. data/assets/_vendor/ace/snippets/bro.js +15 -0
  193. data/assets/_vendor/ace/snippets/c9search.js +15 -0
  194. data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
  195. data/assets/_vendor/ace/snippets/cirru.js +15 -0
  196. data/assets/_vendor/ace/snippets/clojure.js +105 -0
  197. data/assets/_vendor/ace/snippets/cobol.js +15 -0
  198. data/assets/_vendor/ace/snippets/coffee.js +110 -0
  199. data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
  200. data/assets/_vendor/ace/snippets/csharp.js +15 -0
  201. data/assets/_vendor/ace/snippets/csound_document.js +25 -0
  202. data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
  203. data/assets/_vendor/ace/snippets/csound_score.js +15 -0
  204. data/assets/_vendor/ace/snippets/csp.js +15 -0
  205. data/assets/_vendor/ace/snippets/css.js +982 -0
  206. data/assets/_vendor/ace/snippets/curly.js +15 -0
  207. data/assets/_vendor/ace/snippets/d.js +15 -0
  208. data/assets/_vendor/ace/snippets/dart.js +98 -0
  209. data/assets/_vendor/ace/snippets/diff.js +26 -0
  210. data/assets/_vendor/ace/snippets/django.js +123 -0
  211. data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
  212. data/assets/_vendor/ace/snippets/dot.js +15 -0
  213. data/assets/_vendor/ace/snippets/drools.js +34 -0
  214. data/assets/_vendor/ace/snippets/edifact.js +255 -0
  215. data/assets/_vendor/ace/snippets/eiffel.js +15 -0
  216. data/assets/_vendor/ace/snippets/ejs.js +15 -0
  217. data/assets/_vendor/ace/snippets/elixir.js +15 -0
  218. data/assets/_vendor/ace/snippets/elm.js +15 -0
  219. data/assets/_vendor/ace/snippets/erlang.js +175 -0
  220. data/assets/_vendor/ace/snippets/forth.js +15 -0
  221. data/assets/_vendor/ace/snippets/fortran.js +15 -0
  222. data/assets/_vendor/ace/snippets/fsharp.js +15 -0
  223. data/assets/_vendor/ace/snippets/ftl.js +15 -0
  224. data/assets/_vendor/ace/snippets/gcode.js +15 -0
  225. data/assets/_vendor/ace/snippets/gherkin.js +15 -0
  226. data/assets/_vendor/ace/snippets/gitignore.js +15 -0
  227. data/assets/_vendor/ace/snippets/glsl.js +15 -0
  228. data/assets/_vendor/ace/snippets/gobstones.js +49 -0
  229. data/assets/_vendor/ace/snippets/golang.js +15 -0
  230. data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
  231. data/assets/_vendor/ace/snippets/groovy.js +15 -0
  232. data/assets/_vendor/ace/snippets/haml.js +35 -0
  233. data/assets/_vendor/ace/snippets/handlebars.js +15 -0
  234. data/assets/_vendor/ace/snippets/haskell.js +97 -0
  235. data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
  236. data/assets/_vendor/ace/snippets/haxe.js +15 -0
  237. data/assets/_vendor/ace/snippets/hjson.js +15 -0
  238. data/assets/_vendor/ace/snippets/html.js +870 -0
  239. data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
  240. data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
  241. data/assets/_vendor/ace/snippets/ini.js +15 -0
  242. data/assets/_vendor/ace/snippets/io.js +77 -0
  243. data/assets/_vendor/ace/snippets/jack.js +15 -0
  244. data/assets/_vendor/ace/snippets/jade.js +15 -0
  245. data/assets/_vendor/ace/snippets/java.js +255 -0
  246. data/assets/_vendor/ace/snippets/javascript.js +210 -0
  247. data/assets/_vendor/ace/snippets/json.js +15 -0
  248. data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
  249. data/assets/_vendor/ace/snippets/jsp.js +114 -0
  250. data/assets/_vendor/ace/snippets/jssm.js +15 -0
  251. data/assets/_vendor/ace/snippets/jsx.js +15 -0
  252. data/assets/_vendor/ace/snippets/julia.js +15 -0
  253. data/assets/_vendor/ace/snippets/kotlin.js +15 -0
  254. data/assets/_vendor/ace/snippets/latex.js +15 -0
  255. data/assets/_vendor/ace/snippets/less.js +15 -0
  256. data/assets/_vendor/ace/snippets/liquid.js +15 -0
  257. data/assets/_vendor/ace/snippets/lisp.js +15 -0
  258. data/assets/_vendor/ace/snippets/livescript.js +15 -0
  259. data/assets/_vendor/ace/snippets/logiql.js +15 -0
  260. data/assets/_vendor/ace/snippets/lsl.js +1247 -0
  261. data/assets/_vendor/ace/snippets/lua.js +36 -0
  262. data/assets/_vendor/ace/snippets/luapage.js +15 -0
  263. data/assets/_vendor/ace/snippets/lucene.js +15 -0
  264. data/assets/_vendor/ace/snippets/makefile.js +19 -0
  265. data/assets/_vendor/ace/snippets/markdown.js +103 -0
  266. data/assets/_vendor/ace/snippets/mask.js +15 -0
  267. data/assets/_vendor/ace/snippets/matlab.js +15 -0
  268. data/assets/_vendor/ace/snippets/maze.js +24 -0
  269. data/assets/_vendor/ace/snippets/mel.js +15 -0
  270. data/assets/_vendor/ace/snippets/mixal.js +15 -0
  271. data/assets/_vendor/ace/snippets/mushcode.js +15 -0
  272. data/assets/_vendor/ace/snippets/mysql.js +15 -0
  273. data/assets/_vendor/ace/snippets/nix.js +15 -0
  274. data/assets/_vendor/ace/snippets/nsis.js +15 -0
  275. data/assets/_vendor/ace/snippets/objectivec.js +15 -0
  276. data/assets/_vendor/ace/snippets/ocaml.js +15 -0
  277. data/assets/_vendor/ace/snippets/pascal.js +15 -0
  278. data/assets/_vendor/ace/snippets/perl.js +362 -0
  279. data/assets/_vendor/ace/snippets/pgsql.js +15 -0
  280. data/assets/_vendor/ace/snippets/php.js +398 -0
  281. data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
  282. data/assets/_vendor/ace/snippets/pig.js +15 -0
  283. data/assets/_vendor/ace/snippets/plain_text.js +15 -0
  284. data/assets/_vendor/ace/snippets/powershell.js +15 -0
  285. data/assets/_vendor/ace/snippets/praat.js +15 -0
  286. data/assets/_vendor/ace/snippets/prolog.js +15 -0
  287. data/assets/_vendor/ace/snippets/properties.js +15 -0
  288. data/assets/_vendor/ace/snippets/protobuf.js +15 -0
  289. data/assets/_vendor/ace/snippets/puppet.js +15 -0
  290. data/assets/_vendor/ace/snippets/python.js +173 -0
  291. data/assets/_vendor/ace/snippets/r.js +136 -0
  292. data/assets/_vendor/ace/snippets/razor.js +18 -0
  293. data/assets/_vendor/ace/snippets/rdoc.js +15 -0
  294. data/assets/_vendor/ace/snippets/red.js +15 -0
  295. data/assets/_vendor/ace/snippets/redshift.js +15 -0
  296. data/assets/_vendor/ace/snippets/rhtml.js +15 -0
  297. data/assets/_vendor/ace/snippets/rst.js +37 -0
  298. data/assets/_vendor/ace/snippets/ruby.js +943 -0
  299. data/assets/_vendor/ace/snippets/rust.js +15 -0
  300. data/assets/_vendor/ace/snippets/sass.js +15 -0
  301. data/assets/_vendor/ace/snippets/scad.js +15 -0
  302. data/assets/_vendor/ace/snippets/scala.js +15 -0
  303. data/assets/_vendor/ace/snippets/scheme.js +15 -0
  304. data/assets/_vendor/ace/snippets/scss.js +15 -0
  305. data/assets/_vendor/ace/snippets/sh.js +98 -0
  306. data/assets/_vendor/ace/snippets/sjs.js +15 -0
  307. data/assets/_vendor/ace/snippets/slim.js +15 -0
  308. data/assets/_vendor/ace/snippets/smarty.js +15 -0
  309. data/assets/_vendor/ace/snippets/snippets.js +24 -0
  310. data/assets/_vendor/ace/snippets/soy_template.js +15 -0
  311. data/assets/_vendor/ace/snippets/space.js +15 -0
  312. data/assets/_vendor/ace/snippets/sparql.js +15 -0
  313. data/assets/_vendor/ace/snippets/sql.js +41 -0
  314. data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
  315. data/assets/_vendor/ace/snippets/stylus.js +15 -0
  316. data/assets/_vendor/ace/snippets/svg.js +15 -0
  317. data/assets/_vendor/ace/snippets/swift.js +15 -0
  318. data/assets/_vendor/ace/snippets/tcl.js +107 -0
  319. data/assets/_vendor/ace/snippets/terraform.js +15 -0
  320. data/assets/_vendor/ace/snippets/tex.js +205 -0
  321. data/assets/_vendor/ace/snippets/text.js +15 -0
  322. data/assets/_vendor/ace/snippets/textile.js +45 -0
  323. data/assets/_vendor/ace/snippets/toml.js +15 -0
  324. data/assets/_vendor/ace/snippets/tsx.js +15 -0
  325. data/assets/_vendor/ace/snippets/turtle.js +15 -0
  326. data/assets/_vendor/ace/snippets/twig.js +15 -0
  327. data/assets/_vendor/ace/snippets/typescript.js +15 -0
  328. data/assets/_vendor/ace/snippets/vala.js +201 -0
  329. data/assets/_vendor/ace/snippets/vbscript.js +15 -0
  330. data/assets/_vendor/ace/snippets/velocity.js +44 -0
  331. data/assets/_vendor/ace/snippets/verilog.js +15 -0
  332. data/assets/_vendor/ace/snippets/vhdl.js +15 -0
  333. data/assets/_vendor/ace/snippets/wollok.js +99 -0
  334. data/assets/_vendor/ace/snippets/xml.js +15 -0
  335. data/assets/_vendor/ace/snippets/xquery.js +76 -0
  336. data/assets/_vendor/ace/snippets/yaml.js +15 -0
  337. data/assets/_vendor/ace/theme-ambiance.js +185 -0
  338. data/assets/_vendor/ace/theme-chaos.js +164 -0
  339. data/assets/_vendor/ace/theme-chrome.js +136 -0
  340. data/assets/_vendor/ace/theme-clouds.js +103 -0
  341. data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
  342. data/assets/_vendor/ace/theme-cobalt.js +121 -0
  343. data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
  344. data/assets/_vendor/ace/theme-dawn.js +116 -0
  345. data/assets/_vendor/ace/theme-dracula.js +136 -0
  346. data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
  347. data/assets/_vendor/ace/theme-eclipse.js +106 -0
  348. data/assets/_vendor/ace/theme-github.js +110 -0
  349. data/assets/_vendor/ace/theme-gob.js +120 -0
  350. data/assets/_vendor/ace/theme-gruvbox.js +90 -0
  351. data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
  352. data/assets/_vendor/ace/theme-iplastic.js +129 -0
  353. data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
  354. data/assets/_vendor/ace/theme-kr_theme.js +112 -0
  355. data/assets/_vendor/ace/theme-kuroir.js +69 -0
  356. data/assets/_vendor/ace/theme-merbivore.js +103 -0
  357. data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
  358. data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
  359. data/assets/_vendor/ace/theme-monokai.js +113 -0
  360. data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
  361. data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
  362. data/assets/_vendor/ace/theme-solarized_light.js +99 -0
  363. data/assets/_vendor/ace/theme-sqlserver.js +146 -0
  364. data/assets/_vendor/ace/theme-terminal.js +122 -0
  365. data/assets/_vendor/ace/theme-textmate.js +138 -0
  366. data/assets/_vendor/ace/theme-tomorrow.js +116 -0
  367. data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
  368. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
  369. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
  370. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
  371. data/assets/_vendor/ace/theme-twilight.js +117 -0
  372. data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
  373. data/assets/_vendor/ace/theme-xcode.js +96 -0
  374. data/assets/_vendor/ace/worker-coffee.js +2165 -0
  375. data/assets/_vendor/ace/worker-css.js +8764 -0
  376. data/assets/_vendor/ace/worker-html.js +11614 -0
  377. data/assets/_vendor/ace/worker-javascript.js +12491 -0
  378. data/assets/_vendor/ace/worker-json.js +2396 -0
  379. data/assets/_vendor/ace/worker-lua.js +3637 -0
  380. data/assets/_vendor/ace/worker-php.js +4313 -0
  381. data/assets/_vendor/ace/worker-xml.js +3899 -0
  382. data/assets/_vendor/ace/worker-xquery.js +70688 -0
  383. data/assets/_vendor/motion-ui/_settings.scss +1 -0
  384. data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
  385. data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
  386. data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
  387. data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
  388. data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
  389. data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
  390. data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
  391. data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
  392. data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
  393. data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
  394. data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
  395. data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
  396. data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
  397. data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
  398. data/assets/_vendor/motion-ui/util/_args.scss +2 -2
  399. data/assets/_vendor/motion-ui/util/_function.scss +94 -0
  400. data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
  401. data/assets/_vendor/motion-ui/util/_series.scss +20 -17
  402. data/assets/_vendor/motion-ui/util/_string.scss +36 -0
  403. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
  404. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
  405. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
  406. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
  407. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
  408. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
  409. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
  410. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
  411. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
  412. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
  414. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
  416. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
  417. data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
  418. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
  419. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
  420. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
  422. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
  423. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
  424. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
  425. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
  426. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
  428. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
  429. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
  430. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
  431. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
  432. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  433. data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
  434. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  435. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
  436. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
  438. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
  440. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
  441. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
  442. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
  443. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
  444. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  445. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
  446. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
  447. data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
  448. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
  449. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
  450. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  451. data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
  452. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
  453. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
  454. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
  455. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
  456. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
  457. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
  458. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
  459. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
  460. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  461. data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
  462. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
  463. data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
  464. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
  465. data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
  466. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
  467. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
  468. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  469. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
  470. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  471. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
  472. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
  473. data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
  474. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
  475. data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
  476. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  477. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
  478. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
  479. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
  480. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  481. data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
  482. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
  483. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
  484. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  485. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
  486. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  487. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
  488. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  489. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
  490. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
  491. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  492. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
  493. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  494. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  495. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  496. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +1 -1
  497. data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
  498. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
  499. data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
  500. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
  501. data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
  502. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
  503. data/assets/_vendor/tinymce/tinymce.js +25087 -42606
  504. data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
  505. data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
  506. data/assets/bedrock/js/bedrock.js +1 -71697
  507. data/assets/bedrock/scss/_bedrock-components.scss +20 -0
  508. data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
  509. data/assets/bedrock/scss/_foundation-settings.scss +4 -2
  510. data/assets/bedrock/scss/components/ace-editor.scss +21 -0
  511. data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
  512. data/assets/bedrock/scss/components/date-picker.scss +146 -0
  513. data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
  514. data/assets/bedrock/scss/components/file-input.scss +7 -0
  515. data/assets/bedrock/scss/components/file-preview.scss +36 -0
  516. data/assets/bedrock/scss/components/frame-embed.scss +23 -0
  517. data/assets/bedrock/scss/components/global.scss +27 -0
  518. data/assets/bedrock/scss/components/helper-classes.scss +1 -0
  519. data/assets/bedrock/scss/components/icon-box.scss +38 -0
  520. data/assets/bedrock/scss/components/item-list.scss +66 -0
  521. data/assets/bedrock/scss/components/lists.scss +58 -0
  522. data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
  523. data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
  524. data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
  525. data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
  526. data/assets/bedrock/scss/components/select-box.scss +1 -0
  527. data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
  528. data/assets/bedrock/scss/components/textarea.scss +14 -2
  529. data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
  530. data/lib/bedrock_sass.rb +5 -0
  531. data/lib/bedrock_sass/version.rb +1 -1
  532. data/lib/tasks/before_assets_precompile.rake +1 -0
  533. metadata +395 -4
  534. data/CODE_OF_CONDUCT.md +0 -74
@@ -0,0 +1,165 @@
1
+ define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
+
7
+ var DocCommentHighlightRules = function() {
8
+ this.$rules = {
9
+ "start" : [ {
10
+ token : "comment.doc.tag",
11
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
12
+ },
13
+ DocCommentHighlightRules.getTagRule(),
14
+ {
15
+ defaultToken : "comment.doc",
16
+ caseInsensitive: true
17
+ }]
18
+ };
19
+ };
20
+
21
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
22
+
23
+ DocCommentHighlightRules.getTagRule = function(start) {
24
+ return {
25
+ token : "comment.doc.tag.storage.type",
26
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
27
+ };
28
+ };
29
+
30
+ DocCommentHighlightRules.getStartRule = function(start) {
31
+ return {
32
+ token : "comment.doc", // doc comment
33
+ regex : "\\/\\*(?=\\*)",
34
+ next : start
35
+ };
36
+ };
37
+
38
+ DocCommentHighlightRules.getEndRule = function (start) {
39
+ return {
40
+ token : "comment.doc", // closing comment
41
+ regex : "\\*\\/",
42
+ next : start
43
+ };
44
+ };
45
+
46
+
47
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
48
+
49
+ });
50
+
51
+ define("ace/mode/edifact_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
52
+ "use strict";
53
+
54
+ var oop = require("../lib/oop");
55
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
56
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
57
+
58
+ var EdifactHighlightRules = function() {
59
+
60
+ var header = (
61
+ "UNH"
62
+ );
63
+ var segment = (
64
+ "ADR|AGR|AJT|ALC|ALI|APP|APR|ARD|ARR|ASI|ATT|AUT|"+
65
+ "BAS|BGM|BII|BUS|"+
66
+ "CAV|CCD|CCI|CDI|CDS|CDV|CED|CIN|CLA|CLI|CMP|CNI|CNT|COD|COM|COT|CPI|CPS|CPT|CST|CTA|CUX|"+
67
+ "DAM|DFN|DGS|DII|DIM|DLI|DLM|DMS|DOC|DRD|DSG|DSI|DTM|"+
68
+ "EDT|EFI|ELM|ELU|ELV|EMP|EQA|EQD|EQN|ERC|ERP|EVE|FCA|FII|FNS|FNT|FOR|FSQ|FTX|"+
69
+ "GDS|GEI|GID|GIN|GIR|GOR|GPO|GRU|HAN|HYN|ICD|IDE|IFD|IHC|IMD|IND|INP|INV|IRQ|"+
70
+ "LAN|LIN|LOC|MEA|MEM|MKS|MOA|MSG|MTD|NAD|NAT|"+
71
+ "PAC|PAI|PAS|PCC|PCD|PCI|PDI|PER|PGI|PIA|PNA|POC|PRC|PRI|PRV|PSD|PTY|PYT|"+
72
+ "QRS|QTY|QUA|QVR|"+
73
+ "RCS|REL|RFF|RJL|RNG|ROD|RSL|RTE|"+
74
+ "SAL|SCC|SCD|SEG|SEL|SEQ|SFI|SGP|SGU|SPR|SPS|STA|STC|STG|STS|"+
75
+ "TAX|TCC|TDT|TEM|TMD|TMP|TOD|TPL|TRU|TSR|"+
76
+ "UNB|UNZ|UNT|UGH|UGT|UNS|"+
77
+ "VLI"
78
+ );
79
+
80
+ var header = (
81
+ "UNH"
82
+ );
83
+
84
+ var buildinConstants = ("null|Infinity|NaN|undefined");
85
+ var langClasses = (
86
+ ""
87
+ );
88
+
89
+ var keywords = (
90
+ "BY|SE|ON|INV|JP|UNOA"
91
+ );
92
+
93
+ var keywordMapper = this.createKeywordMapper({
94
+ "variable.language": "this",
95
+ "keyword": keywords,
96
+ "entity.name.segment":segment,
97
+ "entity.name.header":header,
98
+ "constant.language": buildinConstants,
99
+ "support.function": langClasses
100
+ }, "identifier");
101
+ this.$rules = {
102
+ "start" : [
103
+ {
104
+ token : "punctuation.operator",
105
+ regex : "\\+.\\+"
106
+ }, {
107
+ token : "constant.language.boolean",
108
+ regex : "(?:true|false)\\b"
109
+ }, {
110
+ token : keywordMapper,
111
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
112
+ }, {
113
+ token : "keyword.operator",
114
+ regex : "\\+"
115
+ }, {
116
+ token : "punctuation.operator",
117
+ regex : "\\:|'"
118
+ },{
119
+ token : "identifier",
120
+ regex : "\\:D\\:"
121
+ }
122
+ ]
123
+ };
124
+
125
+ this.embedRules(DocCommentHighlightRules, "doc-",
126
+ [ DocCommentHighlightRules.getEndRule("start") ]);
127
+ };
128
+
129
+ EdifactHighlightRules.metaData = { fileTypes: [ 'edi' ],
130
+ keyEquivalent: '^~E',
131
+ name: 'Edifact',
132
+ scopeName: 'source.edifact' };
133
+
134
+ oop.inherits(EdifactHighlightRules, TextHighlightRules);
135
+
136
+ exports.EdifactHighlightRules = EdifactHighlightRules;
137
+ });
138
+
139
+ define("ace/mode/edifact",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/edifact_highlight_rules"], function(require, exports, module) {
140
+ "use strict";
141
+
142
+ var oop = require("../lib/oop");
143
+ var TextMode = require("./text").Mode;
144
+ var EdifactHighlightRules = require("./edifact_highlight_rules").EdifactHighlightRules;
145
+
146
+ var Mode = function() {
147
+
148
+ this.HighlightRules = EdifactHighlightRules;
149
+ };
150
+ oop.inherits(Mode, TextMode);
151
+
152
+ (function() {
153
+ this.$id = "ace/mode/edifact";
154
+ }).call(Mode.prototype);
155
+
156
+ exports.Mode = Mode;
157
+ });
158
+ (function() {
159
+ window.require(["ace/mode/edifact"], function(m) {
160
+ if (typeof module == "object" && typeof exports == "object" && module) {
161
+ module.exports = m;
162
+ }
163
+ });
164
+ })();
165
+
@@ -0,0 +1,136 @@
1
+ define("ace/mode/eiffel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2
+ "use strict";
3
+
4
+ var oop = require("../lib/oop");
5
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
6
+
7
+ var EiffelHighlightRules = function() {
8
+ var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" +
9
+ "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" +
10
+ "ensure|expanded|export|external|feature|from|frozen|if|inherit|" +
11
+ "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" +
12
+ "Precursor|redefine|rename|require|rescue|retry|select|separate|" +
13
+ "some|then|undefine|until|variant|when";
14
+
15
+ var operatorKeywords = "and|implies|or|xor";
16
+
17
+ var languageConstants = "Void";
18
+
19
+ var booleanConstants = "True|False";
20
+
21
+ var languageVariables = "Current|Result";
22
+
23
+ var keywordMapper = this.createKeywordMapper({
24
+ "constant.language": languageConstants,
25
+ "constant.language.boolean": booleanConstants,
26
+ "variable.language": languageVariables,
27
+ "keyword.operator": operatorKeywords,
28
+ "keyword": keywords
29
+ }, "identifier", true);
30
+
31
+ var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;
32
+
33
+ this.$rules = {
34
+ "start": [{
35
+ token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported)
36
+ regex : /"\[/,
37
+ next: "aligned_verbatim_string"
38
+ }, {
39
+ token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported)
40
+ regex : /"\{/,
41
+ next: "non-aligned_verbatim_string"
42
+ }, {
43
+ token : "string.quoted.double",
44
+ regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/
45
+ }, {
46
+ token : "comment.line.double-dash",
47
+ regex : /--.*/
48
+ }, {
49
+ token : "constant.character",
50
+ regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/
51
+ }, {
52
+ token : "constant.numeric", // hexa | octal | bin
53
+ regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/
54
+ }, {
55
+ token : "constant.numeric",
56
+ regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/
57
+ }, {
58
+ token : "paren.lparen",
59
+ regex : /[\[({]|<<|\|\(/
60
+ }, {
61
+ token : "paren.rparen",
62
+ regex : /[\])}]|>>|\|\)/
63
+ }, {
64
+ token : "keyword.operator", // punctuation
65
+ regex : /:=|->|\.(?=\w)|[;,:?]/
66
+ }, {
67
+ token : "keyword.operator",
68
+ regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/
69
+ }, {
70
+ token : function (v) {
71
+ var result = keywordMapper(v);
72
+ if (result === "identifier" && v === v.toUpperCase()) {
73
+ result = "entity.name.type";
74
+ }
75
+ return result;
76
+ },
77
+ regex : /[a-zA-Z][a-zA-Z\d_]*\b/
78
+ }, {
79
+ token : "text",
80
+ regex : /\s+/
81
+ }
82
+ ],
83
+ "aligned_verbatim_string" : [{
84
+ token : "string",
85
+ regex : /]"/,
86
+ next : "start"
87
+ }, {
88
+ token : "string",
89
+ regex : simpleString
90
+ }
91
+ ],
92
+ "non-aligned_verbatim_string" : [{
93
+ token : "string.quoted.other",
94
+ regex : /}"/,
95
+ next : "start"
96
+ }, {
97
+ token : "string.quoted.other",
98
+ regex : simpleString
99
+ }
100
+ ]};
101
+ };
102
+
103
+ oop.inherits(EiffelHighlightRules, TextHighlightRules);
104
+
105
+ exports.EiffelHighlightRules = EiffelHighlightRules;
106
+ });
107
+
108
+ define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"], function(require, exports, module) {
109
+ "use strict";
110
+
111
+ var oop = require("../lib/oop");
112
+ var TextMode = require("./text").Mode;
113
+ var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules;
114
+
115
+ var Mode = function() {
116
+ this.HighlightRules = EiffelHighlightRules;
117
+ this.$behaviour = this.$defaultBehaviour;
118
+ };
119
+ oop.inherits(Mode, TextMode);
120
+
121
+ (function() {
122
+ this.lineCommentStart = "--";
123
+ this.$id = "ace/mode/eiffel";
124
+ }).call(Mode.prototype);
125
+
126
+ exports.Mode = Mode;
127
+
128
+ });
129
+ (function() {
130
+ window.require(["ace/mode/eiffel"], function(m) {
131
+ if (typeof module == "object" && typeof exports == "object" && module) {
132
+ module.exports = m;
133
+ }
134
+ });
135
+ })();
136
+
@@ -0,0 +1,3026 @@
1
+ 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
+ this.$rules = {
27
+ "start" : [{
28
+ include : ["strings", "url", "comments"]
29
+ }, {
30
+ token: "paren.lparen",
31
+ regex: "\\{",
32
+ next: "ruleset"
33
+ }, {
34
+ token: "paren.rparen",
35
+ regex: "\\}"
36
+ }, {
37
+ token: "string",
38
+ regex: "@(?!viewport)",
39
+ next: "media"
40
+ }, {
41
+ token: "keyword",
42
+ regex: "#[a-z0-9-_]+"
43
+ }, {
44
+ token: "keyword",
45
+ regex: "%"
46
+ }, {
47
+ token: "variable",
48
+ regex: "\\.[a-z0-9-_]+"
49
+ }, {
50
+ token: "string",
51
+ regex: ":[a-z0-9-_]+"
52
+ }, {
53
+ token : "constant.numeric",
54
+ regex : numRe
55
+ }, {
56
+ token: "constant",
57
+ regex: "[a-z0-9-_]+"
58
+ }, {
59
+ caseInsensitive: true
60
+ }],
61
+
62
+ "media": [{
63
+ include : ["strings", "url", "comments"]
64
+ }, {
65
+ token: "paren.lparen",
66
+ regex: "\\{",
67
+ next: "start"
68
+ }, {
69
+ token: "paren.rparen",
70
+ regex: "\\}",
71
+ next: "start"
72
+ }, {
73
+ token: "string",
74
+ regex: ";",
75
+ next: "start"
76
+ }, {
77
+ token: "keyword",
78
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
79
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
80
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
81
+ }],
82
+
83
+ "comments" : [{
84
+ token: "comment", // multi line comment
85
+ regex: "\\/\\*",
86
+ push: [{
87
+ token : "comment",
88
+ regex : "\\*\\/",
89
+ next : "pop"
90
+ }, {
91
+ defaultToken : "comment"
92
+ }]
93
+ }],
94
+
95
+ "ruleset" : [{
96
+ regex : "-(webkit|ms|moz|o)-",
97
+ token : "text"
98
+ }, {
99
+ token : "punctuation.operator",
100
+ regex : "[:;]"
101
+ }, {
102
+ token : "paren.rparen",
103
+ regex : "\\}",
104
+ next : "start"
105
+ }, {
106
+ include : ["strings", "url", "comments"]
107
+ }, {
108
+ token : ["constant.numeric", "keyword"],
109
+ 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|%)"
110
+ }, {
111
+ token : "constant.numeric",
112
+ regex : numRe
113
+ }, {
114
+ token : "constant.numeric", // hex6 color
115
+ regex : "#[a-f0-9]{6}"
116
+ }, {
117
+ token : "constant.numeric", // hex3 color
118
+ regex : "#[a-f0-9]{3}"
119
+ }, {
120
+ token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
121
+ regex : pseudoElements
122
+ }, {
123
+ token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
124
+ regex : pseudoClasses
125
+ }, {
126
+ include: "url"
127
+ }, {
128
+ token : keywordMapper,
129
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
130
+ }, {
131
+ caseInsensitive: true
132
+ }],
133
+
134
+ url: [{
135
+ token : "support.function",
136
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
137
+ push: [{
138
+ token : "support.function",
139
+ regex : "\\)",
140
+ next : "pop"
141
+ }, {
142
+ defaultToken: "string"
143
+ }]
144
+ }],
145
+
146
+ strings: [{
147
+ token : "string.start",
148
+ regex : "'",
149
+ push : [{
150
+ token : "string.end",
151
+ regex : "'|$",
152
+ next: "pop"
153
+ }, {
154
+ include : "escapes"
155
+ }, {
156
+ token : "constant.language.escape",
157
+ regex : /\\$/,
158
+ consumeLineEnd: true
159
+ }, {
160
+ defaultToken: "string"
161
+ }]
162
+ }, {
163
+ token : "string.start",
164
+ regex : '"',
165
+ push : [{
166
+ token : "string.end",
167
+ regex : '"|$',
168
+ next: "pop"
169
+ }, {
170
+ include : "escapes"
171
+ }, {
172
+ token : "constant.language.escape",
173
+ regex : /\\$/,
174
+ consumeLineEnd: true
175
+ }, {
176
+ defaultToken: "string"
177
+ }]
178
+ }],
179
+ escapes: [{
180
+ token : "constant.language.escape",
181
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
182
+ }]
183
+
184
+ };
185
+
186
+ this.normalizeRules();
187
+ };
188
+
189
+ oop.inherits(CssHighlightRules, TextHighlightRules);
190
+
191
+ exports.CssHighlightRules = CssHighlightRules;
192
+
193
+ });
194
+
195
+ define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
196
+ "use strict";
197
+
198
+ var oop = require("../lib/oop");
199
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
200
+
201
+ var DocCommentHighlightRules = function() {
202
+ this.$rules = {
203
+ "start" : [ {
204
+ token : "comment.doc.tag",
205
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
206
+ },
207
+ DocCommentHighlightRules.getTagRule(),
208
+ {
209
+ defaultToken : "comment.doc",
210
+ caseInsensitive: true
211
+ }]
212
+ };
213
+ };
214
+
215
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
216
+
217
+ DocCommentHighlightRules.getTagRule = function(start) {
218
+ return {
219
+ token : "comment.doc.tag.storage.type",
220
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
221
+ };
222
+ };
223
+
224
+ DocCommentHighlightRules.getStartRule = function(start) {
225
+ return {
226
+ token : "comment.doc", // doc comment
227
+ regex : "\\/\\*(?=\\*)",
228
+ next : start
229
+ };
230
+ };
231
+
232
+ DocCommentHighlightRules.getEndRule = function (start) {
233
+ return {
234
+ token : "comment.doc", // closing comment
235
+ regex : "\\*\\/",
236
+ next : start
237
+ };
238
+ };
239
+
240
+
241
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
242
+
243
+ });
244
+
245
+ 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) {
246
+ "use strict";
247
+
248
+ var oop = require("../lib/oop");
249
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
250
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
251
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
252
+
253
+ var JavaScriptHighlightRules = function(options) {
254
+ var keywordMapper = this.createKeywordMapper({
255
+ "variable.language":
256
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
257
+ "Namespace|QName|XML|XMLList|" + // E4X
258
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
259
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
260
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
261
+ "SyntaxError|TypeError|URIError|" +
262
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
263
+ "isNaN|parseFloat|parseInt|" +
264
+ "JSON|Math|" + // Other
265
+ "this|arguments|prototype|window|document" , // Pseudo
266
+ "keyword":
267
+ "const|yield|import|get|set|async|await|" +
268
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
269
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
270
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
271
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
272
+ "storage.type":
273
+ "const|let|var|function",
274
+ "constant.language":
275
+ "null|Infinity|NaN|undefined",
276
+ "support.function":
277
+ "alert",
278
+ "constant.language.boolean": "true|false"
279
+ }, "identifier");
280
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
281
+
282
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
283
+ "u[0-9a-fA-F]{4}|" + // unicode
284
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
285
+ "[0-2][0-7]{0,2}|" + // oct
286
+ "3[0-7][0-7]?|" + // oct
287
+ "[4-7][0-7]?|" + //oct
288
+ ".)";
289
+ this.$rules = {
290
+ "no_regex" : [
291
+ DocCommentHighlightRules.getStartRule("doc-start"),
292
+ comments("no_regex"),
293
+ {
294
+ token : "string",
295
+ regex : "'(?=.)",
296
+ next : "qstring"
297
+ }, {
298
+ token : "string",
299
+ regex : '"(?=.)',
300
+ next : "qqstring"
301
+ }, {
302
+ token : "constant.numeric", // hexadecimal, octal and binary
303
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
304
+ }, {
305
+ token : "constant.numeric", // decimal integers and floats
306
+ regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
307
+ }, {
308
+ token : [
309
+ "storage.type", "punctuation.operator", "support.function",
310
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
311
+ ],
312
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
313
+ next: "function_arguments"
314
+ }, {
315
+ token : [
316
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
317
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
318
+ ],
319
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
320
+ next: "function_arguments"
321
+ }, {
322
+ token : [
323
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
324
+ "text", "paren.lparen"
325
+ ],
326
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
327
+ next: "function_arguments"
328
+ }, {
329
+ token : [
330
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
331
+ "keyword.operator", "text",
332
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
333
+ ],
334
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
335
+ next: "function_arguments"
336
+ }, {
337
+ token : [
338
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
339
+ ],
340
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
341
+ next: "function_arguments"
342
+ }, {
343
+ token : [
344
+ "entity.name.function", "text", "punctuation.operator",
345
+ "text", "storage.type", "text", "paren.lparen"
346
+ ],
347
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
348
+ next: "function_arguments"
349
+ }, {
350
+ token : [
351
+ "text", "text", "storage.type", "text", "paren.lparen"
352
+ ],
353
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
354
+ next: "function_arguments"
355
+ }, {
356
+ token : "keyword",
357
+ regex : "from(?=\\s*('|\"))"
358
+ }, {
359
+ token : "keyword",
360
+ regex : "(?:" + kwBeforeRe + ")\\b",
361
+ next : "start"
362
+ }, {
363
+ token : ["support.constant"],
364
+ regex : /that\b/
365
+ }, {
366
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
367
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
368
+ }, {
369
+ token : keywordMapper,
370
+ regex : identifierRe
371
+ }, {
372
+ token : "punctuation.operator",
373
+ regex : /[.](?![.])/,
374
+ next : "property"
375
+ }, {
376
+ token : "storage.type",
377
+ regex : /=>/,
378
+ next : "start"
379
+ }, {
380
+ token : "keyword.operator",
381
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
382
+ next : "start"
383
+ }, {
384
+ token : "punctuation.operator",
385
+ regex : /[?:,;.]/,
386
+ next : "start"
387
+ }, {
388
+ token : "paren.lparen",
389
+ regex : /[\[({]/,
390
+ next : "start"
391
+ }, {
392
+ token : "paren.rparen",
393
+ regex : /[\])}]/
394
+ }, {
395
+ token: "comment",
396
+ regex: /^#!.*$/
397
+ }
398
+ ],
399
+ property: [{
400
+ token : "text",
401
+ regex : "\\s+"
402
+ }, {
403
+ token : [
404
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
405
+ "keyword.operator", "text",
406
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
407
+ ],
408
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
409
+ next: "function_arguments"
410
+ }, {
411
+ token : "punctuation.operator",
412
+ regex : /[.](?![.])/
413
+ }, {
414
+ token : "support.function",
415
+ 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(?=\()/
416
+ }, {
417
+ token : "support.function.dom",
418
+ 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(?=\()/
419
+ }, {
420
+ token : "support.constant",
421
+ 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/
422
+ }, {
423
+ token : "identifier",
424
+ regex : identifierRe
425
+ }, {
426
+ regex: "",
427
+ token: "empty",
428
+ next: "no_regex"
429
+ }
430
+ ],
431
+ "start": [
432
+ DocCommentHighlightRules.getStartRule("doc-start"),
433
+ comments("start"),
434
+ {
435
+ token: "string.regexp",
436
+ regex: "\\/",
437
+ next: "regex"
438
+ }, {
439
+ token : "text",
440
+ regex : "\\s+|^$",
441
+ next : "start"
442
+ }, {
443
+ token: "empty",
444
+ regex: "",
445
+ next: "no_regex"
446
+ }
447
+ ],
448
+ "regex": [
449
+ {
450
+ token: "regexp.keyword.operator",
451
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
452
+ }, {
453
+ token: "string.regexp",
454
+ regex: "/[sxngimy]*",
455
+ next: "no_regex"
456
+ }, {
457
+ token : "invalid",
458
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
459
+ }, {
460
+ token : "constant.language.escape",
461
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
462
+ }, {
463
+ token : "constant.language.delimiter",
464
+ regex: /\|/
465
+ }, {
466
+ token: "constant.language.escape",
467
+ regex: /\[\^?/,
468
+ next: "regex_character_class"
469
+ }, {
470
+ token: "empty",
471
+ regex: "$",
472
+ next: "no_regex"
473
+ }, {
474
+ defaultToken: "string.regexp"
475
+ }
476
+ ],
477
+ "regex_character_class": [
478
+ {
479
+ token: "regexp.charclass.keyword.operator",
480
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
481
+ }, {
482
+ token: "constant.language.escape",
483
+ regex: "]",
484
+ next: "regex"
485
+ }, {
486
+ token: "constant.language.escape",
487
+ regex: "-"
488
+ }, {
489
+ token: "empty",
490
+ regex: "$",
491
+ next: "no_regex"
492
+ }, {
493
+ defaultToken: "string.regexp.charachterclass"
494
+ }
495
+ ],
496
+ "function_arguments": [
497
+ {
498
+ token: "variable.parameter",
499
+ regex: identifierRe
500
+ }, {
501
+ token: "punctuation.operator",
502
+ regex: "[, ]+"
503
+ }, {
504
+ token: "punctuation.operator",
505
+ regex: "$"
506
+ }, {
507
+ token: "empty",
508
+ regex: "",
509
+ next: "no_regex"
510
+ }
511
+ ],
512
+ "qqstring" : [
513
+ {
514
+ token : "constant.language.escape",
515
+ regex : escapedRe
516
+ }, {
517
+ token : "string",
518
+ regex : "\\\\$",
519
+ consumeLineEnd : true
520
+ }, {
521
+ token : "string",
522
+ regex : '"|$',
523
+ next : "no_regex"
524
+ }, {
525
+ defaultToken: "string"
526
+ }
527
+ ],
528
+ "qstring" : [
529
+ {
530
+ token : "constant.language.escape",
531
+ regex : escapedRe
532
+ }, {
533
+ token : "string",
534
+ regex : "\\\\$",
535
+ consumeLineEnd : true
536
+ }, {
537
+ token : "string",
538
+ regex : "'|$",
539
+ next : "no_regex"
540
+ }, {
541
+ defaultToken: "string"
542
+ }
543
+ ]
544
+ };
545
+
546
+
547
+ if (!options || !options.noES6) {
548
+ this.$rules.no_regex.unshift({
549
+ regex: "[{}]", onMatch: function(val, state, stack) {
550
+ this.next = val == "{" ? this.nextState : "";
551
+ if (val == "{" && stack.length) {
552
+ stack.unshift("start", state);
553
+ }
554
+ else if (val == "}" && stack.length) {
555
+ stack.shift();
556
+ this.next = stack.shift();
557
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
558
+ return "paren.quasi.end";
559
+ }
560
+ return val == "{" ? "paren.lparen" : "paren.rparen";
561
+ },
562
+ nextState: "start"
563
+ }, {
564
+ token : "string.quasi.start",
565
+ regex : /`/,
566
+ push : [{
567
+ token : "constant.language.escape",
568
+ regex : escapedRe
569
+ }, {
570
+ token : "paren.quasi.start",
571
+ regex : /\${/,
572
+ push : "start"
573
+ }, {
574
+ token : "string.quasi.end",
575
+ regex : /`/,
576
+ next : "pop"
577
+ }, {
578
+ defaultToken: "string.quasi"
579
+ }]
580
+ });
581
+
582
+ if (!options || options.jsx != false)
583
+ JSX.call(this);
584
+ }
585
+
586
+ this.embedRules(DocCommentHighlightRules, "doc-",
587
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
588
+
589
+ this.normalizeRules();
590
+ };
591
+
592
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
593
+
594
+ function JSX() {
595
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
596
+ var jsxTag = {
597
+ onMatch : function(val, state, stack) {
598
+ var offset = val.charAt(1) == "/" ? 2 : 1;
599
+ if (offset == 1) {
600
+ if (state != this.nextState)
601
+ stack.unshift(this.next, this.nextState, 0);
602
+ else
603
+ stack.unshift(this.next);
604
+ stack[2]++;
605
+ } else if (offset == 2) {
606
+ if (state == this.nextState) {
607
+ stack[1]--;
608
+ if (!stack[1] || stack[1] < 0) {
609
+ stack.shift();
610
+ stack.shift();
611
+ }
612
+ }
613
+ }
614
+ return [{
615
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
616
+ value: val.slice(0, offset)
617
+ }, {
618
+ type: "meta.tag.tag-name.xml",
619
+ value: val.substr(offset)
620
+ }];
621
+ },
622
+ regex : "</?" + tagRegex + "",
623
+ next: "jsxAttributes",
624
+ nextState: "jsx"
625
+ };
626
+ this.$rules.start.unshift(jsxTag);
627
+ var jsxJsRule = {
628
+ regex: "{",
629
+ token: "paren.quasi.start",
630
+ push: "start"
631
+ };
632
+ this.$rules.jsx = [
633
+ jsxJsRule,
634
+ jsxTag,
635
+ {include : "reference"},
636
+ {defaultToken: "string"}
637
+ ];
638
+ this.$rules.jsxAttributes = [{
639
+ token : "meta.tag.punctuation.tag-close.xml",
640
+ regex : "/?>",
641
+ onMatch : function(value, currentState, stack) {
642
+ if (currentState == stack[0])
643
+ stack.shift();
644
+ if (value.length == 2) {
645
+ if (stack[0] == this.nextState)
646
+ stack[1]--;
647
+ if (!stack[1] || stack[1] < 0) {
648
+ stack.splice(0, 2);
649
+ }
650
+ }
651
+ this.next = stack[0] || "start";
652
+ return [{type: this.token, value: value}];
653
+ },
654
+ nextState: "jsx"
655
+ },
656
+ jsxJsRule,
657
+ comments("jsxAttributes"),
658
+ {
659
+ token : "entity.other.attribute-name.xml",
660
+ regex : tagRegex
661
+ }, {
662
+ token : "keyword.operator.attribute-equals.xml",
663
+ regex : "="
664
+ }, {
665
+ token : "text.tag-whitespace.xml",
666
+ regex : "\\s+"
667
+ }, {
668
+ token : "string.attribute-value.xml",
669
+ regex : "'",
670
+ stateName : "jsx_attr_q",
671
+ push : [
672
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
673
+ {include : "reference"},
674
+ {defaultToken : "string.attribute-value.xml"}
675
+ ]
676
+ }, {
677
+ token : "string.attribute-value.xml",
678
+ regex : '"',
679
+ stateName : "jsx_attr_qq",
680
+ push : [
681
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
682
+ {include : "reference"},
683
+ {defaultToken : "string.attribute-value.xml"}
684
+ ]
685
+ },
686
+ jsxTag
687
+ ];
688
+ this.$rules.reference = [{
689
+ token : "constant.language.escape.reference.xml",
690
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
691
+ }];
692
+ }
693
+
694
+ function comments(next) {
695
+ return [
696
+ {
697
+ token : "comment", // multi line comment
698
+ regex : /\/\*/,
699
+ next: [
700
+ DocCommentHighlightRules.getTagRule(),
701
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
702
+ {defaultToken : "comment", caseInsensitive: true}
703
+ ]
704
+ }, {
705
+ token : "comment",
706
+ regex : "\\/\\/",
707
+ next: [
708
+ DocCommentHighlightRules.getTagRule(),
709
+ {token : "comment", regex : "$|^", next : next || "pop"},
710
+ {defaultToken : "comment", caseInsensitive: true}
711
+ ]
712
+ }
713
+ ];
714
+ }
715
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
716
+ });
717
+
718
+ define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
719
+ "use strict";
720
+
721
+ var oop = require("../lib/oop");
722
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
723
+
724
+ var XmlHighlightRules = function(normalize) {
725
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
726
+
727
+ this.$rules = {
728
+ start : [
729
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
730
+ {
731
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
732
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
733
+ },
734
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
735
+ {
736
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
737
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
738
+ },
739
+ {include : "tag"},
740
+ {token : "text.end-tag-open.xml", regex: "</"},
741
+ {token : "text.tag-open.xml", regex: "<"},
742
+ {include : "reference"},
743
+ {defaultToken : "text.xml"}
744
+ ],
745
+
746
+ processing_instruction : [{
747
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
748
+ regex : tagRegex
749
+ }, {
750
+ token : "keyword.operator.decl-attribute-equals.xml",
751
+ regex : "="
752
+ }, {
753
+ include: "whitespace"
754
+ }, {
755
+ include: "string"
756
+ }, {
757
+ token : "punctuation.xml-decl.xml",
758
+ regex : "\\?>",
759
+ next : "start"
760
+ }],
761
+
762
+ doctype : [
763
+ {include : "whitespace"},
764
+ {include : "string"},
765
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
766
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
767
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
768
+ ],
769
+
770
+ int_subset : [{
771
+ token : "text.xml",
772
+ regex : "\\s+"
773
+ }, {
774
+ token: "punctuation.int-subset.xml",
775
+ regex: "]",
776
+ next: "pop"
777
+ }, {
778
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
779
+ regex : "(<\\!)(" + tagRegex + ")",
780
+ push : [{
781
+ token : "text",
782
+ regex : "\\s+"
783
+ },
784
+ {
785
+ token : "punctuation.markup-decl.xml",
786
+ regex : ">",
787
+ next : "pop"
788
+ },
789
+ {include : "string"}]
790
+ }],
791
+
792
+ cdata : [
793
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
794
+ {token : "text.xml", regex : "\\s+"},
795
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
796
+ ],
797
+
798
+ comment : [
799
+ {token : "comment.end.xml", regex : "-->", next : "start"},
800
+ {defaultToken : "comment.xml"}
801
+ ],
802
+
803
+ reference : [{
804
+ token : "constant.language.escape.reference.xml",
805
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
806
+ }],
807
+
808
+ attr_reference : [{
809
+ token : "constant.language.escape.reference.attribute-value.xml",
810
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
811
+ }],
812
+
813
+ tag : [{
814
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
815
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
816
+ next: [
817
+ {include : "attributes"},
818
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
819
+ ]
820
+ }],
821
+
822
+ tag_whitespace : [
823
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
824
+ ],
825
+ whitespace : [
826
+ {token : "text.whitespace.xml", regex : "\\s+"}
827
+ ],
828
+ string: [{
829
+ token : "string.xml",
830
+ regex : "'",
831
+ push : [
832
+ {token : "string.xml", regex: "'", next: "pop"},
833
+ {defaultToken : "string.xml"}
834
+ ]
835
+ }, {
836
+ token : "string.xml",
837
+ regex : '"',
838
+ push : [
839
+ {token : "string.xml", regex: '"', next: "pop"},
840
+ {defaultToken : "string.xml"}
841
+ ]
842
+ }],
843
+
844
+ attributes: [{
845
+ token : "entity.other.attribute-name.xml",
846
+ regex : tagRegex
847
+ }, {
848
+ token : "keyword.operator.attribute-equals.xml",
849
+ regex : "="
850
+ }, {
851
+ include: "tag_whitespace"
852
+ }, {
853
+ include: "attribute_value"
854
+ }],
855
+
856
+ attribute_value: [{
857
+ token : "string.attribute-value.xml",
858
+ regex : "'",
859
+ push : [
860
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
861
+ {include : "attr_reference"},
862
+ {defaultToken : "string.attribute-value.xml"}
863
+ ]
864
+ }, {
865
+ token : "string.attribute-value.xml",
866
+ regex : '"',
867
+ push : [
868
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
869
+ {include : "attr_reference"},
870
+ {defaultToken : "string.attribute-value.xml"}
871
+ ]
872
+ }]
873
+ };
874
+
875
+ if (this.constructor === XmlHighlightRules)
876
+ this.normalizeRules();
877
+ };
878
+
879
+
880
+ (function() {
881
+
882
+ this.embedTagRules = function(HighlightRules, prefix, tag){
883
+ this.$rules.tag.unshift({
884
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
885
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
886
+ next: [
887
+ {include : "attributes"},
888
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
889
+ ]
890
+ });
891
+
892
+ this.$rules[tag + "-end"] = [
893
+ {include : "attributes"},
894
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
895
+ onMatch : function(value, currentState, stack) {
896
+ stack.splice(0);
897
+ return this.token;
898
+ }}
899
+ ];
900
+
901
+ this.embedRules(HighlightRules, prefix, [{
902
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
903
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
904
+ next: tag + "-end"
905
+ }, {
906
+ token: "string.cdata.xml",
907
+ regex : "<\\!\\[CDATA\\["
908
+ }, {
909
+ token: "string.cdata.xml",
910
+ regex : "\\]\\]>"
911
+ }]);
912
+ };
913
+
914
+ }).call(TextHighlightRules.prototype);
915
+
916
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
917
+
918
+ exports.XmlHighlightRules = XmlHighlightRules;
919
+ });
920
+
921
+ 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) {
922
+ "use strict";
923
+
924
+ var oop = require("../lib/oop");
925
+ var lang = require("../lib/lang");
926
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
927
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
928
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
929
+
930
+ var tagMap = lang.createMap({
931
+ a : 'anchor',
932
+ button : 'form',
933
+ form : 'form',
934
+ img : 'image',
935
+ input : 'form',
936
+ label : 'form',
937
+ option : 'form',
938
+ script : 'script',
939
+ select : 'form',
940
+ textarea : 'form',
941
+ style : 'style',
942
+ table : 'table',
943
+ tbody : 'table',
944
+ td : 'table',
945
+ tfoot : 'table',
946
+ th : 'table',
947
+ tr : 'table'
948
+ });
949
+
950
+ var HtmlHighlightRules = function() {
951
+ XmlHighlightRules.call(this);
952
+
953
+ this.addRules({
954
+ attributes: [{
955
+ include : "tag_whitespace"
956
+ }, {
957
+ token : "entity.other.attribute-name.xml",
958
+ regex : "[-_a-zA-Z0-9:.]+"
959
+ }, {
960
+ token : "keyword.operator.attribute-equals.xml",
961
+ regex : "=",
962
+ push : [{
963
+ include: "tag_whitespace"
964
+ }, {
965
+ token : "string.unquoted.attribute-value.html",
966
+ regex : "[^<>='\"`\\s]+",
967
+ next : "pop"
968
+ }, {
969
+ token : "empty",
970
+ regex : "",
971
+ next : "pop"
972
+ }]
973
+ }, {
974
+ include : "attribute_value"
975
+ }],
976
+ tag: [{
977
+ token : function(start, tag) {
978
+ var group = tagMap[tag];
979
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
980
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
981
+ },
982
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
983
+ next: "tag_stuff"
984
+ }],
985
+ tag_stuff: [
986
+ {include : "attributes"},
987
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
988
+ ]
989
+ });
990
+
991
+ this.embedTagRules(CssHighlightRules, "css-", "style");
992
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
993
+
994
+ if (this.constructor === HtmlHighlightRules)
995
+ this.normalizeRules();
996
+ };
997
+
998
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
999
+
1000
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1001
+ });
1002
+
1003
+ define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) {
1004
+ "use strict";
1005
+
1006
+ var Range = require("../range").Range;
1007
+
1008
+ var MatchingBraceOutdent = function() {};
1009
+
1010
+ (function() {
1011
+
1012
+ this.checkOutdent = function(line, input) {
1013
+ if (! /^\s+$/.test(line))
1014
+ return false;
1015
+
1016
+ return /^\s*\}/.test(input);
1017
+ };
1018
+
1019
+ this.autoOutdent = function(doc, row) {
1020
+ var line = doc.getLine(row);
1021
+ var match = line.match(/^(\s*\})/);
1022
+
1023
+ if (!match) return 0;
1024
+
1025
+ var column = match[1].length;
1026
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
1027
+
1028
+ if (!openBracePos || openBracePos.row == row) return 0;
1029
+
1030
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1031
+ doc.replace(new Range(row, 0, row, column-1), indent);
1032
+ };
1033
+
1034
+ this.$getIndent = function(line) {
1035
+ return line.match(/^\s*/)[0];
1036
+ };
1037
+
1038
+ }).call(MatchingBraceOutdent.prototype);
1039
+
1040
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1041
+ });
1042
+
1043
+ define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) {
1044
+ "use strict";
1045
+
1046
+ var oop = require("../../lib/oop");
1047
+ var Range = require("../../range").Range;
1048
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1049
+
1050
+ var FoldMode = exports.FoldMode = function(commentRegex) {
1051
+ if (commentRegex) {
1052
+ this.foldingStartMarker = new RegExp(
1053
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
1054
+ );
1055
+ this.foldingStopMarker = new RegExp(
1056
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
1057
+ );
1058
+ }
1059
+ };
1060
+ oop.inherits(FoldMode, BaseFoldMode);
1061
+
1062
+ (function() {
1063
+
1064
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1065
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1066
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
1067
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1068
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1069
+ this._getFoldWidgetBase = this.getFoldWidget;
1070
+ this.getFoldWidget = function(session, foldStyle, row) {
1071
+ var line = session.getLine(row);
1072
+
1073
+ if (this.singleLineBlockCommentRe.test(line)) {
1074
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1075
+ return "";
1076
+ }
1077
+
1078
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
1079
+
1080
+ if (!fw && this.startRegionRe.test(line))
1081
+ return "start"; // lineCommentRegionStart
1082
+
1083
+ return fw;
1084
+ };
1085
+
1086
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
1087
+ var line = session.getLine(row);
1088
+
1089
+ if (this.startRegionRe.test(line))
1090
+ return this.getCommentRegionBlock(session, line, row);
1091
+
1092
+ var match = line.match(this.foldingStartMarker);
1093
+ if (match) {
1094
+ var i = match.index;
1095
+
1096
+ if (match[1])
1097
+ return this.openingBracketBlock(session, match[1], row, i);
1098
+
1099
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1100
+
1101
+ if (range && !range.isMultiLine()) {
1102
+ if (forceMultiline) {
1103
+ range = this.getSectionRange(session, row);
1104
+ } else if (foldStyle != "all")
1105
+ range = null;
1106
+ }
1107
+
1108
+ return range;
1109
+ }
1110
+
1111
+ if (foldStyle === "markbegin")
1112
+ return;
1113
+
1114
+ var match = line.match(this.foldingStopMarker);
1115
+ if (match) {
1116
+ var i = match.index + match[0].length;
1117
+
1118
+ if (match[1])
1119
+ return this.closingBracketBlock(session, match[1], row, i);
1120
+
1121
+ return session.getCommentFoldRange(row, i, -1);
1122
+ }
1123
+ };
1124
+
1125
+ this.getSectionRange = function(session, row) {
1126
+ var line = session.getLine(row);
1127
+ var startIndent = line.search(/\S/);
1128
+ var startRow = row;
1129
+ var startColumn = line.length;
1130
+ row = row + 1;
1131
+ var endRow = row;
1132
+ var maxRow = session.getLength();
1133
+ while (++row < maxRow) {
1134
+ line = session.getLine(row);
1135
+ var indent = line.search(/\S/);
1136
+ if (indent === -1)
1137
+ continue;
1138
+ if (startIndent > indent)
1139
+ break;
1140
+ var subRange = this.getFoldWidgetRange(session, "all", row);
1141
+
1142
+ if (subRange) {
1143
+ if (subRange.start.row <= startRow) {
1144
+ break;
1145
+ } else if (subRange.isMultiLine()) {
1146
+ row = subRange.end.row;
1147
+ } else if (startIndent == indent) {
1148
+ break;
1149
+ }
1150
+ }
1151
+ endRow = row;
1152
+ }
1153
+
1154
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1155
+ };
1156
+ this.getCommentRegionBlock = function(session, line, row) {
1157
+ var startColumn = line.search(/\s*$/);
1158
+ var maxRow = session.getLength();
1159
+ var startRow = row;
1160
+
1161
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1162
+ var depth = 1;
1163
+ while (++row < maxRow) {
1164
+ line = session.getLine(row);
1165
+ var m = re.exec(line);
1166
+ if (!m) continue;
1167
+ if (m[1]) depth--;
1168
+ else depth++;
1169
+
1170
+ if (!depth) break;
1171
+ }
1172
+
1173
+ var endRow = row;
1174
+ if (endRow > startRow) {
1175
+ return new Range(startRow, startColumn, endRow, line.length);
1176
+ }
1177
+ };
1178
+
1179
+ }).call(FoldMode.prototype);
1180
+
1181
+ });
1182
+
1183
+ 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) {
1184
+ "use strict";
1185
+
1186
+ var oop = require("../lib/oop");
1187
+ var TextMode = require("./text").Mode;
1188
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1189
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1190
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1191
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
1192
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1193
+
1194
+ var Mode = function() {
1195
+ this.HighlightRules = JavaScriptHighlightRules;
1196
+
1197
+ this.$outdent = new MatchingBraceOutdent();
1198
+ this.$behaviour = new CstyleBehaviour();
1199
+ this.foldingRules = new CStyleFoldMode();
1200
+ };
1201
+ oop.inherits(Mode, TextMode);
1202
+
1203
+ (function() {
1204
+
1205
+ this.lineCommentStart = "//";
1206
+ this.blockComment = {start: "/*", end: "*/"};
1207
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
1208
+
1209
+ this.getNextLineIndent = function(state, line, tab) {
1210
+ var indent = this.$getIndent(line);
1211
+
1212
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1213
+ var tokens = tokenizedLine.tokens;
1214
+ var endState = tokenizedLine.state;
1215
+
1216
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
1217
+ return indent;
1218
+ }
1219
+
1220
+ if (state == "start" || state == "no_regex") {
1221
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1222
+ if (match) {
1223
+ indent += tab;
1224
+ }
1225
+ } else if (state == "doc-start") {
1226
+ if (endState == "start" || endState == "no_regex") {
1227
+ return "";
1228
+ }
1229
+ var match = line.match(/^\s*(\/?)\*/);
1230
+ if (match) {
1231
+ if (match[1]) {
1232
+ indent += " ";
1233
+ }
1234
+ indent += "* ";
1235
+ }
1236
+ }
1237
+
1238
+ return indent;
1239
+ };
1240
+
1241
+ this.checkOutdent = function(state, line, input) {
1242
+ return this.$outdent.checkOutdent(line, input);
1243
+ };
1244
+
1245
+ this.autoOutdent = function(state, doc, row) {
1246
+ this.$outdent.autoOutdent(doc, row);
1247
+ };
1248
+
1249
+ this.createWorker = function(session) {
1250
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1251
+ worker.attachToDocument(session.getDocument());
1252
+
1253
+ worker.on("annotate", function(results) {
1254
+ session.setAnnotations(results.data);
1255
+ });
1256
+
1257
+ worker.on("terminate", function() {
1258
+ session.clearAnnotations();
1259
+ });
1260
+
1261
+ return worker;
1262
+ };
1263
+
1264
+ this.$id = "ace/mode/javascript";
1265
+ }).call(Mode.prototype);
1266
+
1267
+ exports.Mode = Mode;
1268
+ });
1269
+
1270
+ define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
1271
+ "use strict";
1272
+
1273
+ var propertyMap = {
1274
+ "background": {"#$0": 1},
1275
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
1276
+ "background-image": {"url('/$0')": 1},
1277
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
1278
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
1279
+ "background-attachment": {"scroll": 1, "fixed": 1},
1280
+ "background-size": {"cover": 1, "contain": 1},
1281
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
1282
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
1283
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
1284
+ "border-color": {"#$0": 1},
1285
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
1286
+ "border-collapse": {"collapse": 1, "separate": 1},
1287
+ "bottom": {"px": 1, "em": 1, "%": 1},
1288
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
1289
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
1290
+ "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},
1291
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
1292
+ "empty-cells": {"show": 1, "hide": 1},
1293
+ "float": {"left": 1, "right": 1, "none": 1},
1294
+ "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},
1295
+ "font-size": {"px": 1, "em": 1, "%": 1},
1296
+ "font-weight": {"bold": 1, "normal": 1},
1297
+ "font-style": {"italic": 1, "normal": 1},
1298
+ "font-variant": {"normal": 1, "small-caps": 1},
1299
+ "height": {"px": 1, "em": 1, "%": 1},
1300
+ "left": {"px": 1, "em": 1, "%": 1},
1301
+ "letter-spacing": {"normal": 1},
1302
+ "line-height": {"normal": 1},
1303
+ "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},
1304
+ "margin": {"px": 1, "em": 1, "%": 1},
1305
+ "margin-right": {"px": 1, "em": 1, "%": 1},
1306
+ "margin-left": {"px": 1, "em": 1, "%": 1},
1307
+ "margin-top": {"px": 1, "em": 1, "%": 1},
1308
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
1309
+ "max-height": {"px": 1, "em": 1, "%": 1},
1310
+ "max-width": {"px": 1, "em": 1, "%": 1},
1311
+ "min-height": {"px": 1, "em": 1, "%": 1},
1312
+ "min-width": {"px": 1, "em": 1, "%": 1},
1313
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1314
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1315
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
1316
+ "padding": {"px": 1, "em": 1, "%": 1},
1317
+ "padding-top": {"px": 1, "em": 1, "%": 1},
1318
+ "padding-right": {"px": 1, "em": 1, "%": 1},
1319
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
1320
+ "padding-left": {"px": 1, "em": 1, "%": 1},
1321
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1322
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
1323
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
1324
+ "right": {"px": 1, "em": 1, "%": 1},
1325
+ "table-layout": {"fixed": 1, "auto": 1},
1326
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
1327
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
1328
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
1329
+ "top": {"px": 1, "em": 1, "%": 1},
1330
+ "vertical-align": {"top": 1, "bottom": 1},
1331
+ "visibility": {"hidden": 1, "visible": 1},
1332
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
1333
+ "width": {"px": 1, "em": 1, "%": 1},
1334
+ "word-spacing": {"normal": 1},
1335
+ "filter": {"alpha(opacity=$0100)": 1},
1336
+
1337
+ "text-shadow": {"$02px 2px 2px #777": 1},
1338
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
1339
+ "-moz-border-radius": 1,
1340
+ "-moz-border-radius-topright": 1,
1341
+ "-moz-border-radius-bottomright": 1,
1342
+ "-moz-border-radius-topleft": 1,
1343
+ "-moz-border-radius-bottomleft": 1,
1344
+ "-webkit-border-radius": 1,
1345
+ "-webkit-border-top-right-radius": 1,
1346
+ "-webkit-border-top-left-radius": 1,
1347
+ "-webkit-border-bottom-right-radius": 1,
1348
+ "-webkit-border-bottom-left-radius": 1,
1349
+ "-moz-box-shadow": 1,
1350
+ "-webkit-box-shadow": 1,
1351
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1352
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
1353
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
1354
+ };
1355
+
1356
+ var CssCompletions = function() {
1357
+
1358
+ };
1359
+
1360
+ (function() {
1361
+
1362
+ this.completionsDefined = false;
1363
+
1364
+ this.defineCompletions = function() {
1365
+ if (document) {
1366
+ var style = document.createElement('c').style;
1367
+
1368
+ for (var i in style) {
1369
+ if (typeof style[i] !== 'string')
1370
+ continue;
1371
+
1372
+ var name = i.replace(/[A-Z]/g, function(x) {
1373
+ return '-' + x.toLowerCase();
1374
+ });
1375
+
1376
+ if (!propertyMap.hasOwnProperty(name))
1377
+ propertyMap[name] = 1;
1378
+ }
1379
+ }
1380
+
1381
+ this.completionsDefined = true;
1382
+ };
1383
+
1384
+ this.getCompletions = function(state, session, pos, prefix) {
1385
+ if (!this.completionsDefined) {
1386
+ this.defineCompletions();
1387
+ }
1388
+
1389
+ var token = session.getTokenAt(pos.row, pos.column);
1390
+
1391
+ if (!token)
1392
+ return [];
1393
+ if (state==='ruleset'){
1394
+ var line = session.getLine(pos.row).substr(0, pos.column);
1395
+ if (/:[^;]+$/.test(line)) {
1396
+ /([\w\-]+):[^:]*$/.test(line);
1397
+
1398
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1399
+ } else {
1400
+ return this.getPropertyCompletions(state, session, pos, prefix);
1401
+ }
1402
+ }
1403
+
1404
+ return [];
1405
+ };
1406
+
1407
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
1408
+ var properties = Object.keys(propertyMap);
1409
+ return properties.map(function(property){
1410
+ return {
1411
+ caption: property,
1412
+ snippet: property + ': $0;',
1413
+ meta: "property",
1414
+ score: 1000000
1415
+ };
1416
+ });
1417
+ };
1418
+
1419
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
1420
+ var line = session.getLine(pos.row).substr(0, pos.column);
1421
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1422
+
1423
+ if (!property)
1424
+ return [];
1425
+ var values = [];
1426
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1427
+ values = Object.keys(propertyMap[property]);
1428
+ }
1429
+ return values.map(function(value){
1430
+ return {
1431
+ caption: value,
1432
+ snippet: value,
1433
+ meta: "property value",
1434
+ score: 1000000
1435
+ };
1436
+ });
1437
+ };
1438
+
1439
+ }).call(CssCompletions.prototype);
1440
+
1441
+ exports.CssCompletions = CssCompletions;
1442
+ });
1443
+
1444
+ 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) {
1445
+ "use strict";
1446
+
1447
+ var oop = require("../../lib/oop");
1448
+ var Behaviour = require("../behaviour").Behaviour;
1449
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1450
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1451
+
1452
+ var CssBehaviour = function () {
1453
+
1454
+ this.inherit(CstyleBehaviour);
1455
+
1456
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1457
+ if (text === ':' && editor.selection.isEmpty()) {
1458
+ var cursor = editor.getCursorPosition();
1459
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1460
+ var token = iterator.getCurrentToken();
1461
+ if (token && token.value.match(/\s+/)) {
1462
+ token = iterator.stepBackward();
1463
+ }
1464
+ if (token && token.type === 'support.type') {
1465
+ var line = session.doc.getLine(cursor.row);
1466
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1467
+ if (rightChar === ':') {
1468
+ return {
1469
+ text: '',
1470
+ selection: [1, 1]
1471
+ };
1472
+ }
1473
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1474
+ return {
1475
+ text: ':;',
1476
+ selection: [1, 1]
1477
+ };
1478
+ }
1479
+ }
1480
+ }
1481
+ });
1482
+
1483
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1484
+ var selected = session.doc.getTextRange(range);
1485
+ if (!range.isMultiLine() && selected === ':') {
1486
+ var cursor = editor.getCursorPosition();
1487
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1488
+ var token = iterator.getCurrentToken();
1489
+ if (token && token.value.match(/\s+/)) {
1490
+ token = iterator.stepBackward();
1491
+ }
1492
+ if (token && token.type === 'support.type') {
1493
+ var line = session.doc.getLine(range.start.row);
1494
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1495
+ if (rightChar === ';') {
1496
+ range.end.column ++;
1497
+ return range;
1498
+ }
1499
+ }
1500
+ }
1501
+ });
1502
+
1503
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1504
+ if (text === ';' && editor.selection.isEmpty()) {
1505
+ var cursor = editor.getCursorPosition();
1506
+ var line = session.doc.getLine(cursor.row);
1507
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1508
+ if (rightChar === ';') {
1509
+ return {
1510
+ text: '',
1511
+ selection: [1, 1]
1512
+ };
1513
+ }
1514
+ }
1515
+ });
1516
+
1517
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1518
+ if (text === '!' && editor.selection.isEmpty()) {
1519
+ var cursor = editor.getCursorPosition();
1520
+ var line = session.doc.getLine(cursor.row);
1521
+
1522
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1523
+ return {
1524
+ text: '!important',
1525
+ selection: [10, 10]
1526
+ };
1527
+ }
1528
+ }
1529
+ });
1530
+
1531
+ };
1532
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1533
+
1534
+ exports.CssBehaviour = CssBehaviour;
1535
+ });
1536
+
1537
+ 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) {
1538
+ "use strict";
1539
+
1540
+ var oop = require("../lib/oop");
1541
+ var TextMode = require("./text").Mode;
1542
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1543
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1544
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1545
+ var CssCompletions = require("./css_completions").CssCompletions;
1546
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1547
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1548
+
1549
+ var Mode = function() {
1550
+ this.HighlightRules = CssHighlightRules;
1551
+ this.$outdent = new MatchingBraceOutdent();
1552
+ this.$behaviour = new CssBehaviour();
1553
+ this.$completer = new CssCompletions();
1554
+ this.foldingRules = new CStyleFoldMode();
1555
+ };
1556
+ oop.inherits(Mode, TextMode);
1557
+
1558
+ (function() {
1559
+
1560
+ this.foldingRules = "cStyle";
1561
+ this.blockComment = {start: "/*", end: "*/"};
1562
+
1563
+ this.getNextLineIndent = function(state, line, tab) {
1564
+ var indent = this.$getIndent(line);
1565
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1566
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
1567
+ return indent;
1568
+ }
1569
+
1570
+ var match = line.match(/^.*\{\s*$/);
1571
+ if (match) {
1572
+ indent += tab;
1573
+ }
1574
+
1575
+ return indent;
1576
+ };
1577
+
1578
+ this.checkOutdent = function(state, line, input) {
1579
+ return this.$outdent.checkOutdent(line, input);
1580
+ };
1581
+
1582
+ this.autoOutdent = function(state, doc, row) {
1583
+ this.$outdent.autoOutdent(doc, row);
1584
+ };
1585
+
1586
+ this.getCompletions = function(state, session, pos, prefix) {
1587
+ return this.$completer.getCompletions(state, session, pos, prefix);
1588
+ };
1589
+
1590
+ this.createWorker = function(session) {
1591
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1592
+ worker.attachToDocument(session.getDocument());
1593
+
1594
+ worker.on("annotate", function(e) {
1595
+ session.setAnnotations(e.data);
1596
+ });
1597
+
1598
+ worker.on("terminate", function() {
1599
+ session.clearAnnotations();
1600
+ });
1601
+
1602
+ return worker;
1603
+ };
1604
+
1605
+ this.$id = "ace/mode/css";
1606
+ }).call(Mode.prototype);
1607
+
1608
+ exports.Mode = Mode;
1609
+
1610
+ });
1611
+
1612
+ define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
1613
+ "use strict";
1614
+
1615
+ var oop = require("../../lib/oop");
1616
+ var Behaviour = require("../behaviour").Behaviour;
1617
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1618
+ var lang = require("../../lib/lang");
1619
+
1620
+ function is(token, type) {
1621
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1622
+ }
1623
+
1624
+ var XmlBehaviour = function () {
1625
+
1626
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1627
+ if (text == '"' || text == "'") {
1628
+ var quote = text;
1629
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1630
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1631
+ return {
1632
+ text: quote + selected + quote,
1633
+ selection: false
1634
+ };
1635
+ }
1636
+
1637
+ var cursor = editor.getCursorPosition();
1638
+ var line = session.doc.getLine(cursor.row);
1639
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1640
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1641
+ var token = iterator.getCurrentToken();
1642
+
1643
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1644
+ return {
1645
+ text: "",
1646
+ selection: [1, 1]
1647
+ };
1648
+ }
1649
+
1650
+ if (!token)
1651
+ token = iterator.stepBackward();
1652
+
1653
+ if (!token)
1654
+ return;
1655
+
1656
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1657
+ token = iterator.stepBackward();
1658
+ }
1659
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1660
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1661
+ return {
1662
+ text: quote + quote,
1663
+ selection: [1, 1]
1664
+ };
1665
+ }
1666
+ }
1667
+ });
1668
+
1669
+ this.add("string_dquotes", "deletion", function(state, action, editor, session, range) {
1670
+ var selected = session.doc.getTextRange(range);
1671
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1672
+ var line = session.doc.getLine(range.start.row);
1673
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1674
+ if (rightChar == selected) {
1675
+ range.end.column++;
1676
+ return range;
1677
+ }
1678
+ }
1679
+ });
1680
+
1681
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1682
+ if (text == '>') {
1683
+ var position = editor.getSelectionRange().start;
1684
+ var iterator = new TokenIterator(session, position.row, position.column);
1685
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1686
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1687
+ return;
1688
+ if (is(token, "reference.attribute-value"))
1689
+ return;
1690
+ if (is(token, "attribute-value")) {
1691
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1692
+ if (position.column < tokenEndColumn)
1693
+ return;
1694
+ if (position.column == tokenEndColumn) {
1695
+ var nextToken = iterator.stepForward();
1696
+ if (nextToken && is(nextToken, "attribute-value"))
1697
+ return;
1698
+ iterator.stepBackward();
1699
+ }
1700
+ }
1701
+
1702
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1703
+ return;
1704
+ while (!is(token, "tag-name")) {
1705
+ token = iterator.stepBackward();
1706
+ if (token.value == "<") {
1707
+ token = iterator.stepForward();
1708
+ break;
1709
+ }
1710
+ }
1711
+
1712
+ var tokenRow = iterator.getCurrentTokenRow();
1713
+ var tokenColumn = iterator.getCurrentTokenColumn();
1714
+ if (is(iterator.stepBackward(), "end-tag-open"))
1715
+ return;
1716
+
1717
+ var element = token.value;
1718
+ if (tokenRow == position.row)
1719
+ element = element.substring(0, position.column - tokenColumn);
1720
+
1721
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1722
+ return;
1723
+
1724
+ return {
1725
+ text: ">" + "</" + element + ">",
1726
+ selection: [1, 1]
1727
+ };
1728
+ }
1729
+ });
1730
+
1731
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1732
+ if (text == "\n") {
1733
+ var cursor = editor.getCursorPosition();
1734
+ var line = session.getLine(cursor.row);
1735
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1736
+ var token = iterator.getCurrentToken();
1737
+
1738
+ if (token && token.type.indexOf("tag-close") !== -1) {
1739
+ if (token.value == "/>")
1740
+ return;
1741
+ while (token && token.type.indexOf("tag-name") === -1) {
1742
+ token = iterator.stepBackward();
1743
+ }
1744
+
1745
+ if (!token) {
1746
+ return;
1747
+ }
1748
+
1749
+ var tag = token.value;
1750
+ var row = iterator.getCurrentTokenRow();
1751
+ token = iterator.stepBackward();
1752
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1753
+ return;
1754
+ }
1755
+
1756
+ if (this.voidElements && !this.voidElements[tag]) {
1757
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
1758
+ var line = session.getLine(row);
1759
+ var nextIndent = this.$getIndent(line);
1760
+ var indent = nextIndent + session.getTabString();
1761
+
1762
+ if (nextToken && nextToken.value === "</") {
1763
+ return {
1764
+ text: "\n" + indent + "\n" + nextIndent,
1765
+ selection: [1, indent.length, 1, indent.length]
1766
+ };
1767
+ } else {
1768
+ return {
1769
+ text: "\n" + indent
1770
+ };
1771
+ }
1772
+ }
1773
+ }
1774
+ }
1775
+ });
1776
+
1777
+ };
1778
+
1779
+ oop.inherits(XmlBehaviour, Behaviour);
1780
+
1781
+ exports.XmlBehaviour = XmlBehaviour;
1782
+ });
1783
+
1784
+ define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) {
1785
+ "use strict";
1786
+
1787
+ var oop = require("../../lib/oop");
1788
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1789
+
1790
+ var FoldMode = exports.FoldMode = function(defaultMode, subModes) {
1791
+ this.defaultMode = defaultMode;
1792
+ this.subModes = subModes;
1793
+ };
1794
+ oop.inherits(FoldMode, BaseFoldMode);
1795
+
1796
+ (function() {
1797
+
1798
+
1799
+ this.$getMode = function(state) {
1800
+ if (typeof state != "string")
1801
+ state = state[0];
1802
+ for (var key in this.subModes) {
1803
+ if (state.indexOf(key) === 0)
1804
+ return this.subModes[key];
1805
+ }
1806
+ return null;
1807
+ };
1808
+
1809
+ this.$tryMode = function(state, session, foldStyle, row) {
1810
+ var mode = this.$getMode(state);
1811
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1812
+ };
1813
+
1814
+ this.getFoldWidget = function(session, foldStyle, row) {
1815
+ return (
1816
+ this.$tryMode(session.getState(row-1), session, foldStyle, row) ||
1817
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
1818
+ this.defaultMode.getFoldWidget(session, foldStyle, row)
1819
+ );
1820
+ };
1821
+
1822
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
1823
+ var mode = this.$getMode(session.getState(row-1));
1824
+
1825
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1826
+ mode = this.$getMode(session.getState(row));
1827
+
1828
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1829
+ mode = this.defaultMode;
1830
+
1831
+ return mode.getFoldWidgetRange(session, foldStyle, row);
1832
+ };
1833
+
1834
+ }).call(FoldMode.prototype);
1835
+
1836
+ });
1837
+
1838
+ 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) {
1839
+ "use strict";
1840
+
1841
+ var oop = require("../../lib/oop");
1842
+ var lang = require("../../lib/lang");
1843
+ var Range = require("../../range").Range;
1844
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1845
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1846
+
1847
+ var FoldMode = exports.FoldMode = function(voidElements, optionalEndTags) {
1848
+ BaseFoldMode.call(this);
1849
+ this.voidElements = voidElements || {};
1850
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1851
+ if (optionalEndTags)
1852
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1853
+
1854
+ };
1855
+ oop.inherits(FoldMode, BaseFoldMode);
1856
+
1857
+ var Tag = function() {
1858
+ this.tagName = "";
1859
+ this.closing = false;
1860
+ this.selfClosing = false;
1861
+ this.start = {row: 0, column: 0};
1862
+ this.end = {row: 0, column: 0};
1863
+ };
1864
+
1865
+ function is(token, type) {
1866
+ return token.type.lastIndexOf(type + ".xml") > -1;
1867
+ }
1868
+
1869
+ (function() {
1870
+
1871
+ this.getFoldWidget = function(session, foldStyle, row) {
1872
+ var tag = this._getFirstTagInLine(session, row);
1873
+
1874
+ if (!tag)
1875
+ return this.getCommentFoldWidget(session, row);
1876
+
1877
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1878
+ return foldStyle == "markbeginend" ? "end" : "";
1879
+
1880
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1881
+ return "";
1882
+
1883
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1884
+ return "";
1885
+
1886
+ return "start";
1887
+ };
1888
+
1889
+ this.getCommentFoldWidget = function(session, row) {
1890
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1891
+ return "start";
1892
+ return "";
1893
+ };
1894
+ this._getFirstTagInLine = function(session, row) {
1895
+ var tokens = session.getTokens(row);
1896
+ var tag = new Tag();
1897
+
1898
+ for (var i = 0; i < tokens.length; i++) {
1899
+ var token = tokens[i];
1900
+ if (is(token, "tag-open")) {
1901
+ tag.end.column = tag.start.column + token.value.length;
1902
+ tag.closing = is(token, "end-tag-open");
1903
+ token = tokens[++i];
1904
+ if (!token)
1905
+ return null;
1906
+ tag.tagName = token.value;
1907
+ tag.end.column += token.value.length;
1908
+ for (i++; i < tokens.length; i++) {
1909
+ token = tokens[i];
1910
+ tag.end.column += token.value.length;
1911
+ if (is(token, "tag-close")) {
1912
+ tag.selfClosing = token.value == '/>';
1913
+ break;
1914
+ }
1915
+ }
1916
+ return tag;
1917
+ } else if (is(token, "tag-close")) {
1918
+ tag.selfClosing = token.value == '/>';
1919
+ return tag;
1920
+ }
1921
+ tag.start.column += token.value.length;
1922
+ }
1923
+
1924
+ return null;
1925
+ };
1926
+
1927
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
1928
+ var tokens = session.getTokens(row);
1929
+ var column = 0;
1930
+ for (var i = 0; i < tokens.length; i++) {
1931
+ var token = tokens[i];
1932
+ column += token.value.length;
1933
+ if (column < startColumn)
1934
+ continue;
1935
+ if (is(token, "end-tag-open")) {
1936
+ token = tokens[i + 1];
1937
+ if (token && token.value == tagName)
1938
+ return true;
1939
+ }
1940
+ }
1941
+ return false;
1942
+ };
1943
+ this._readTagForward = function(iterator) {
1944
+ var token = iterator.getCurrentToken();
1945
+ if (!token)
1946
+ return null;
1947
+
1948
+ var tag = new Tag();
1949
+ do {
1950
+ if (is(token, "tag-open")) {
1951
+ tag.closing = is(token, "end-tag-open");
1952
+ tag.start.row = iterator.getCurrentTokenRow();
1953
+ tag.start.column = iterator.getCurrentTokenColumn();
1954
+ } else if (is(token, "tag-name")) {
1955
+ tag.tagName = token.value;
1956
+ } else if (is(token, "tag-close")) {
1957
+ tag.selfClosing = token.value == "/>";
1958
+ tag.end.row = iterator.getCurrentTokenRow();
1959
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1960
+ iterator.stepForward();
1961
+ return tag;
1962
+ }
1963
+ } while(token = iterator.stepForward());
1964
+
1965
+ return null;
1966
+ };
1967
+
1968
+ this._readTagBackward = function(iterator) {
1969
+ var token = iterator.getCurrentToken();
1970
+ if (!token)
1971
+ return null;
1972
+
1973
+ var tag = new Tag();
1974
+ do {
1975
+ if (is(token, "tag-open")) {
1976
+ tag.closing = is(token, "end-tag-open");
1977
+ tag.start.row = iterator.getCurrentTokenRow();
1978
+ tag.start.column = iterator.getCurrentTokenColumn();
1979
+ iterator.stepBackward();
1980
+ return tag;
1981
+ } else if (is(token, "tag-name")) {
1982
+ tag.tagName = token.value;
1983
+ } else if (is(token, "tag-close")) {
1984
+ tag.selfClosing = token.value == "/>";
1985
+ tag.end.row = iterator.getCurrentTokenRow();
1986
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
1987
+ }
1988
+ } while(token = iterator.stepBackward());
1989
+
1990
+ return null;
1991
+ };
1992
+
1993
+ this._pop = function(stack, tag) {
1994
+ while (stack.length) {
1995
+
1996
+ var top = stack[stack.length-1];
1997
+ if (!tag || top.tagName == tag.tagName) {
1998
+ return stack.pop();
1999
+ }
2000
+ else if (this.optionalEndTags.hasOwnProperty(top.tagName)) {
2001
+ stack.pop();
2002
+ continue;
2003
+ } else {
2004
+ return null;
2005
+ }
2006
+ }
2007
+ };
2008
+
2009
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2010
+ var firstTag = this._getFirstTagInLine(session, row);
2011
+
2012
+ if (!firstTag) {
2013
+ return this.getCommentFoldWidget(session, row)
2014
+ && session.getCommentFoldRange(row, session.getLine(row).length);
2015
+ }
2016
+
2017
+ var isBackward = firstTag.closing || firstTag.selfClosing;
2018
+ var stack = [];
2019
+ var tag;
2020
+
2021
+ if (!isBackward) {
2022
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
2023
+ var start = {
2024
+ row: row,
2025
+ column: firstTag.start.column + firstTag.tagName.length + 2
2026
+ };
2027
+ if (firstTag.start.row == firstTag.end.row)
2028
+ start.column = firstTag.end.column;
2029
+ while (tag = this._readTagForward(iterator)) {
2030
+ if (tag.selfClosing) {
2031
+ if (!stack.length) {
2032
+ tag.start.column += tag.tagName.length + 2;
2033
+ tag.end.column -= 2;
2034
+ return Range.fromPoints(tag.start, tag.end);
2035
+ } else
2036
+ continue;
2037
+ }
2038
+
2039
+ if (tag.closing) {
2040
+ this._pop(stack, tag);
2041
+ if (stack.length == 0)
2042
+ return Range.fromPoints(start, tag.start);
2043
+ }
2044
+ else {
2045
+ stack.push(tag);
2046
+ }
2047
+ }
2048
+ }
2049
+ else {
2050
+ var iterator = new TokenIterator(session, row, firstTag.end.column);
2051
+ var end = {
2052
+ row: row,
2053
+ column: firstTag.start.column
2054
+ };
2055
+
2056
+ while (tag = this._readTagBackward(iterator)) {
2057
+ if (tag.selfClosing) {
2058
+ if (!stack.length) {
2059
+ tag.start.column += tag.tagName.length + 2;
2060
+ tag.end.column -= 2;
2061
+ return Range.fromPoints(tag.start, tag.end);
2062
+ } else
2063
+ continue;
2064
+ }
2065
+
2066
+ if (!tag.closing) {
2067
+ this._pop(stack, tag);
2068
+ if (stack.length == 0) {
2069
+ tag.start.column += tag.tagName.length + 2;
2070
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
2071
+ tag.start.column = tag.end.column;
2072
+ return Range.fromPoints(tag.start, end);
2073
+ }
2074
+ }
2075
+ else {
2076
+ stack.push(tag);
2077
+ }
2078
+ }
2079
+ }
2080
+
2081
+ };
2082
+
2083
+ }).call(FoldMode.prototype);
2084
+
2085
+ });
2086
+
2087
+ 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) {
2088
+ "use strict";
2089
+
2090
+ var oop = require("../../lib/oop");
2091
+ var MixedFoldMode = require("./mixed").FoldMode;
2092
+ var XmlFoldMode = require("./xml").FoldMode;
2093
+ var CStyleFoldMode = require("./cstyle").FoldMode;
2094
+
2095
+ var FoldMode = exports.FoldMode = function(voidElements, optionalTags) {
2096
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
2097
+ "js-": new CStyleFoldMode(),
2098
+ "css-": new CStyleFoldMode()
2099
+ });
2100
+ };
2101
+
2102
+ oop.inherits(FoldMode, MixedFoldMode);
2103
+
2104
+ });
2105
+
2106
+ define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
2107
+ "use strict";
2108
+
2109
+ var TokenIterator = require("../token_iterator").TokenIterator;
2110
+
2111
+ var commonAttributes = [
2112
+ "accesskey",
2113
+ "class",
2114
+ "contenteditable",
2115
+ "contextmenu",
2116
+ "dir",
2117
+ "draggable",
2118
+ "dropzone",
2119
+ "hidden",
2120
+ "id",
2121
+ "inert",
2122
+ "itemid",
2123
+ "itemprop",
2124
+ "itemref",
2125
+ "itemscope",
2126
+ "itemtype",
2127
+ "lang",
2128
+ "spellcheck",
2129
+ "style",
2130
+ "tabindex",
2131
+ "title",
2132
+ "translate"
2133
+ ];
2134
+
2135
+ var eventAttributes = [
2136
+ "onabort",
2137
+ "onblur",
2138
+ "oncancel",
2139
+ "oncanplay",
2140
+ "oncanplaythrough",
2141
+ "onchange",
2142
+ "onclick",
2143
+ "onclose",
2144
+ "oncontextmenu",
2145
+ "oncuechange",
2146
+ "ondblclick",
2147
+ "ondrag",
2148
+ "ondragend",
2149
+ "ondragenter",
2150
+ "ondragleave",
2151
+ "ondragover",
2152
+ "ondragstart",
2153
+ "ondrop",
2154
+ "ondurationchange",
2155
+ "onemptied",
2156
+ "onended",
2157
+ "onerror",
2158
+ "onfocus",
2159
+ "oninput",
2160
+ "oninvalid",
2161
+ "onkeydown",
2162
+ "onkeypress",
2163
+ "onkeyup",
2164
+ "onload",
2165
+ "onloadeddata",
2166
+ "onloadedmetadata",
2167
+ "onloadstart",
2168
+ "onmousedown",
2169
+ "onmousemove",
2170
+ "onmouseout",
2171
+ "onmouseover",
2172
+ "onmouseup",
2173
+ "onmousewheel",
2174
+ "onpause",
2175
+ "onplay",
2176
+ "onplaying",
2177
+ "onprogress",
2178
+ "onratechange",
2179
+ "onreset",
2180
+ "onscroll",
2181
+ "onseeked",
2182
+ "onseeking",
2183
+ "onselect",
2184
+ "onshow",
2185
+ "onstalled",
2186
+ "onsubmit",
2187
+ "onsuspend",
2188
+ "ontimeupdate",
2189
+ "onvolumechange",
2190
+ "onwaiting"
2191
+ ];
2192
+
2193
+ var globalAttributes = commonAttributes.concat(eventAttributes);
2194
+
2195
+ var attributeMap = {
2196
+ "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},
2197
+ "abbr": {},
2198
+ "address": {},
2199
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
2200
+ "article": {"pubdate": 1},
2201
+ "aside": {},
2202
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
2203
+ "b": {},
2204
+ "base": {"href": 1, "target": 1},
2205
+ "bdi": {},
2206
+ "bdo": {},
2207
+ "blockquote": {"cite": 1},
2208
+ "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},
2209
+ "br": {},
2210
+ "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}},
2211
+ "canvas": {"width": 1, "height": 1},
2212
+ "caption": {},
2213
+ "cite": {},
2214
+ "code": {},
2215
+ "col": {"span": 1},
2216
+ "colgroup": {"span": 1},
2217
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
2218
+ "data": {},
2219
+ "datalist": {},
2220
+ "dd": {},
2221
+ "del": {"cite": 1, "datetime": 1},
2222
+ "details": {"open": 1},
2223
+ "dfn": {},
2224
+ "dialog": {"open": 1},
2225
+ "div": {},
2226
+ "dl": {},
2227
+ "dt": {},
2228
+ "em": {},
2229
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
2230
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
2231
+ "figcaption": {},
2232
+ "figure": {},
2233
+ "footer": {},
2234
+ "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}},
2235
+ "h1": {},
2236
+ "h2": {},
2237
+ "h3": {},
2238
+ "h4": {},
2239
+ "h5": {},
2240
+ "h6": {},
2241
+ "head": {},
2242
+ "header": {},
2243
+ "hr": {},
2244
+ "html": {"manifest": 1},
2245
+ "i": {},
2246
+ "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}},
2247
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
2248
+ "input": {
2249
+ "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},
2250
+ "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},
2251
+ "ins": {"cite": 1, "datetime": 1},
2252
+ "kbd": {},
2253
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
2254
+ "label": {"form": 1, "for": 1},
2255
+ "legend": {},
2256
+ "li": {"value": 1},
2257
+ "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},
2258
+ "main": {},
2259
+ "map": {"name": 1},
2260
+ "mark": {},
2261
+ "math": {},
2262
+ "menu": {"type": 1, "label": 1},
2263
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
2264
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
2265
+ "nav": {},
2266
+ "noscript": {"href": 1},
2267
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
2268
+ "ol": {"start": 1, "reversed": 1},
2269
+ "optgroup": {"disabled": 1, "label": 1},
2270
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
2271
+ "output": {"for": 1, "form": 1, "name": 1},
2272
+ "p": {},
2273
+ "param": {"name": 1, "value": 1},
2274
+ "pre": {},
2275
+ "progress": {"value": 1, "max": 1},
2276
+ "q": {"cite": 1},
2277
+ "rp": {},
2278
+ "rt": {},
2279
+ "ruby": {},
2280
+ "s": {},
2281
+ "samp": {},
2282
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
2283
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
2284
+ "small": {},
2285
+ "source": {"src": 1, "type": 1, "media": 1},
2286
+ "span": {},
2287
+ "strong": {},
2288
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
2289
+ "sub": {},
2290
+ "sup": {},
2291
+ "svg": {},
2292
+ "table": {"summary": 1},
2293
+ "tbody": {},
2294
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
2295
+ "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}},
2296
+ "tfoot": {},
2297
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
2298
+ "thead": {},
2299
+ "time": {"datetime": 1},
2300
+ "title": {},
2301
+ "tr": {},
2302
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
2303
+ "section": {},
2304
+ "summary": {},
2305
+ "u": {},
2306
+ "ul": {},
2307
+ "var": {},
2308
+ "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}},
2309
+ "wbr": {}
2310
+ };
2311
+
2312
+ var elements = Object.keys(attributeMap);
2313
+
2314
+ function is(token, type) {
2315
+ return token.type.lastIndexOf(type + ".xml") > -1;
2316
+ }
2317
+
2318
+ function findTagName(session, pos) {
2319
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2320
+ var token = iterator.getCurrentToken();
2321
+ while (token && !is(token, "tag-name")){
2322
+ token = iterator.stepBackward();
2323
+ }
2324
+ if (token)
2325
+ return token.value;
2326
+ }
2327
+
2328
+ function findAttributeName(session, pos) {
2329
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2330
+ var token = iterator.getCurrentToken();
2331
+ while (token && !is(token, "attribute-name")){
2332
+ token = iterator.stepBackward();
2333
+ }
2334
+ if (token)
2335
+ return token.value;
2336
+ }
2337
+
2338
+ var HtmlCompletions = function() {
2339
+
2340
+ };
2341
+
2342
+ (function() {
2343
+
2344
+ this.getCompletions = function(state, session, pos, prefix) {
2345
+ var token = session.getTokenAt(pos.row, pos.column);
2346
+
2347
+ if (!token)
2348
+ return [];
2349
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2350
+ return this.getTagCompletions(state, session, pos, prefix);
2351
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2352
+ return this.getAttributeCompletions(state, session, pos, prefix);
2353
+ if (is(token, "attribute-value"))
2354
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2355
+ var line = session.getLine(pos.row).substr(0, pos.column);
2356
+ if (/&[a-z]*$/i.test(line))
2357
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2358
+
2359
+ return [];
2360
+ };
2361
+
2362
+ this.getTagCompletions = function(state, session, pos, prefix) {
2363
+ return elements.map(function(element){
2364
+ return {
2365
+ value: element,
2366
+ meta: "tag",
2367
+ score: 1000000
2368
+ };
2369
+ });
2370
+ };
2371
+
2372
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
2373
+ var tagName = findTagName(session, pos);
2374
+ if (!tagName)
2375
+ return [];
2376
+ var attributes = globalAttributes;
2377
+ if (tagName in attributeMap) {
2378
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2379
+ }
2380
+ return attributes.map(function(attribute){
2381
+ return {
2382
+ caption: attribute,
2383
+ snippet: attribute + '="$0"',
2384
+ meta: "attribute",
2385
+ score: 1000000
2386
+ };
2387
+ });
2388
+ };
2389
+
2390
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
2391
+ var tagName = findTagName(session, pos);
2392
+ var attributeName = findAttributeName(session, pos);
2393
+
2394
+ if (!tagName)
2395
+ return [];
2396
+ var values = [];
2397
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2398
+ values = Object.keys(attributeMap[tagName][attributeName]);
2399
+ }
2400
+ return values.map(function(value){
2401
+ return {
2402
+ caption: value,
2403
+ snippet: value,
2404
+ meta: "attribute value",
2405
+ score: 1000000
2406
+ };
2407
+ });
2408
+ };
2409
+
2410
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
2411
+ 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;'];
2412
+
2413
+ return values.map(function(value){
2414
+ return {
2415
+ caption: value,
2416
+ snippet: value,
2417
+ meta: "html entity",
2418
+ score: 1000000
2419
+ };
2420
+ });
2421
+ };
2422
+
2423
+ }).call(HtmlCompletions.prototype);
2424
+
2425
+ exports.HtmlCompletions = HtmlCompletions;
2426
+ });
2427
+
2428
+ 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) {
2429
+ "use strict";
2430
+
2431
+ var oop = require("../lib/oop");
2432
+ var lang = require("../lib/lang");
2433
+ var TextMode = require("./text").Mode;
2434
+ var JavaScriptMode = require("./javascript").Mode;
2435
+ var CssMode = require("./css").Mode;
2436
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2437
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2438
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2439
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2440
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2441
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2442
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2443
+
2444
+ var Mode = function(options) {
2445
+ this.fragmentContext = options && options.fragmentContext;
2446
+ this.HighlightRules = HtmlHighlightRules;
2447
+ this.$behaviour = new XmlBehaviour();
2448
+ this.$completer = new HtmlCompletions();
2449
+
2450
+ this.createModeDelegates({
2451
+ "js-": JavaScriptMode,
2452
+ "css-": CssMode
2453
+ });
2454
+
2455
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2456
+ };
2457
+ oop.inherits(Mode, TextMode);
2458
+
2459
+ (function() {
2460
+
2461
+ this.blockComment = {start: "<!--", end: "-->"};
2462
+
2463
+ this.voidElements = lang.arrayToMap(voidElements);
2464
+
2465
+ this.getNextLineIndent = function(state, line, tab) {
2466
+ return this.$getIndent(line);
2467
+ };
2468
+
2469
+ this.checkOutdent = function(state, line, input) {
2470
+ return false;
2471
+ };
2472
+
2473
+ this.getCompletions = function(state, session, pos, prefix) {
2474
+ return this.$completer.getCompletions(state, session, pos, prefix);
2475
+ };
2476
+
2477
+ this.createWorker = function(session) {
2478
+ if (this.constructor != Mode)
2479
+ return;
2480
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2481
+ worker.attachToDocument(session.getDocument());
2482
+
2483
+ if (this.fragmentContext)
2484
+ worker.call("setOptions", [{context: this.fragmentContext}]);
2485
+
2486
+ worker.on("error", function(e) {
2487
+ session.setAnnotations(e.data);
2488
+ });
2489
+
2490
+ worker.on("terminate", function() {
2491
+ session.clearAnnotations();
2492
+ });
2493
+
2494
+ return worker;
2495
+ };
2496
+
2497
+ this.$id = "ace/mode/html";
2498
+ }).call(Mode.prototype);
2499
+
2500
+ exports.Mode = Mode;
2501
+ });
2502
+
2503
+ define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
2504
+ "use strict";
2505
+
2506
+ var oop = require("../lib/oop");
2507
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2508
+ var constantOtherSymbol = exports.constantOtherSymbol = {
2509
+ token : "constant.other.symbol.ruby", // symbol
2510
+ regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
2511
+ };
2512
+
2513
+ var qString = exports.qString = {
2514
+ token : "string", // single line
2515
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2516
+ };
2517
+
2518
+ var qqString = exports.qqString = {
2519
+ token : "string", // single line
2520
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2521
+ };
2522
+
2523
+ var tString = exports.tString = {
2524
+ token : "string", // backtick string
2525
+ regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
2526
+ };
2527
+
2528
+ var constantNumericHex = exports.constantNumericHex = {
2529
+ token : "constant.numeric", // hex
2530
+ regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
2531
+ };
2532
+
2533
+ var constantNumericFloat = exports.constantNumericFloat = {
2534
+ token : "constant.numeric", // float
2535
+ regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"
2536
+ };
2537
+
2538
+ var instanceVariable = exports.instanceVariable = {
2539
+ token : "variable.instance", // instance variable
2540
+ regex : "@{1,2}[a-zA-Z_\\d]+"
2541
+ };
2542
+
2543
+ var RubyHighlightRules = function() {
2544
+
2545
+ var builtinFunctions = (
2546
+ "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
2547
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
2548
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
2549
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
2550
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
2551
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
2552
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
2553
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
2554
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
2555
+ "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
2556
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
2557
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
2558
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
2559
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
2560
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
2561
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
2562
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
2563
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
2564
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
2565
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
2566
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
2567
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
2568
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
2569
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
2570
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
2571
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
2572
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
2573
+ "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
2574
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
2575
+ "has_many|has_one|belongs_to|has_and_belongs_to_many"
2576
+ );
2577
+
2578
+ var keywords = (
2579
+ "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
2580
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
2581
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield"
2582
+ );
2583
+
2584
+ var buildinConstants = (
2585
+ "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
2586
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING"
2587
+ );
2588
+
2589
+ var builtinVariables = (
2590
+ "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" +
2591
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self"
2592
+ );
2593
+
2594
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
2595
+ "keyword": keywords,
2596
+ "constant.language": buildinConstants,
2597
+ "variable.language": builtinVariables,
2598
+ "support.function": builtinFunctions,
2599
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
2600
+ }, "identifier");
2601
+ this.$rules = {
2602
+ "start" : [
2603
+ {
2604
+ token : "comment",
2605
+ regex : "#.*$"
2606
+ }, {
2607
+ token : "comment", // multi line comment
2608
+ regex : "^=begin(?:$|\\s.*$)",
2609
+ next : "comment"
2610
+ }, {
2611
+ token : "string.regexp",
2612
+ regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"
2613
+ },
2614
+
2615
+ [{
2616
+ regex: "[{}]", onMatch: function(val, state, stack) {
2617
+ this.next = val == "{" ? this.nextState : "";
2618
+ if (val == "{" && stack.length) {
2619
+ stack.unshift("start", state);
2620
+ return "paren.lparen";
2621
+ }
2622
+ if (val == "}" && stack.length) {
2623
+ stack.shift();
2624
+ this.next = stack.shift();
2625
+ if (this.next.indexOf("string") != -1)
2626
+ return "paren.end";
2627
+ }
2628
+ return val == "{" ? "paren.lparen" : "paren.rparen";
2629
+ },
2630
+ nextState: "start"
2631
+ }, {
2632
+ token : "string.start",
2633
+ regex : /"/,
2634
+ push : [{
2635
+ token : "constant.language.escape",
2636
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
2637
+ }, {
2638
+ token : "paren.start",
2639
+ regex : /#{/,
2640
+ push : "start"
2641
+ }, {
2642
+ token : "string.end",
2643
+ regex : /"/,
2644
+ next : "pop"
2645
+ }, {
2646
+ defaultToken: "string"
2647
+ }]
2648
+ }, {
2649
+ token : "string.start",
2650
+ regex : /`/,
2651
+ push : [{
2652
+ token : "constant.language.escape",
2653
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
2654
+ }, {
2655
+ token : "paren.start",
2656
+ regex : /#{/,
2657
+ push : "start"
2658
+ }, {
2659
+ token : "string.end",
2660
+ regex : /`/,
2661
+ next : "pop"
2662
+ }, {
2663
+ defaultToken: "string"
2664
+ }]
2665
+ }, {
2666
+ token : "string.start",
2667
+ regex : /'/,
2668
+ push : [{
2669
+ token : "constant.language.escape",
2670
+ regex : /\\['\\]/
2671
+ }, {
2672
+ token : "string.end",
2673
+ regex : /'/,
2674
+ next : "pop"
2675
+ }, {
2676
+ defaultToken: "string"
2677
+ }]
2678
+ }],
2679
+ {
2680
+ token : "text", // namespaces aren't symbols
2681
+ regex : "::"
2682
+ }, {
2683
+ token : "variable.instance", // instance variable
2684
+ regex : "@{1,2}[a-zA-Z_\\d]+"
2685
+ }, {
2686
+ token : "support.class", // class name
2687
+ regex : "[A-Z][a-zA-Z_\\d]+"
2688
+ },
2689
+
2690
+ constantOtherSymbol,
2691
+ constantNumericHex,
2692
+ constantNumericFloat,
2693
+
2694
+ {
2695
+ token : "constant.language.boolean",
2696
+ regex : "(?:true|false)\\b"
2697
+ }, {
2698
+ token : keywordMapper,
2699
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
2700
+ }, {
2701
+ token : "punctuation.separator.key-value",
2702
+ regex : "=>"
2703
+ }, {
2704
+ stateName: "heredoc",
2705
+ onMatch : function(value, currentState, stack) {
2706
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
2707
+ var tokens = value.split(this.splitRegex);
2708
+ stack.push(next, tokens[3]);
2709
+ return [
2710
+ {type:"constant", value: tokens[1]},
2711
+ {type:"string", value: tokens[2]},
2712
+ {type:"support.class", value: tokens[3]},
2713
+ {type:"string", value: tokens[4]}
2714
+ ];
2715
+ },
2716
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
2717
+ rules: {
2718
+ heredoc: [{
2719
+ onMatch: function(value, currentState, stack) {
2720
+ if (value === stack[1]) {
2721
+ stack.shift();
2722
+ stack.shift();
2723
+ this.next = stack[0] || "start";
2724
+ return "support.class";
2725
+ }
2726
+ this.next = "";
2727
+ return "string";
2728
+ },
2729
+ regex: ".*$",
2730
+ next: "start"
2731
+ }],
2732
+ indentedHeredoc: [{
2733
+ token: "string",
2734
+ regex: "^ +"
2735
+ }, {
2736
+ onMatch: function(value, currentState, stack) {
2737
+ if (value === stack[1]) {
2738
+ stack.shift();
2739
+ stack.shift();
2740
+ this.next = stack[0] || "start";
2741
+ return "support.class";
2742
+ }
2743
+ this.next = "";
2744
+ return "string";
2745
+ },
2746
+ regex: ".*$",
2747
+ next: "start"
2748
+ }]
2749
+ }
2750
+ }, {
2751
+ regex : "$",
2752
+ token : "empty",
2753
+ next : function(currentState, stack) {
2754
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
2755
+ return stack[0];
2756
+ return currentState;
2757
+ }
2758
+ }, {
2759
+ token : "string.character",
2760
+ regex : "\\B\\?."
2761
+ }, {
2762
+ token : "keyword.operator",
2763
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
2764
+ }, {
2765
+ token : "paren.lparen",
2766
+ regex : "[[({]"
2767
+ }, {
2768
+ token : "paren.rparen",
2769
+ regex : "[\\])}]"
2770
+ }, {
2771
+ token : "text",
2772
+ regex : "\\s+"
2773
+ }
2774
+ ],
2775
+ "comment" : [
2776
+ {
2777
+ token : "comment", // closing comment
2778
+ regex : "^=end(?:$|\\s.*$)",
2779
+ next : "start"
2780
+ }, {
2781
+ token : "comment", // comment spanning whole line
2782
+ regex : ".+"
2783
+ }
2784
+ ]
2785
+ };
2786
+
2787
+ this.normalizeRules();
2788
+ };
2789
+
2790
+ oop.inherits(RubyHighlightRules, TextHighlightRules);
2791
+
2792
+ exports.RubyHighlightRules = RubyHighlightRules;
2793
+ });
2794
+
2795
+ define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
2796
+ "use strict";
2797
+
2798
+ var oop = require("../../lib/oop");
2799
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2800
+ var Range = require("../../range").Range;
2801
+
2802
+ var FoldMode = exports.FoldMode = function() {};
2803
+ oop.inherits(FoldMode, BaseFoldMode);
2804
+
2805
+ (function() {
2806
+
2807
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
2808
+ var range = this.indentationBlock(session, row);
2809
+ if (range)
2810
+ return range;
2811
+
2812
+ var re = /\S/;
2813
+ var line = session.getLine(row);
2814
+ var startLevel = line.search(re);
2815
+ if (startLevel == -1 || line[startLevel] != "#")
2816
+ return;
2817
+
2818
+ var startColumn = line.length;
2819
+ var maxRow = session.getLength();
2820
+ var startRow = row;
2821
+ var endRow = row;
2822
+
2823
+ while (++row < maxRow) {
2824
+ line = session.getLine(row);
2825
+ var level = line.search(re);
2826
+
2827
+ if (level == -1)
2828
+ continue;
2829
+
2830
+ if (line[level] != "#")
2831
+ break;
2832
+
2833
+ endRow = row;
2834
+ }
2835
+
2836
+ if (endRow > startRow) {
2837
+ var endColumn = session.getLine(endRow).length;
2838
+ return new Range(startRow, startColumn, endRow, endColumn);
2839
+ }
2840
+ };
2841
+ this.getFoldWidget = function(session, foldStyle, row) {
2842
+ var line = session.getLine(row);
2843
+ var indent = line.search(/\S/);
2844
+ var next = session.getLine(row + 1);
2845
+ var prev = session.getLine(row - 1);
2846
+ var prevIndent = prev.search(/\S/);
2847
+ var nextIndent = next.search(/\S/);
2848
+
2849
+ if (indent == -1) {
2850
+ session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : "";
2851
+ return "";
2852
+ }
2853
+ if (prevIndent == -1) {
2854
+ if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") {
2855
+ session.foldWidgets[row - 1] = "";
2856
+ session.foldWidgets[row + 1] = "";
2857
+ return "start";
2858
+ }
2859
+ } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") {
2860
+ if (session.getLine(row - 2).search(/\S/) == -1) {
2861
+ session.foldWidgets[row - 1] = "start";
2862
+ session.foldWidgets[row + 1] = "";
2863
+ return "";
2864
+ }
2865
+ }
2866
+
2867
+ if (prevIndent!= -1 && prevIndent < indent)
2868
+ session.foldWidgets[row - 1] = "start";
2869
+ else
2870
+ session.foldWidgets[row - 1] = "";
2871
+
2872
+ if (indent < nextIndent)
2873
+ return "start";
2874
+ else
2875
+ return "";
2876
+ };
2877
+
2878
+ }).call(FoldMode.prototype);
2879
+
2880
+ });
2881
+
2882
+ define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
2883
+ "use strict";
2884
+
2885
+ var oop = require("../lib/oop");
2886
+ var TextMode = require("./text").Mode;
2887
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
2888
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
2889
+ var Range = require("../range").Range;
2890
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
2891
+ var FoldMode = require("./folding/coffee").FoldMode;
2892
+
2893
+ var Mode = function() {
2894
+ this.HighlightRules = RubyHighlightRules;
2895
+ this.$outdent = new MatchingBraceOutdent();
2896
+ this.$behaviour = new CstyleBehaviour();
2897
+ this.foldingRules = new FoldMode();
2898
+ };
2899
+ oop.inherits(Mode, TextMode);
2900
+
2901
+ (function() {
2902
+
2903
+
2904
+ this.lineCommentStart = "#";
2905
+
2906
+ this.getNextLineIndent = function(state, line, tab) {
2907
+ var indent = this.$getIndent(line);
2908
+
2909
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
2910
+ var tokens = tokenizedLine.tokens;
2911
+
2912
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
2913
+ return indent;
2914
+ }
2915
+
2916
+ if (state == "start") {
2917
+ var match = line.match(/^.*[\{\(\[]\s*$/);
2918
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
2919
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
2920
+ var startingConditional = line.match(/^\s*(if|else|when)\s*/);
2921
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
2922
+ indent += tab;
2923
+ }
2924
+ }
2925
+
2926
+ return indent;
2927
+ };
2928
+
2929
+ this.checkOutdent = function(state, line, input) {
2930
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
2931
+ };
2932
+
2933
+ this.autoOutdent = function(state, session, row) {
2934
+ var line = session.getLine(row);
2935
+ if (/}/.test(line))
2936
+ return this.$outdent.autoOutdent(session, row);
2937
+ var indent = this.$getIndent(line);
2938
+ var prevLine = session.getLine(row - 1);
2939
+ var prevIndent = this.$getIndent(prevLine);
2940
+ var tab = session.getTabString();
2941
+ if (prevIndent.length <= indent.length) {
2942
+ if (indent.slice(-tab.length) == tab)
2943
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
2944
+ }
2945
+ };
2946
+
2947
+ this.$id = "ace/mode/ruby";
2948
+ }).call(Mode.prototype);
2949
+
2950
+ exports.Mode = Mode;
2951
+ });
2952
+
2953
+ define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
2954
+ "use strict";
2955
+
2956
+ var oop = require("../lib/oop");
2957
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2958
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2959
+
2960
+ var EjsHighlightRules = function(start, end) {
2961
+ HtmlHighlightRules.call(this);
2962
+
2963
+ if (!start)
2964
+ start = "(?:<%|<\\?|{{)";
2965
+ if (!end)
2966
+ end = "(?:%>|\\?>|}})";
2967
+
2968
+ for (var i in this.$rules) {
2969
+ this.$rules[i].unshift({
2970
+ token : "markup.list.meta.tag",
2971
+ regex : start + "(?![>}])[-=]?",
2972
+ push : "ejs-start"
2973
+ });
2974
+ }
2975
+
2976
+ this.embedRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "ejs-", [{
2977
+ token : "markup.list.meta.tag",
2978
+ regex : "-?" + end,
2979
+ next : "pop"
2980
+ }, {
2981
+ token: "comment",
2982
+ regex: "//.*?" + end,
2983
+ next: "pop"
2984
+ }]);
2985
+
2986
+ this.normalizeRules();
2987
+ };
2988
+
2989
+
2990
+ oop.inherits(EjsHighlightRules, HtmlHighlightRules);
2991
+
2992
+ exports.EjsHighlightRules = EjsHighlightRules;
2993
+
2994
+
2995
+ var oop = require("../lib/oop");
2996
+ var HtmlMode = require("./html").Mode;
2997
+ var JavaScriptMode = require("./javascript").Mode;
2998
+ var CssMode = require("./css").Mode;
2999
+ var RubyMode = require("./ruby").Mode;
3000
+
3001
+ var Mode = function() {
3002
+ HtmlMode.call(this);
3003
+ this.HighlightRules = EjsHighlightRules;
3004
+ this.createModeDelegates({
3005
+ "js-": JavaScriptMode,
3006
+ "css-": CssMode,
3007
+ "ejs-": JavaScriptMode
3008
+ });
3009
+ };
3010
+ oop.inherits(Mode, HtmlMode);
3011
+
3012
+ (function() {
3013
+
3014
+ this.$id = "ace/mode/ejs";
3015
+ }).call(Mode.prototype);
3016
+
3017
+ exports.Mode = Mode;
3018
+ });
3019
+ (function() {
3020
+ window.require(["ace/mode/ejs"], function(m) {
3021
+ if (typeof module == "object" && typeof exports == "object" && module) {
3022
+ module.exports = m;
3023
+ }
3024
+ });
3025
+ })();
3026
+