jquery-ace-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. data/README.md +36 -0
  2. data/lib/jquery-ace-rails.rb +5 -0
  3. data/lib/jquery-ace-rails/engine.rb +4 -0
  4. data/lib/jquery-ace-rails/version.rb +3 -0
  5. data/vendor/assets/javascripts/jquery-ace/jquery-ace.coffee +126 -0
  6. data/vendor/assets/javascripts/jquery-ace/jquery-ace.js +195 -0
  7. data/vendor/assets/javascripts/jquery-ace/jquery-ace.min.js +1 -0
  8. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ace.js +11 -0
  9. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-static_highlight.js +1 -0
  10. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/ext-textarea.js +1 -0
  11. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-emacs.js +1 -0
  12. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/keybinding-vim.js +1 -0
  13. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-abap.js +1 -0
  14. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-asciidoc.js +1 -0
  15. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c9search.js +1 -0
  16. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-c_cpp.js +1 -0
  17. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-clojure.js +1 -0
  18. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coffee.js +1 -0
  19. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-coldfusion.js +1 -0
  20. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-csharp.js +1 -0
  21. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-css.js +1 -0
  22. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dart.js +1 -0
  23. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-diff.js +1 -0
  24. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-dot.js +1 -0
  25. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-glsl.js +1 -0
  26. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-golang.js +1 -0
  27. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-groovy.js +1 -0
  28. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haml.js +1 -0
  29. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-haxe.js +1 -0
  30. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-html.js +1 -0
  31. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jade.js +1 -0
  32. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-java.js +1 -0
  33. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-javascript.js +1 -0
  34. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-json.js +1 -0
  35. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsp.js +1 -0
  36. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-jsx.js +1 -0
  37. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-latex.js +1 -0
  38. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-less.js +1 -0
  39. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-liquid.js +1 -0
  40. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lisp.js +1 -0
  41. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lua.js +1 -0
  42. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-luapage.js +1 -0
  43. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-lucene.js +1 -0
  44. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-makefile.js +1 -0
  45. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-markdown.js +1 -0
  46. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-objectivec.js +1 -0
  47. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ocaml.js +1 -0
  48. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-perl.js +1 -0
  49. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-pgsql.js +1 -0
  50. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-php.js +1 -0
  51. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-powershell.js +1 -0
  52. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-python.js +1 -0
  53. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-r.js +1 -0
  54. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rdoc.js +1 -0
  55. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-rhtml.js +1 -0
  56. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-ruby.js +1 -0
  57. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scad.js +1 -0
  58. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scala.js +1 -0
  59. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-scss.js +1 -0
  60. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sh.js +1 -0
  61. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-sql.js +1 -0
  62. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-stylus.js +1 -0
  63. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-svg.js +1 -0
  64. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tcl.js +1 -0
  65. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-tex.js +1 -0
  66. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-text.js +0 -0
  67. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-textile.js +1 -0
  68. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-typescript.js +1 -0
  69. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xml.js +1 -0
  70. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-xquery.js +1 -0
  71. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/mode-yaml.js +1 -0
  72. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-ambiance.js +1 -0
  73. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chaos.js +1 -0
  74. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-chrome.js +1 -0
  75. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds.js +1 -0
  76. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-clouds_midnight.js +1 -0
  77. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-cobalt.js +1 -0
  78. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-crimson_editor.js +1 -0
  79. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dawn.js +1 -0
  80. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-dreamweaver.js +1 -0
  81. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-eclipse.js +1 -0
  82. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-github.js +1 -0
  83. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-idle_fingers.js +1 -0
  84. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-kr.js +1 -0
  85. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore.js +1 -0
  86. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-merbivore_soft.js +1 -0
  87. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-mono_industrial.js +1 -0
  88. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-monokai.js +1 -0
  89. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-pastel_on_dark.js +1 -0
  90. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_dark.js +1 -0
  91. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-solarized_light.js +1 -0
  92. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-textmate.js +1 -0
  93. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow.js +1 -0
  94. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night.js +1 -0
  95. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_blue.js +1 -0
  96. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_bright.js +1 -0
  97. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-tomorrow_night_eighties.js +1 -0
  98. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-twilight.js +1 -0
  99. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-vibrant_ink.js +1 -0
  100. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/theme-xcode.js +1 -0
  101. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-coffee.js +1 -0
  102. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-css.js +1 -0
  103. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-javascript.js +1 -0
  104. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-json.js +1 -0
  105. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src-min-noconflict/worker-xquery.js +1 -0
  106. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ace.js +14262 -0
  107. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-static_highlight.js +96 -0
  108. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/ext-textarea.js +591 -0
  109. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-emacs.js +364 -0
  110. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/keybinding-vim.js +1646 -0
  111. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-abap.js +259 -0
  112. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-asciidoc.js +372 -0
  113. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c9search.js +187 -0
  114. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-c_cpp.js +765 -0
  115. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-clojure.js +325 -0
  116. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coffee.js +520 -0
  117. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-coldfusion.js +1725 -0
  118. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-csharp.js +605 -0
  119. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-css.js +680 -0
  120. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dart.js +279 -0
  121. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-diff.js +163 -0
  122. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-dot.js +348 -0
  123. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-glsl.js +838 -0
  124. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-golang.js +660 -0
  125. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-groovy.js +1082 -0
  126. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haml.js +440 -0
  127. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-haxe.js +610 -0
  128. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-html.js +1850 -0
  129. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jade.js +2035 -0
  130. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-java.js +1041 -0
  131. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-javascript.js +921 -0
  132. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-json.js +574 -0
  133. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsp.js +1371 -0
  134. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-jsx.js +635 -0
  135. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-latex.js +217 -0
  136. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-less.js +394 -0
  137. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-liquid.js +921 -0
  138. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lisp.js +142 -0
  139. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lua.js +609 -0
  140. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-luapage.js +2463 -0
  141. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-lucene.js +64 -0
  142. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-makefile.js +314 -0
  143. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-markdown.js +2228 -0
  144. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-objectivec.js +655 -0
  145. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ocaml.js +448 -0
  146. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-perl.js +319 -0
  147. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-pgsql.js +928 -0
  148. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-php.js +2299 -0
  149. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-powershell.js +611 -0
  150. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-python.js +290 -0
  151. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-r.js +410 -0
  152. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rdoc.js +189 -0
  153. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-rhtml.js +2138 -0
  154. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-ruby.js +410 -0
  155. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scad.js +698 -0
  156. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scala.js +1070 -0
  157. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-scss.js +416 -0
  158. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sh.js +232 -0
  159. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-sql.js +145 -0
  160. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-stylus.js +474 -0
  161. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-svg.js +1490 -0
  162. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tcl.js +342 -0
  163. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-tex.js +171 -0
  164. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-text.js +0 -0
  165. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-textile.js +175 -0
  166. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-typescript.js +1011 -0
  167. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xml.js +792 -0
  168. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-xquery.js +676 -0
  169. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/mode-yaml.js +298 -0
  170. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-ambiance.js +202 -0
  171. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chaos.js +167 -0
  172. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-chrome.js +161 -0
  173. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds.js +135 -0
  174. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-clouds_midnight.js +136 -0
  175. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-cobalt.js +150 -0
  176. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-crimson_editor.js +154 -0
  177. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dawn.js +146 -0
  178. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-dreamweaver.js +173 -0
  179. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-eclipse.js +122 -0
  180. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-github.js +136 -0
  181. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-idle_fingers.js +136 -0
  182. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-kr.js +143 -0
  183. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore.js +135 -0
  184. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-merbivore_soft.js +136 -0
  185. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-mono_industrial.js +148 -0
  186. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-monokai.js +140 -0
  187. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-pastel_on_dark.js +148 -0
  188. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_dark.js +128 -0
  189. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-solarized_light.js +131 -0
  190. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-textmate.js +163 -0
  191. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow.js +147 -0
  192. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night.js +147 -0
  193. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_blue.js +145 -0
  194. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_bright.js +147 -0
  195. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-tomorrow_night_eighties.js +144 -0
  196. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-twilight.js +147 -0
  197. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-vibrant_ink.js +131 -0
  198. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/theme-xcode.js +125 -0
  199. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-coffee.js +6985 -0
  200. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-css.js +7741 -0
  201. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-javascript.js +6387 -0
  202. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-json.js +2228 -0
  203. data/vendor/assets/javascripts/jquery-ace/vendor/ace-build/src/worker-xquery.js +21719 -0
  204. data/vendor/assets/javascripts/jquery-ace/vendor/jquery-1.8.3.min.js +2 -0
  205. metadata +249 -0
@@ -0,0 +1,175 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2010, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ * ***** END LICENSE BLOCK ***** */
30
+
31
+ define('ace/mode/textile', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
32
+
33
+
34
+ var oop = require("../lib/oop");
35
+ var TextMode = require("./text").Mode;
36
+ var Tokenizer = require("../tokenizer").Tokenizer;
37
+ var TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
38
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
39
+
40
+ var Mode = function() {
41
+ this.$tokenizer = new Tokenizer(new TextileHighlightRules().getRules());
42
+ this.$outdent = new MatchingBraceOutdent();
43
+ };
44
+ oop.inherits(Mode, TextMode);
45
+
46
+ (function() {
47
+ this.getNextLineIndent = function(state, line, tab) {
48
+ if (state == "intag")
49
+ return tab;
50
+
51
+ return "";
52
+ };
53
+
54
+ this.checkOutdent = function(state, line, input) {
55
+ return this.$outdent.checkOutdent(line, input);
56
+ };
57
+
58
+ this.autoOutdent = function(state, doc, row) {
59
+ this.$outdent.autoOutdent(doc, row);
60
+ };
61
+
62
+ }).call(Mode.prototype);
63
+
64
+ exports.Mode = Mode;
65
+
66
+ });
67
+
68
+ define('ace/mode/textile_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
69
+
70
+
71
+ var oop = require("../lib/oop");
72
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
73
+
74
+ var TextileHighlightRules = function() {
75
+ this.$rules = {
76
+ "start" : [
77
+ {
78
+ token : function(value) {
79
+ if (value.charAt(0) == "h")
80
+ return "markup.heading." + value.charAt(1);
81
+ else
82
+ return "markup.heading";
83
+ },
84
+ regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre",
85
+ next : "blocktag"
86
+ },
87
+ {
88
+ token : "keyword",
89
+ regex : "[\\*]+|[#]+"
90
+ },
91
+ {
92
+ token : "text",
93
+ regex : ".+"
94
+ }
95
+ ],
96
+ "blocktag" : [
97
+ {
98
+ token : "keyword",
99
+ regex : "\\. ",
100
+ next : "start"
101
+ },
102
+ {
103
+ token : "keyword",
104
+ regex : "\\(",
105
+ next : "blocktagproperties"
106
+ }
107
+ ],
108
+ "blocktagproperties" : [
109
+ {
110
+ token : "keyword",
111
+ regex : "\\)",
112
+ next : "blocktag"
113
+ },
114
+ {
115
+ token : "string",
116
+ regex : "[a-zA-Z0-9\\-_]+"
117
+ },
118
+ {
119
+ token : "keyword",
120
+ regex : "#"
121
+ }
122
+ ]
123
+ };
124
+ };
125
+
126
+ oop.inherits(TextileHighlightRules, TextHighlightRules);
127
+
128
+ exports.TextileHighlightRules = TextileHighlightRules;
129
+
130
+ });
131
+
132
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
133
+
134
+
135
+ var Range = require("../range").Range;
136
+
137
+ var MatchingBraceOutdent = function() {};
138
+
139
+ (function() {
140
+
141
+ this.checkOutdent = function(line, input) {
142
+ if (! /^\s+$/.test(line))
143
+ return false;
144
+
145
+ return /^\s*\}/.test(input);
146
+ };
147
+
148
+ this.autoOutdent = function(doc, row) {
149
+ var line = doc.getLine(row);
150
+ var match = line.match(/^(\s*\})/);
151
+
152
+ if (!match) return 0;
153
+
154
+ var column = match[1].length;
155
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
156
+
157
+ if (!openBracePos || openBracePos.row == row) return 0;
158
+
159
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
160
+ doc.replace(new Range(row, 0, row, column-1), indent);
161
+ };
162
+
163
+ this.$getIndent = function(line) {
164
+ var match = line.match(/^(\s+)/);
165
+ if (match) {
166
+ return match[1];
167
+ }
168
+
169
+ return "";
170
+ };
171
+
172
+ }).call(MatchingBraceOutdent.prototype);
173
+
174
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
175
+ });
@@ -0,0 +1,1011 @@
1
+ /* ***** BEGIN LICENSE BLOCK *****
2
+ * Distributed under the BSD license:
3
+ *
4
+ * Copyright (c) 2012, Ajax.org B.V.
5
+ * All rights reserved.
6
+ *
7
+ * Redistribution and use in source and binary forms, with or without
8
+ * modification, are permitted provided that the following conditions are met:
9
+ * * Redistributions of source code must retain the above copyright
10
+ * notice, this list of conditions and the following disclaimer.
11
+ * * Redistributions in binary form must reproduce the above copyright
12
+ * notice, this list of conditions and the following disclaimer in the
13
+ * documentation and/or other materials provided with the distribution.
14
+ * * Neither the name of Ajax.org B.V. nor the
15
+ * names of its contributors may be used to endorse or promote products
16
+ * derived from this software without specific prior written permission.
17
+ *
18
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
+ * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
22
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ *
29
+ *
30
+ * Contributor(s):
31
+ *
32
+ *
33
+ *
34
+ * ***** END LICENSE BLOCK ***** */
35
+
36
+ define('ace/mode/typescript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/typescript_highlight_rules', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/mode/matching_brace_outdent'], function(require, exports, module) {
37
+
38
+
39
+ var oop = require("../lib/oop");
40
+ var jsMode = require("./javascript").Mode;
41
+ var Tokenizer = require("../tokenizer").Tokenizer;
42
+ var TypeScriptHighlightRules = require("./typescript_highlight_rules").TypeScriptHighlightRules;
43
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
44
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
45
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
46
+
47
+ var Mode = function() {
48
+ var highlighter = new TypeScriptHighlightRules();
49
+
50
+ this.$tokenizer = new Tokenizer(highlighter.getRules());
51
+ this.$outdent = new MatchingBraceOutdent();
52
+ this.$behaviour = new CstyleBehaviour();
53
+ this.foldingRules = new CStyleFoldMode();
54
+ };
55
+ oop.inherits(Mode, jsMode);
56
+
57
+ (function() {
58
+ this.createWorker = function(session) {
59
+ return null;
60
+ };
61
+ }).call(Mode.prototype);
62
+
63
+ exports.Mode = Mode;
64
+ });
65
+
66
+ define('ace/mode/javascript', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
67
+
68
+
69
+ var oop = require("../lib/oop");
70
+ var TextMode = require("./text").Mode;
71
+ var Tokenizer = require("../tokenizer").Tokenizer;
72
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
73
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
74
+ var Range = require("../range").Range;
75
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
76
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
77
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
78
+
79
+ var Mode = function() {
80
+ this.$tokenizer = new Tokenizer(new JavaScriptHighlightRules().getRules());
81
+ this.$outdent = new MatchingBraceOutdent();
82
+ this.$behaviour = new CstyleBehaviour();
83
+ this.foldingRules = new CStyleFoldMode();
84
+ };
85
+ oop.inherits(Mode, TextMode);
86
+
87
+ (function() {
88
+
89
+
90
+ this.toggleCommentLines = function(state, doc, startRow, endRow) {
91
+ var outdent = true;
92
+ var re = /^(\s*)\/\//;
93
+
94
+ for (var i=startRow; i<= endRow; i++) {
95
+ if (!re.test(doc.getLine(i))) {
96
+ outdent = false;
97
+ break;
98
+ }
99
+ }
100
+
101
+ if (outdent) {
102
+ var deleteRange = new Range(0, 0, 0, 0);
103
+ for (var i=startRow; i<= endRow; i++)
104
+ {
105
+ var line = doc.getLine(i);
106
+ var m = line.match(re);
107
+ deleteRange.start.row = i;
108
+ deleteRange.end.row = i;
109
+ deleteRange.end.column = m[0].length;
110
+ doc.replace(deleteRange, m[1]);
111
+ }
112
+ }
113
+ else {
114
+ doc.indentRows(startRow, endRow, "//");
115
+ }
116
+ };
117
+
118
+ this.getNextLineIndent = function(state, line, tab) {
119
+ var indent = this.$getIndent(line);
120
+
121
+ var tokenizedLine = this.$tokenizer.getLineTokens(line, state);
122
+ var tokens = tokenizedLine.tokens;
123
+ var endState = tokenizedLine.state;
124
+
125
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
126
+ return indent;
127
+ }
128
+
129
+ if (state == "start" || state == "regex_allowed") {
130
+ var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);
131
+ if (match) {
132
+ indent += tab;
133
+ }
134
+ } else if (state == "doc-start") {
135
+ if (endState == "start" || state == "regex_allowed") {
136
+ return "";
137
+ }
138
+ var match = line.match(/^\s*(\/?)\*/);
139
+ if (match) {
140
+ if (match[1]) {
141
+ indent += " ";
142
+ }
143
+ indent += "* ";
144
+ }
145
+ }
146
+
147
+ return indent;
148
+ };
149
+
150
+ this.checkOutdent = function(state, line, input) {
151
+ return this.$outdent.checkOutdent(line, input);
152
+ };
153
+
154
+ this.autoOutdent = function(state, doc, row) {
155
+ this.$outdent.autoOutdent(doc, row);
156
+ };
157
+
158
+ this.createWorker = function(session) {
159
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
160
+ worker.attachToDocument(session.getDocument());
161
+
162
+ worker.on("jslint", function(results) {
163
+ session.setAnnotations(results.data);
164
+ });
165
+
166
+ worker.on("terminate", function() {
167
+ session.clearAnnotations();
168
+ });
169
+
170
+ return worker;
171
+ };
172
+
173
+ }).call(Mode.prototype);
174
+
175
+ exports.Mode = Mode;
176
+ });
177
+
178
+ 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) {
179
+
180
+
181
+ var oop = require("../lib/oop");
182
+ var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
183
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
184
+
185
+ var JavaScriptHighlightRules = function() {
186
+ var keywordMapper = this.createKeywordMapper({
187
+ "variable.language":
188
+ "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
189
+ "Namespace|QName|XML|XMLList|" + // E4X
190
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
191
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
192
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
193
+ "SyntaxError|TypeError|URIError|" +
194
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
195
+ "isNaN|parseFloat|parseInt|" +
196
+ "JSON|Math|" + // Other
197
+ "this|arguments|prototype|window|document" , // Pseudo
198
+ "keyword":
199
+ "const|yield|import|get|set|" +
200
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
201
+ "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
202
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
203
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
204
+ "storage.type":
205
+ "const|let|var|function",
206
+ "constant.language":
207
+ "null|Infinity|NaN|undefined",
208
+ "support.function":
209
+ "alert"
210
+ }, "identifier");
211
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
212
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
213
+
214
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
215
+ "u[0-9a-fA-F]{4}|" + // unicode
216
+ "[0-2][0-7]{0,2}|" + // oct
217
+ "3[0-6][0-7]?|" + // oct
218
+ "37[0-7]?|" + // oct
219
+ "[4-7][0-7]?|" + //oct
220
+ ".)";
221
+
222
+ this.$rules = {
223
+ "start" : [
224
+ {
225
+ token : "comment",
226
+ regex : /\/\/.*$/
227
+ },
228
+ DocCommentHighlightRules.getStartRule("doc-start"),
229
+ {
230
+ token : "comment", // multi line comment
231
+ regex : /\/\*/,
232
+ next : "comment"
233
+ }, {
234
+ token : "string",
235
+ regex : "'(?=.)",
236
+ next : "qstring"
237
+ }, {
238
+ token : "string",
239
+ regex : '"(?=.)',
240
+ next : "qqstring"
241
+ }, {
242
+ token : "constant.numeric", // hex
243
+ regex : /0[xX][0-9a-fA-F]+\b/
244
+ }, {
245
+ token : "constant.numeric", // float
246
+ regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
247
+ }, {
248
+ token : [
249
+ "storage.type", "punctuation.operator", "support.function",
250
+ "punctuation.operator", "entity.name.function", "text","keyword.operator"
251
+ ],
252
+ regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
253
+ next: "function_arguments"
254
+ }, {
255
+ token : [
256
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
257
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
258
+ ],
259
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
260
+ next: "function_arguments"
261
+ }, {
262
+ token : [
263
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
264
+ "text", "paren.lparen"
265
+ ],
266
+ regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
267
+ next: "function_arguments"
268
+ }, {
269
+ token : [
270
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
271
+ "keyword.operator", "text",
272
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
273
+ ],
274
+ regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
275
+ next: "function_arguments"
276
+ }, {
277
+ token : [
278
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
279
+ ],
280
+ regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
281
+ next: "function_arguments"
282
+ }, {
283
+ token : [
284
+ "entity.name.function", "text", "punctuation.operator",
285
+ "text", "storage.type", "text", "paren.lparen"
286
+ ],
287
+ regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
288
+ next: "function_arguments"
289
+ }, {
290
+ token : [
291
+ "text", "text", "storage.type", "text", "paren.lparen"
292
+ ],
293
+ regex : "(:)(\\s*)(function)(\\s*)(\\()",
294
+ next: "function_arguments"
295
+ }, {
296
+ token : "constant.language.boolean",
297
+ regex : /(?:true|false)\b/
298
+ }, {
299
+ token : "keyword",
300
+ regex : "(?:" + kwBeforeRe + ")\\b",
301
+ next : "regex_allowed"
302
+ }, {
303
+ token : ["punctuation.operator", "support.function"],
304
+ regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
305
+ }, {
306
+ token : ["punctuation.operator", "support.function.dom"],
307
+ regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
308
+ }, {
309
+ token : ["punctuation.operator", "support.constant"],
310
+ 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/
311
+ }, {
312
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
313
+ regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/
314
+ }, {
315
+ token : keywordMapper,
316
+ regex : identifierRe
317
+ }, {
318
+ token : "keyword.operator",
319
+ regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/,
320
+ next : "regex_allowed"
321
+ }, {
322
+ token : "punctuation.operator",
323
+ regex : /\?|\:|\,|\;|\./,
324
+ next : "regex_allowed"
325
+ }, {
326
+ token : "paren.lparen",
327
+ regex : /[\[({]/,
328
+ next : "regex_allowed"
329
+ }, {
330
+ token : "paren.rparen",
331
+ regex : /[\])}]/
332
+ }, {
333
+ token : "keyword.operator",
334
+ regex : /\/=?/,
335
+ next : "regex_allowed"
336
+ }, {
337
+ token: "comment",
338
+ regex: /^#!.*$/
339
+ }, {
340
+ token : "text",
341
+ regex : /\s+/
342
+ }
343
+ ],
344
+ "regex_allowed": [
345
+ DocCommentHighlightRules.getStartRule("doc-start"),
346
+ {
347
+ token : "comment", // multi line comment
348
+ regex : "\\/\\*",
349
+ next : "comment_regex_allowed"
350
+ }, {
351
+ token : "comment",
352
+ regex : "\\/\\/.*$"
353
+ }, {
354
+ token: "string.regexp",
355
+ regex: "\\/",
356
+ next: "regex",
357
+ }, {
358
+ token : "text",
359
+ regex : "\\s+"
360
+ }, {
361
+ token: "empty",
362
+ regex: "",
363
+ next: "start"
364
+ }
365
+ ],
366
+ "regex": [
367
+ {
368
+ token: "regexp.keyword.operator",
369
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
370
+ }, {
371
+ token: "string.regexp",
372
+ regex: "/\\w*",
373
+ next: "start",
374
+ }, {
375
+ token : "invalid",
376
+ regex: /\{\d+,?(?:\d+)?}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
377
+ }, {
378
+ token : "constant.language.escape",
379
+ regex: /\(\?[:=!]|\)|{\d+,?(?:\d+)?}|{,\d+}|[+*]\?|[(|)$^+*?]/
380
+ }, {
381
+ token: "string.regexp",
382
+ regex: /{|[^{\[\/\\(|)$^+*?]+/,
383
+ }, {
384
+ token: "constant.language.escape",
385
+ regex: /\[\^?/,
386
+ next: "regex_character_class",
387
+ }, {
388
+ token: "empty",
389
+ regex: "",
390
+ next: "start"
391
+ }
392
+ ],
393
+ "regex_character_class": [
394
+ {
395
+ token: "regexp.keyword.operator",
396
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
397
+ }, {
398
+ token: "constant.language.escape",
399
+ regex: "]",
400
+ next: "regex",
401
+ }, {
402
+ token: "constant.language.escape",
403
+ regex: "-"
404
+ }, {
405
+ token: "string.regexp.charachterclass",
406
+ regex: /[^\]\-\\]+/,
407
+ }, {
408
+ token: "empty",
409
+ regex: "",
410
+ next: "start"
411
+ }
412
+ ],
413
+ "function_arguments": [
414
+ {
415
+ token: "variable.parameter",
416
+ regex: identifierRe
417
+ }, {
418
+ token: "punctuation.operator",
419
+ regex: "[, ]+",
420
+ }, {
421
+ token: "punctuation.operator",
422
+ regex: "$",
423
+ }, {
424
+ token: "empty",
425
+ regex: "",
426
+ next: "start"
427
+ }
428
+ ],
429
+ "comment_regex_allowed" : [
430
+ {
431
+ token : "comment", // closing comment
432
+ regex : ".*?\\*\\/",
433
+ next : "regex_allowed"
434
+ }, {
435
+ token : "comment", // comment spanning whole line
436
+ regex : ".+"
437
+ }
438
+ ],
439
+ "comment" : [
440
+ {
441
+ token : "comment", // closing comment
442
+ regex : ".*?\\*\\/",
443
+ next : "start"
444
+ }, {
445
+ token : "comment", // comment spanning whole line
446
+ regex : ".+"
447
+ }
448
+ ],
449
+ "qqstring" : [
450
+ {
451
+ token : "constant.language.escape",
452
+ regex : escapedRe
453
+ }, {
454
+ token : "string",
455
+ regex : "\\\\$",
456
+ next : "qqstring",
457
+ }, {
458
+ token : "string",
459
+ regex : '"|$',
460
+ next : "start",
461
+ }, {
462
+ token : "string",
463
+ regex : '.|\\w+|\\s+',
464
+ }
465
+ ],
466
+ "qstring" : [
467
+ {
468
+ token : "constant.language.escape",
469
+ regex : escapedRe
470
+ }, {
471
+ token : "string",
472
+ regex : "\\\\$",
473
+ next : "qstring",
474
+ }, {
475
+ token : "string",
476
+ regex : "'|$",
477
+ next : "start",
478
+ }, {
479
+ token : "string",
480
+ regex : '.|\\w+|\\s+',
481
+ }
482
+ ]
483
+ };
484
+
485
+ this.embedRules(DocCommentHighlightRules, "doc-",
486
+ [ DocCommentHighlightRules.getEndRule("start") ]);
487
+ };
488
+
489
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
490
+
491
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
492
+ });
493
+
494
+ define('ace/mode/doc_comment_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(require, exports, module) {
495
+
496
+
497
+ var oop = require("../lib/oop");
498
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
499
+
500
+ var DocCommentHighlightRules = function() {
501
+
502
+ this.$rules = {
503
+ "start" : [ {
504
+ token : "comment.doc.tag",
505
+ regex : "@[\\w\\d_]+" // TODO: fix email addresses
506
+ }, {
507
+ token : "comment.doc",
508
+ regex : "\\s+"
509
+ }, {
510
+ token : "comment.doc",
511
+ regex : "TODO"
512
+ }, {
513
+ token : "comment.doc",
514
+ regex : "[^@\\*]+"
515
+ }, {
516
+ token : "comment.doc",
517
+ regex : "."
518
+ }]
519
+ };
520
+ };
521
+
522
+ oop.inherits(DocCommentHighlightRules, TextHighlightRules);
523
+
524
+ DocCommentHighlightRules.getStartRule = function(start) {
525
+ return {
526
+ token : "comment.doc", // doc comment
527
+ regex : "\\/\\*(?=\\*)",
528
+ next : start
529
+ };
530
+ };
531
+
532
+ DocCommentHighlightRules.getEndRule = function (start) {
533
+ return {
534
+ token : "comment.doc", // closing comment
535
+ regex : "\\*\\/",
536
+ next : start
537
+ };
538
+ };
539
+
540
+
541
+ exports.DocCommentHighlightRules = DocCommentHighlightRules;
542
+
543
+ });
544
+
545
+ define('ace/mode/matching_brace_outdent', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) {
546
+
547
+
548
+ var Range = require("../range").Range;
549
+
550
+ var MatchingBraceOutdent = function() {};
551
+
552
+ (function() {
553
+
554
+ this.checkOutdent = function(line, input) {
555
+ if (! /^\s+$/.test(line))
556
+ return false;
557
+
558
+ return /^\s*\}/.test(input);
559
+ };
560
+
561
+ this.autoOutdent = function(doc, row) {
562
+ var line = doc.getLine(row);
563
+ var match = line.match(/^(\s*\})/);
564
+
565
+ if (!match) return 0;
566
+
567
+ var column = match[1].length;
568
+ var openBracePos = doc.findMatchingBracket({row: row, column: column});
569
+
570
+ if (!openBracePos || openBracePos.row == row) return 0;
571
+
572
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
573
+ doc.replace(new Range(row, 0, row, column-1), indent);
574
+ };
575
+
576
+ this.$getIndent = function(line) {
577
+ var match = line.match(/^(\s+)/);
578
+ if (match) {
579
+ return match[1];
580
+ }
581
+
582
+ return "";
583
+ };
584
+
585
+ }).call(MatchingBraceOutdent.prototype);
586
+
587
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
588
+ });
589
+
590
+ define('ace/mode/behaviour/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(require, exports, module) {
591
+
592
+
593
+ var oop = require("../../lib/oop");
594
+ var Behaviour = require("../behaviour").Behaviour;
595
+ var TokenIterator = require("../../token_iterator").TokenIterator;
596
+ var lang = require("../../lib/lang");
597
+
598
+ var SAFE_INSERT_IN_TOKENS =
599
+ ["text", "paren.rparen", "punctuation.operator"];
600
+ var SAFE_INSERT_BEFORE_TOKENS =
601
+ ["text", "paren.rparen", "punctuation.operator", "comment"];
602
+
603
+
604
+ var autoInsertedBrackets = 0;
605
+ var autoInsertedRow = -1;
606
+ var autoInsertedLineEnd = "";
607
+ var maybeInsertedBrackets = 0;
608
+ var maybeInsertedRow = -1;
609
+ var maybeInsertedLineStart = "";
610
+ var maybeInsertedLineEnd = "";
611
+
612
+ var CstyleBehaviour = function () {
613
+
614
+ CstyleBehaviour.isSaneInsertion = function(editor, session) {
615
+ var cursor = editor.getCursorPosition();
616
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
617
+ if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) {
618
+ var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1);
619
+ if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS))
620
+ return false;
621
+ }
622
+ iterator.stepForward();
623
+ return iterator.getCurrentTokenRow() !== cursor.row ||
624
+ this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS);
625
+ };
626
+
627
+ CstyleBehaviour.$matchTokenType = function(token, types) {
628
+ return types.indexOf(token.type || token) > -1;
629
+ };
630
+
631
+ CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) {
632
+ var cursor = editor.getCursorPosition();
633
+ var line = session.doc.getLine(cursor.row);
634
+ if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0]))
635
+ autoInsertedBrackets = 0;
636
+ autoInsertedRow = cursor.row;
637
+ autoInsertedLineEnd = bracket + line.substr(cursor.column);
638
+ autoInsertedBrackets++;
639
+ };
640
+
641
+ CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
642
+ var cursor = editor.getCursorPosition();
643
+ var line = session.doc.getLine(cursor.row);
644
+ if (!this.isMaybeInsertedClosing(cursor, line))
645
+ maybeInsertedBrackets = 0;
646
+ maybeInsertedRow = cursor.row;
647
+ maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
648
+ maybeInsertedLineEnd = line.substr(cursor.column);
649
+ maybeInsertedBrackets++;
650
+ };
651
+
652
+ CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
653
+ return autoInsertedBrackets > 0 &&
654
+ cursor.row === autoInsertedRow &&
655
+ bracket === autoInsertedLineEnd[0] &&
656
+ line.substr(cursor.column) === autoInsertedLineEnd;
657
+ };
658
+
659
+ CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
660
+ return maybeInsertedBrackets > 0 &&
661
+ cursor.row === maybeInsertedRow &&
662
+ line.substr(cursor.column) === maybeInsertedLineEnd &&
663
+ line.substr(0, cursor.column) == maybeInsertedLineStart;
664
+ };
665
+
666
+ CstyleBehaviour.popAutoInsertedClosing = function() {
667
+ autoInsertedLineEnd = autoInsertedLineEnd.substr(1);
668
+ autoInsertedBrackets--;
669
+ };
670
+
671
+ CstyleBehaviour.clearMaybeInsertedClosing = function() {
672
+ maybeInsertedBrackets = 0;
673
+ maybeInsertedRow = -1;
674
+ };
675
+
676
+ this.add("braces", "insertion", function (state, action, editor, session, text) {
677
+ var cursor = editor.getCursorPosition();
678
+ var line = session.doc.getLine(cursor.row);
679
+ if (text == '{') {
680
+ var selection = editor.getSelectionRange();
681
+ var selected = session.doc.getTextRange(selection);
682
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
683
+ return {
684
+ text: '{' + selected + '}',
685
+ selection: false
686
+ };
687
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
688
+ if (/[\]\}\)]/.test(line[cursor.column])) {
689
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
690
+ return {
691
+ text: '{}',
692
+ selection: [1, 1]
693
+ };
694
+ } else {
695
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
696
+ return {
697
+ text: '{',
698
+ selection: [1, 1]
699
+ };
700
+ }
701
+ }
702
+ } else if (text == '}') {
703
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
704
+ if (rightChar == '}') {
705
+ var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row});
706
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
707
+ CstyleBehaviour.popAutoInsertedClosing();
708
+ return {
709
+ text: '',
710
+ selection: [1, 1]
711
+ };
712
+ }
713
+ }
714
+ } else if (text == "\n" || text == "\r\n") {
715
+ var closing = "";
716
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
717
+ closing = lang.stringRepeat("}", maybeInsertedBrackets);
718
+ CstyleBehaviour.clearMaybeInsertedClosing();
719
+ }
720
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
721
+ if (rightChar == '}' || closing !== "") {
722
+ var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column}, '}');
723
+ if (!openBracePos)
724
+ return null;
725
+
726
+ var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString());
727
+ var next_indent = this.$getIndent(line);
728
+
729
+ return {
730
+ text: '\n' + indent + '\n' + next_indent + closing,
731
+ selection: [1, indent.length, 1, indent.length]
732
+ };
733
+ }
734
+ }
735
+ });
736
+
737
+ this.add("braces", "deletion", function (state, action, editor, session, range) {
738
+ var selected = session.doc.getTextRange(range);
739
+ if (!range.isMultiLine() && selected == '{') {
740
+ var line = session.doc.getLine(range.start.row);
741
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
742
+ if (rightChar == '}') {
743
+ range.end.column++;
744
+ return range;
745
+ } else {
746
+ maybeInsertedBrackets--;
747
+ }
748
+ }
749
+ });
750
+
751
+ this.add("parens", "insertion", function (state, action, editor, session, text) {
752
+ if (text == '(') {
753
+ var selection = editor.getSelectionRange();
754
+ var selected = session.doc.getTextRange(selection);
755
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
756
+ return {
757
+ text: '(' + selected + ')',
758
+ selection: false
759
+ };
760
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
761
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
762
+ return {
763
+ text: '()',
764
+ selection: [1, 1]
765
+ };
766
+ }
767
+ } else if (text == ')') {
768
+ var cursor = editor.getCursorPosition();
769
+ var line = session.doc.getLine(cursor.row);
770
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
771
+ if (rightChar == ')') {
772
+ var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row});
773
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
774
+ CstyleBehaviour.popAutoInsertedClosing();
775
+ return {
776
+ text: '',
777
+ selection: [1, 1]
778
+ };
779
+ }
780
+ }
781
+ }
782
+ });
783
+
784
+ this.add("parens", "deletion", function (state, action, editor, session, range) {
785
+ var selected = session.doc.getTextRange(range);
786
+ if (!range.isMultiLine() && selected == '(') {
787
+ var line = session.doc.getLine(range.start.row);
788
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
789
+ if (rightChar == ')') {
790
+ range.end.column++;
791
+ return range;
792
+ }
793
+ }
794
+ });
795
+
796
+ this.add("brackets", "insertion", function (state, action, editor, session, text) {
797
+ if (text == '[') {
798
+ var selection = editor.getSelectionRange();
799
+ var selected = session.doc.getTextRange(selection);
800
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
801
+ return {
802
+ text: '[' + selected + ']',
803
+ selection: false
804
+ };
805
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
806
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
807
+ return {
808
+ text: '[]',
809
+ selection: [1, 1]
810
+ };
811
+ }
812
+ } else if (text == ']') {
813
+ var cursor = editor.getCursorPosition();
814
+ var line = session.doc.getLine(cursor.row);
815
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
816
+ if (rightChar == ']') {
817
+ var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row});
818
+ if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) {
819
+ CstyleBehaviour.popAutoInsertedClosing();
820
+ return {
821
+ text: '',
822
+ selection: [1, 1]
823
+ };
824
+ }
825
+ }
826
+ }
827
+ });
828
+
829
+ this.add("brackets", "deletion", function (state, action, editor, session, range) {
830
+ var selected = session.doc.getTextRange(range);
831
+ if (!range.isMultiLine() && selected == '[') {
832
+ var line = session.doc.getLine(range.start.row);
833
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
834
+ if (rightChar == ']') {
835
+ range.end.column++;
836
+ return range;
837
+ }
838
+ }
839
+ });
840
+
841
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
842
+ if (text == '"' || text == "'") {
843
+ var quote = text;
844
+ var selection = editor.getSelectionRange();
845
+ var selected = session.doc.getTextRange(selection);
846
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
847
+ return {
848
+ text: quote + selected + quote,
849
+ selection: false
850
+ };
851
+ } else {
852
+ var cursor = editor.getCursorPosition();
853
+ var line = session.doc.getLine(cursor.row);
854
+ var leftChar = line.substring(cursor.column-1, cursor.column);
855
+ if (leftChar == '\\') {
856
+ return null;
857
+ }
858
+ var tokens = session.getTokens(selection.start.row);
859
+ var col = 0, token;
860
+ var quotepos = -1; // Track whether we're inside an open quote.
861
+
862
+ for (var x = 0; x < tokens.length; x++) {
863
+ token = tokens[x];
864
+ if (token.type == "string") {
865
+ quotepos = -1;
866
+ } else if (quotepos < 0) {
867
+ quotepos = token.value.indexOf(quote);
868
+ }
869
+ if ((token.value.length + col) > selection.start.column) {
870
+ break;
871
+ }
872
+ col += tokens[x].value.length;
873
+ }
874
+ if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) {
875
+ if (!CstyleBehaviour.isSaneInsertion(editor, session))
876
+ return;
877
+ return {
878
+ text: quote + quote,
879
+ selection: [1,1]
880
+ };
881
+ } else if (token && token.type === "string") {
882
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
883
+ if (rightChar == quote) {
884
+ return {
885
+ text: '',
886
+ selection: [1, 1]
887
+ };
888
+ }
889
+ }
890
+ }
891
+ }
892
+ });
893
+
894
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
895
+ var selected = session.doc.getTextRange(range);
896
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
897
+ var line = session.doc.getLine(range.start.row);
898
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
899
+ if (rightChar == '"') {
900
+ range.end.column++;
901
+ return range;
902
+ }
903
+ }
904
+ });
905
+
906
+ };
907
+
908
+ oop.inherits(CstyleBehaviour, Behaviour);
909
+
910
+ exports.CstyleBehaviour = CstyleBehaviour;
911
+ });
912
+
913
+ define('ace/mode/folding/cstyle', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(require, exports, module) {
914
+
915
+
916
+ var oop = require("../../lib/oop");
917
+ var Range = require("../../range").Range;
918
+ var BaseFoldMode = require("./fold_mode").FoldMode;
919
+
920
+ var FoldMode = exports.FoldMode = function() {};
921
+ oop.inherits(FoldMode, BaseFoldMode);
922
+
923
+ (function() {
924
+
925
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
926
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
927
+
928
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
929
+ var line = session.getLine(row);
930
+ var match = line.match(this.foldingStartMarker);
931
+ if (match) {
932
+ var i = match.index;
933
+
934
+ if (match[1])
935
+ return this.openingBracketBlock(session, match[1], row, i);
936
+
937
+ return session.getCommentFoldRange(row, i + match[0].length, 1);
938
+ }
939
+
940
+ if (foldStyle !== "markbeginend")
941
+ return;
942
+
943
+ var match = line.match(this.foldingStopMarker);
944
+ if (match) {
945
+ var i = match.index + match[0].length;
946
+
947
+ if (match[1])
948
+ return this.closingBracketBlock(session, match[1], row, i);
949
+
950
+ return session.getCommentFoldRange(row, i, -1);
951
+ }
952
+ };
953
+
954
+ }).call(FoldMode.prototype);
955
+
956
+ });
957
+
958
+
959
+ define('ace/mode/typescript_highlight_rules', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules'], function(require, exports, module) {
960
+
961
+
962
+ var oop = require("../lib/oop");
963
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
964
+
965
+ var TypeScriptHighlightRules = function() {
966
+
967
+ var tsRules = [
968
+ {
969
+ "token": ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"],
970
+ "regex": "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)"
971
+ },
972
+ {
973
+ "token": ["storage.type.variable.ts", "text", "keyword.other.ts", "text"],
974
+ "regex": "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))"
975
+ },
976
+ {
977
+ "token": ["entity.name.function.ts","paren.lparen", "paren.rparen"],
978
+ "regex": "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))"
979
+ },
980
+ {
981
+ "token": ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"],
982
+ "regex": "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)"
983
+ },
984
+ {
985
+ "token": ["keyword.operator.ts"],
986
+ "regex": "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)"
987
+ },
988
+ {
989
+ "token": ["storage.type.variable.ts"],
990
+ "regex": "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)"
991
+ },
992
+ {
993
+ "token": ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"],
994
+ "regex": "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?"
995
+ },
996
+ {
997
+ "token": "keyword",
998
+ "regex": "(?:super|export|class|extends|import)\\b"
999
+ }
1000
+ ];
1001
+
1002
+ var JSRules = new JavaScriptHighlightRules().getRules();
1003
+
1004
+ JSRules.start = tsRules.concat(JSRules.start);
1005
+ this.$rules = JSRules;
1006
+ };
1007
+
1008
+ oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
1009
+
1010
+ exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
1011
+ });