@omicronenergy/oscd-ui 0.0.18 → 0.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (724) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/custom-elements.json +12341 -8939
  3. package/dist/ace-editor/OscdAceEditor.d.ts +34 -0
  4. package/dist/ace-editor/OscdAceEditor.js +33 -0
  5. package/dist/ace-editor/OscdAceEditor.js.map +1 -0
  6. package/dist/ace-editor/OscdAceEditor.spec.d.ts +1 -0
  7. package/dist/ace-editor/OscdAceEditor.spec.js +16 -0
  8. package/dist/ace-editor/OscdAceEditor.spec.js.map +1 -0
  9. package/dist/ace-editor/OscdAceEditor.stories.d.ts +28 -0
  10. package/dist/ace-editor/OscdAceEditor.stories.js +22 -0
  11. package/dist/ace-editor/OscdAceEditor.stories.js.map +1 -0
  12. package/dist/ace-editor/ace/ace.js +22045 -0
  13. package/dist/ace-editor/ace/ext-beautify.js +343 -0
  14. package/dist/ace-editor/ace/ext-code_lens.js +204 -0
  15. package/dist/ace-editor/ace/ext-command_bar.js +469 -0
  16. package/dist/ace-editor/ace/ext-diff.js +4270 -0
  17. package/dist/ace-editor/ace/ext-elastic_tabstops_lite.js +238 -0
  18. package/dist/ace-editor/ace/ext-emmet.js +1303 -0
  19. package/dist/ace-editor/ace/ext-error_marker.js +9 -0
  20. package/dist/ace-editor/ace/ext-hardwrap.js +127 -0
  21. package/dist/ace-editor/ace/ext-inline_autocomplete.js +3547 -0
  22. package/dist/ace-editor/ace/ext-keybinding_menu.js +185 -0
  23. package/dist/ace-editor/ace/ext-language_tools.js +2724 -0
  24. package/dist/ace-editor/ace/ext-linking.js +66 -0
  25. package/dist/ace-editor/ace/ext-modelist.js +279 -0
  26. package/dist/ace-editor/ace/ext-options.js +862 -0
  27. package/dist/ace-editor/ace/ext-prompt.js +3164 -0
  28. package/dist/ace-editor/ace/ext-rtl.js +146 -0
  29. package/dist/ace-editor/ace/ext-searchbox.js +385 -0
  30. package/dist/ace-editor/ace/ext-settings_menu.js +862 -0
  31. package/dist/ace-editor/ace/ext-simple_tokenizer.js +137 -0
  32. package/dist/ace-editor/ace/ext-spellcheck.js +79 -0
  33. package/dist/ace-editor/ace/ext-split.js +203 -0
  34. package/dist/ace-editor/ace/ext-static_highlight.js +194 -0
  35. package/dist/ace-editor/ace/ext-statusbar.js +63 -0
  36. package/dist/ace-editor/ace/ext-textarea.js +400 -0
  37. package/dist/ace-editor/ace/ext-themelist.js +80 -0
  38. package/dist/ace-editor/ace/ext-whitespace.js +201 -0
  39. package/dist/ace-editor/ace/ext-whitespaces_in_selection.js +325 -0
  40. package/dist/ace-editor/ace/keybinding-emacs.js +1067 -0
  41. package/dist/ace-editor/ace/keybinding-sublime.js +409 -0
  42. package/dist/ace-editor/ace/keybinding-vim.js +7101 -0
  43. package/dist/ace-editor/ace/keybinding-vscode.js +255 -0
  44. package/dist/ace-editor/ace/mode-abap.js +200 -0
  45. package/dist/ace-editor/ace/mode-abc.js +243 -0
  46. package/dist/ace-editor/ace/mode-actionscript.js +234 -0
  47. package/dist/ace-editor/ace/mode-ada.js +108 -0
  48. package/dist/ace-editor/ace/mode-alda.js +279 -0
  49. package/dist/ace-editor/ace/mode-apache_conf.js +318 -0
  50. package/dist/ace-editor/ace/mode-apex.js +402 -0
  51. package/dist/ace-editor/ace/mode-applescript.js +232 -0
  52. package/dist/ace-editor/ace/mode-aql.js +92 -0
  53. package/dist/ace-editor/ace/mode-asciidoc.js +311 -0
  54. package/dist/ace-editor/ace/mode-asl.js +357 -0
  55. package/dist/ace-editor/ace/mode-assembly_arm32.js +185 -0
  56. package/dist/ace-editor/ace/mode-assembly_x86.js +170 -0
  57. package/dist/ace-editor/ace/mode-astro.js +2475 -0
  58. package/dist/ace-editor/ace/mode-autohotkey.js +208 -0
  59. package/dist/ace-editor/ace/mode-basic.js +201 -0
  60. package/dist/ace-editor/ace/mode-batchfile.js +199 -0
  61. package/dist/ace-editor/ace/mode-bibtex.js +318 -0
  62. package/dist/ace-editor/ace/mode-c9search.js +250 -0
  63. package/dist/ace-editor/ace/mode-c_cpp.js +417 -0
  64. package/dist/ace-editor/ace/mode-cedar.js +289 -0
  65. package/dist/ace-editor/ace/mode-cedarschema.js +275 -0
  66. package/dist/ace-editor/ace/mode-cirru.js +192 -0
  67. package/dist/ace-editor/ace/mode-clojure.js +322 -0
  68. package/dist/ace-editor/ace/mode-clue.js +361 -0
  69. package/dist/ace-editor/ace/mode-cobol.js +82 -0
  70. package/dist/ace-editor/ace/mode-coffee.js +335 -0
  71. package/dist/ace-editor/ace/mode-coldfusion.js +2410 -0
  72. package/dist/ace-editor/ace/mode-crystal.js +586 -0
  73. package/dist/ace-editor/ace/mode-csharp.js +413 -0
  74. package/dist/ace-editor/ace/mode-csound_document.js +4073 -0
  75. package/dist/ace-editor/ace/mode-csound_orchestra.js +2923 -0
  76. package/dist/ace-editor/ace/mode-csound_score.js +409 -0
  77. package/dist/ace-editor/ace/mode-csp.js +59 -0
  78. package/dist/ace-editor/ace/mode-css.js +632 -0
  79. package/dist/ace-editor/ace/mode-csv.js +97 -0
  80. package/dist/ace-editor/ace/mode-curly.js +2382 -0
  81. package/dist/ace-editor/ace/mode-cuttlefish.js +56 -0
  82. package/dist/ace-editor/ace/mode-d.js +450 -0
  83. package/dist/ace-editor/ace/mode-dart.js +618 -0
  84. package/dist/ace-editor/ace/mode-diff.js +129 -0
  85. package/dist/ace-editor/ace/mode-django.js +2423 -0
  86. package/dist/ace-editor/ace/mode-dockerfile.js +427 -0
  87. package/dist/ace-editor/ace/mode-dot.js +348 -0
  88. package/dist/ace-editor/ace/mode-drools.js +607 -0
  89. package/dist/ace-editor/ace/mode-edifact.js +130 -0
  90. package/dist/ace-editor/ace/mode-eiffel.js +120 -0
  91. package/dist/ace-editor/ace/mode-ejs.js +3278 -0
  92. package/dist/ace-editor/ace/mode-elixir.js +443 -0
  93. package/dist/ace-editor/ace/mode-elm.js +274 -0
  94. package/dist/ace-editor/ace/mode-erlang.js +836 -0
  95. package/dist/ace-editor/ace/mode-flix.js +163 -0
  96. package/dist/ace-editor/ace/mode-forth.js +253 -0
  97. package/dist/ace-editor/ace/mode-fortran.js +361 -0
  98. package/dist/ace-editor/ace/mode-fsharp.js +277 -0
  99. package/dist/ace-editor/ace/mode-fsl.js +226 -0
  100. package/dist/ace-editor/ace/mode-ftl.js +1256 -0
  101. package/dist/ace-editor/ace/mode-gcode.js +74 -0
  102. package/dist/ace-editor/ace/mode-gherkin.js +154 -0
  103. package/dist/ace-editor/ace/mode-gitignore.js +49 -0
  104. package/dist/ace-editor/ace/mode-glsl.js +475 -0
  105. package/dist/ace-editor/ace/mode-gobstones.js +1460 -0
  106. package/dist/ace-editor/ace/mode-golang.js +341 -0
  107. package/dist/ace-editor/ace/mode-graphqlschema.js +174 -0
  108. package/dist/ace-editor/ace/mode-groovy.js +1402 -0
  109. package/dist/ace-editor/ace/mode-groq.js +288 -0
  110. package/dist/ace-editor/ace/mode-haml.js +1907 -0
  111. package/dist/ace-editor/ace/mode-handlebars.js +2439 -0
  112. package/dist/ace-editor/ace/mode-haskell.js +324 -0
  113. package/dist/ace-editor/ace/mode-haskell_cabal.js +135 -0
  114. package/dist/ace-editor/ace/mode-haxe.js +313 -0
  115. package/dist/ace-editor/ace/mode-hjson.js +318 -0
  116. package/dist/ace-editor/ace/mode-html.js +2340 -0
  117. package/dist/ace-editor/ace/mode-html_elixir.js +2846 -0
  118. package/dist/ace-editor/ace/mode-html_ruby.js +3295 -0
  119. package/dist/ace-editor/ace/mode-ini.js +138 -0
  120. package/dist/ace-editor/ace/mode-io.js +210 -0
  121. package/dist/ace-editor/ace/mode-ion.js +477 -0
  122. package/dist/ace-editor/ace/mode-jack.js +293 -0
  123. package/dist/ace-editor/ace/mode-jade.js +2018 -0
  124. package/dist/ace-editor/ace/mode-java.js +1566 -0
  125. package/dist/ace-editor/ace/mode-javascript.js +1192 -0
  126. package/dist/ace-editor/ace/mode-jexl.js +270 -0
  127. package/dist/ace-editor/ace/mode-json.js +275 -0
  128. package/dist/ace-editor/ace/mode-json5.js +308 -0
  129. package/dist/ace-editor/ace/mode-jsoniq.js +2577 -0
  130. package/dist/ace-editor/ace/mode-jsp.js +1619 -0
  131. package/dist/ace-editor/ace/mode-jssm.js +293 -0
  132. package/dist/ace-editor/ace/mode-jsx.js +1210 -0
  133. package/dist/ace-editor/ace/mode-julia.js +254 -0
  134. package/dist/ace-editor/ace/mode-kotlin.js +445 -0
  135. package/dist/ace-editor/ace/mode-latex.js +252 -0
  136. package/dist/ace-editor/ace/mode-latte.js +2523 -0
  137. package/dist/ace-editor/ace/mode-less.js +742 -0
  138. package/dist/ace-editor/ace/mode-liquid.js +2742 -0
  139. package/dist/ace-editor/ace/mode-lisp.js +104 -0
  140. package/dist/ace-editor/ace/mode-livescript.js +272 -0
  141. package/dist/ace-editor/ace/mode-logiql.js +272 -0
  142. package/dist/ace-editor/ace/mode-logtalk.js +309 -0
  143. package/dist/ace-editor/ace/mode-lsl.js +287 -0
  144. package/dist/ace-editor/ace/mode-lua.js +393 -0
  145. package/dist/ace-editor/ace/mode-luapage.js +2786 -0
  146. package/dist/ace-editor/ace/mode-lucene.js +145 -0
  147. package/dist/ace-editor/ace/mode-makefile.js +374 -0
  148. package/dist/ace-editor/ace/mode-mariadb.js +149 -0
  149. package/dist/ace-editor/ace/mode-markdown.js +2936 -0
  150. package/dist/ace-editor/ace/mode-mask.js +1758 -0
  151. package/dist/ace-editor/ace/mode-matlab.js +239 -0
  152. package/dist/ace-editor/ace/mode-maze.js +256 -0
  153. package/dist/ace-editor/ace/mode-mediawiki.js +580 -0
  154. package/dist/ace-editor/ace/mode-mel.js +213 -0
  155. package/dist/ace-editor/ace/mode-mips.js +231 -0
  156. package/dist/ace-editor/ace/mode-mixal.js +110 -0
  157. package/dist/ace-editor/ace/mode-mushcode.js +642 -0
  158. package/dist/ace-editor/ace/mode-mysql.js +150 -0
  159. package/dist/ace-editor/ace/mode-nasal.js +513 -0
  160. package/dist/ace-editor/ace/mode-nginx.js +262 -0
  161. package/dist/ace-editor/ace/mode-nim.js +325 -0
  162. package/dist/ace-editor/ace/mode-nix.js +555 -0
  163. package/dist/ace-editor/ace/mode-nsis.js +279 -0
  164. package/dist/ace-editor/ace/mode-nunjucks.js +2678 -0
  165. package/dist/ace-editor/ace/mode-objectivec.js +626 -0
  166. package/dist/ace-editor/ace/mode-ocaml.js +378 -0
  167. package/dist/ace-editor/ace/mode-odin.js +449 -0
  168. package/dist/ace-editor/ace/mode-partiql.js +750 -0
  169. package/dist/ace-editor/ace/mode-pascal.js +204 -0
  170. package/dist/ace-editor/ace/mode-perl.js +318 -0
  171. package/dist/ace-editor/ace/mode-pgsql.js +1861 -0
  172. package/dist/ace-editor/ace/mode-php.js +14079 -0
  173. package/dist/ace-editor/ace/mode-php_laravel_blade.js +14267 -0
  174. package/dist/ace-editor/ace/mode-pig.js +278 -0
  175. package/dist/ace-editor/ace/mode-plain_text.js +27 -0
  176. package/dist/ace-editor/ace/mode-plsql.js +268 -0
  177. package/dist/ace-editor/ace/mode-powershell.js +567 -0
  178. package/dist/ace-editor/ace/mode-praat.js +412 -0
  179. package/dist/ace-editor/ace/mode-prisma.js +457 -0
  180. package/dist/ace-editor/ace/mode-prolog.js +305 -0
  181. package/dist/ace-editor/ace/mode-properties.js +69 -0
  182. package/dist/ace-editor/ace/mode-protobuf.js +498 -0
  183. package/dist/ace-editor/ace/mode-prql.js +323 -0
  184. package/dist/ace-editor/ace/mode-puppet.js +316 -0
  185. package/dist/ace-editor/ace/mode-python.js +476 -0
  186. package/dist/ace-editor/ace/mode-qml.js +346 -0
  187. package/dist/ace-editor/ace/mode-r.js +387 -0
  188. package/dist/ace-editor/ace/mode-raku.js +516 -0
  189. package/dist/ace-editor/ace/mode-razor.js +2698 -0
  190. package/dist/ace-editor/ace/mode-rdoc.js +286 -0
  191. package/dist/ace-editor/ace/mode-red.js +388 -0
  192. package/dist/ace-editor/ace/mode-redshift.js +321 -0
  193. package/dist/ace-editor/ace/mode-rhtml.js +2751 -0
  194. package/dist/ace-editor/ace/mode-robot.js +168 -0
  195. package/dist/ace-editor/ace/mode-rst.js +245 -0
  196. package/dist/ace-editor/ace/mode-ruby.js +921 -0
  197. package/dist/ace-editor/ace/mode-rust.js +393 -0
  198. package/dist/ace-editor/ace/mode-sac.js +349 -0
  199. package/dist/ace-editor/ace/mode-sass.js +480 -0
  200. package/dist/ace-editor/ace/mode-scad.js +350 -0
  201. package/dist/ace-editor/ace/mode-scala.js +1396 -0
  202. package/dist/ace-editor/ace/mode-scheme.js +210 -0
  203. package/dist/ace-editor/ace/mode-scrypt.js +317 -0
  204. package/dist/ace-editor/ace/mode-scss.js +768 -0
  205. package/dist/ace-editor/ace/mode-sh.js +387 -0
  206. package/dist/ace-editor/ace/mode-sjs.js +1394 -0
  207. package/dist/ace-editor/ace/mode-slim.js +4771 -0
  208. package/dist/ace-editor/ace/mode-smarty.js +2437 -0
  209. package/dist/ace-editor/ace/mode-smithy.js +456 -0
  210. package/dist/ace-editor/ace/mode-snippets.js +183 -0
  211. package/dist/ace-editor/ace/mode-soy_template.js +2612 -0
  212. package/dist/ace-editor/ace/mode-space.js +151 -0
  213. package/dist/ace-editor/ace/mode-sparql.js +288 -0
  214. package/dist/ace-editor/ace/mode-sql.js +221 -0
  215. package/dist/ace-editor/ace/mode-sqlserver.js +391 -0
  216. package/dist/ace-editor/ace/mode-stylus.js +443 -0
  217. package/dist/ace-editor/ace/mode-svg.js +1488 -0
  218. package/dist/ace-editor/ace/mode-swift.js +342 -0
  219. package/dist/ace-editor/ace/mode-tcl.js +338 -0
  220. package/dist/ace-editor/ace/mode-terraform.js +346 -0
  221. package/dist/ace-editor/ace/mode-tex.js +212 -0
  222. package/dist/ace-editor/ace/mode-text.js +9 -0
  223. package/dist/ace-editor/ace/mode-textile.js +125 -0
  224. package/dist/ace-editor/ace/mode-toml.js +129 -0
  225. package/dist/ace-editor/ace/mode-tsv.js +124 -0
  226. package/dist/ace-editor/ace/mode-tsx.js +1277 -0
  227. package/dist/ace-editor/ace/mode-turtle.js +264 -0
  228. package/dist/ace-editor/ace/mode-twig.js +2503 -0
  229. package/dist/ace-editor/ace/mode-typescript.js +1255 -0
  230. package/dist/ace-editor/ace/mode-vala.js +554 -0
  231. package/dist/ace-editor/ace/mode-vbscript.js +731 -0
  232. package/dist/ace-editor/ace/mode-velocity.js +2581 -0
  233. package/dist/ace-editor/ace/mode-verilog.js +98 -0
  234. package/dist/ace-editor/ace/mode-vhdl.js +94 -0
  235. package/dist/ace-editor/ace/mode-visualforce.js +2455 -0
  236. package/dist/ace-editor/ace/mode-vue.js +3835 -0
  237. package/dist/ace-editor/ace/mode-wollok.js +1330 -0
  238. package/dist/ace-editor/ace/mode-xml.js +477 -0
  239. package/dist/ace-editor/ace/mode-xquery.js +2589 -0
  240. package/dist/ace-editor/ace/mode-yaml.js +395 -0
  241. package/dist/ace-editor/ace/mode-zeek.js +502 -0
  242. package/dist/ace-editor/ace/mode-zig.js +585 -0
  243. package/dist/ace-editor/ace/snippets/abap.js +9 -0
  244. package/dist/ace-editor/ace/snippets/abc.js +16 -0
  245. package/dist/ace-editor/ace/snippets/actionscript.js +16 -0
  246. package/dist/ace-editor/ace/snippets/ada.js +9 -0
  247. package/dist/ace-editor/ace/snippets/alda.js +9 -0
  248. package/dist/ace-editor/ace/snippets/apache_conf.js +9 -0
  249. package/dist/ace-editor/ace/snippets/apex.js +9 -0
  250. package/dist/ace-editor/ace/snippets/applescript.js +9 -0
  251. package/dist/ace-editor/ace/snippets/aql.js +9 -0
  252. package/dist/ace-editor/ace/snippets/asciidoc.js +9 -0
  253. package/dist/ace-editor/ace/snippets/asl.js +9 -0
  254. package/dist/ace-editor/ace/snippets/assembly_arm32.js +9 -0
  255. package/dist/ace-editor/ace/snippets/assembly_x86.js +9 -0
  256. package/dist/ace-editor/ace/snippets/astro.js +9 -0
  257. package/dist/ace-editor/ace/snippets/autohotkey.js +9 -0
  258. package/dist/ace-editor/ace/snippets/basic.js +9 -0
  259. package/dist/ace-editor/ace/snippets/batchfile.js +9 -0
  260. package/dist/ace-editor/ace/snippets/bibtex.js +9 -0
  261. package/dist/ace-editor/ace/snippets/c9search.js +9 -0
  262. package/dist/ace-editor/ace/snippets/c_cpp.js +16 -0
  263. package/dist/ace-editor/ace/snippets/cedar.js +16 -0
  264. package/dist/ace-editor/ace/snippets/cedarschema.js +16 -0
  265. package/dist/ace-editor/ace/snippets/cirru.js +9 -0
  266. package/dist/ace-editor/ace/snippets/clojure.js +16 -0
  267. package/dist/ace-editor/ace/snippets/clue.js +9 -0
  268. package/dist/ace-editor/ace/snippets/cobol.js +9 -0
  269. package/dist/ace-editor/ace/snippets/coffee.js +16 -0
  270. package/dist/ace-editor/ace/snippets/coldfusion.js +9 -0
  271. package/dist/ace-editor/ace/snippets/crystal.js +9 -0
  272. package/dist/ace-editor/ace/snippets/csharp.js +9 -0
  273. package/dist/ace-editor/ace/snippets/csound_document.js +16 -0
  274. package/dist/ace-editor/ace/snippets/csound_orchestra.js +16 -0
  275. package/dist/ace-editor/ace/snippets/csound_score.js +9 -0
  276. package/dist/ace-editor/ace/snippets/csp.js +9 -0
  277. package/dist/ace-editor/ace/snippets/css.js +16 -0
  278. package/dist/ace-editor/ace/snippets/csv.js +9 -0
  279. package/dist/ace-editor/ace/snippets/curly.js +9 -0
  280. package/dist/ace-editor/ace/snippets/cuttlefish.js +9 -0
  281. package/dist/ace-editor/ace/snippets/d.js +9 -0
  282. package/dist/ace-editor/ace/snippets/dart.js +16 -0
  283. package/dist/ace-editor/ace/snippets/diff.js +16 -0
  284. package/dist/ace-editor/ace/snippets/django.js +16 -0
  285. package/dist/ace-editor/ace/snippets/dockerfile.js +9 -0
  286. package/dist/ace-editor/ace/snippets/dot.js +9 -0
  287. package/dist/ace-editor/ace/snippets/drools.js +16 -0
  288. package/dist/ace-editor/ace/snippets/edifact.js +16 -0
  289. package/dist/ace-editor/ace/snippets/eiffel.js +9 -0
  290. package/dist/ace-editor/ace/snippets/ejs.js +9 -0
  291. package/dist/ace-editor/ace/snippets/elixir.js +9 -0
  292. package/dist/ace-editor/ace/snippets/elm.js +9 -0
  293. package/dist/ace-editor/ace/snippets/erlang.js +16 -0
  294. package/dist/ace-editor/ace/snippets/flix.js +9 -0
  295. package/dist/ace-editor/ace/snippets/forth.js +9 -0
  296. package/dist/ace-editor/ace/snippets/fortran.js +9 -0
  297. package/dist/ace-editor/ace/snippets/fsharp.js +9 -0
  298. package/dist/ace-editor/ace/snippets/fsl.js +16 -0
  299. package/dist/ace-editor/ace/snippets/ftl.js +9 -0
  300. package/dist/ace-editor/ace/snippets/gcode.js +9 -0
  301. package/dist/ace-editor/ace/snippets/gherkin.js +9 -0
  302. package/dist/ace-editor/ace/snippets/gitignore.js +9 -0
  303. package/dist/ace-editor/ace/snippets/glsl.js +9 -0
  304. package/dist/ace-editor/ace/snippets/gobstones.js +16 -0
  305. package/dist/ace-editor/ace/snippets/golang.js +9 -0
  306. package/dist/ace-editor/ace/snippets/graphqlschema.js +16 -0
  307. package/dist/ace-editor/ace/snippets/groovy.js +9 -0
  308. package/dist/ace-editor/ace/snippets/groq.js +9 -0
  309. package/dist/ace-editor/ace/snippets/haml.js +16 -0
  310. package/dist/ace-editor/ace/snippets/handlebars.js +9 -0
  311. package/dist/ace-editor/ace/snippets/haskell.js +16 -0
  312. package/dist/ace-editor/ace/snippets/haskell_cabal.js +9 -0
  313. package/dist/ace-editor/ace/snippets/haxe.js +9 -0
  314. package/dist/ace-editor/ace/snippets/hjson.js +9 -0
  315. package/dist/ace-editor/ace/snippets/html.js +16 -0
  316. package/dist/ace-editor/ace/snippets/html_elixir.js +9 -0
  317. package/dist/ace-editor/ace/snippets/html_ruby.js +9 -0
  318. package/dist/ace-editor/ace/snippets/ini.js +9 -0
  319. package/dist/ace-editor/ace/snippets/io.js +74 -0
  320. package/dist/ace-editor/ace/snippets/ion.js +9 -0
  321. package/dist/ace-editor/ace/snippets/jack.js +9 -0
  322. package/dist/ace-editor/ace/snippets/jade.js +9 -0
  323. package/dist/ace-editor/ace/snippets/java.js +16 -0
  324. package/dist/ace-editor/ace/snippets/javascript.js +16 -0
  325. package/dist/ace-editor/ace/snippets/jexl.js +9 -0
  326. package/dist/ace-editor/ace/snippets/json.js +9 -0
  327. package/dist/ace-editor/ace/snippets/json5.js +9 -0
  328. package/dist/ace-editor/ace/snippets/jsoniq.js +78 -0
  329. package/dist/ace-editor/ace/snippets/jsp.js +16 -0
  330. package/dist/ace-editor/ace/snippets/jssm.js +9 -0
  331. package/dist/ace-editor/ace/snippets/jsx.js +9 -0
  332. package/dist/ace-editor/ace/snippets/julia.js +9 -0
  333. package/dist/ace-editor/ace/snippets/kotlin.js +9 -0
  334. package/dist/ace-editor/ace/snippets/latex.js +9 -0
  335. package/dist/ace-editor/ace/snippets/latte.js +9 -0
  336. package/dist/ace-editor/ace/snippets/less.js +9 -0
  337. package/dist/ace-editor/ace/snippets/liquid.js +16 -0
  338. package/dist/ace-editor/ace/snippets/lisp.js +9 -0
  339. package/dist/ace-editor/ace/snippets/livescript.js +9 -0
  340. package/dist/ace-editor/ace/snippets/logiql.js +9 -0
  341. package/dist/ace-editor/ace/snippets/logtalk.js +9 -0
  342. package/dist/ace-editor/ace/snippets/lsl.js +16 -0
  343. package/dist/ace-editor/ace/snippets/lua.js +16 -0
  344. package/dist/ace-editor/ace/snippets/luapage.js +9 -0
  345. package/dist/ace-editor/ace/snippets/lucene.js +9 -0
  346. package/dist/ace-editor/ace/snippets/makefile.js +16 -0
  347. package/dist/ace-editor/ace/snippets/mariadb.js +9 -0
  348. package/dist/ace-editor/ace/snippets/markdown.js +16 -0
  349. package/dist/ace-editor/ace/snippets/mask.js +9 -0
  350. package/dist/ace-editor/ace/snippets/matlab.js +9 -0
  351. package/dist/ace-editor/ace/snippets/maze.js +16 -0
  352. package/dist/ace-editor/ace/snippets/mediawiki.js +9 -0
  353. package/dist/ace-editor/ace/snippets/mel.js +9 -0
  354. package/dist/ace-editor/ace/snippets/mips.js +9 -0
  355. package/dist/ace-editor/ace/snippets/mixal.js +9 -0
  356. package/dist/ace-editor/ace/snippets/mushcode.js +9 -0
  357. package/dist/ace-editor/ace/snippets/mysql.js +9 -0
  358. package/dist/ace-editor/ace/snippets/nasal.js +9 -0
  359. package/dist/ace-editor/ace/snippets/nginx.js +9 -0
  360. package/dist/ace-editor/ace/snippets/nim.js +9 -0
  361. package/dist/ace-editor/ace/snippets/nix.js +9 -0
  362. package/dist/ace-editor/ace/snippets/nsis.js +9 -0
  363. package/dist/ace-editor/ace/snippets/nunjucks.js +9 -0
  364. package/dist/ace-editor/ace/snippets/objectivec.js +9 -0
  365. package/dist/ace-editor/ace/snippets/ocaml.js +9 -0
  366. package/dist/ace-editor/ace/snippets/odin.js +9 -0
  367. package/dist/ace-editor/ace/snippets/partiql.js +9 -0
  368. package/dist/ace-editor/ace/snippets/pascal.js +9 -0
  369. package/dist/ace-editor/ace/snippets/perl.js +16 -0
  370. package/dist/ace-editor/ace/snippets/pgsql.js +9 -0
  371. package/dist/ace-editor/ace/snippets/php.js +16 -0
  372. package/dist/ace-editor/ace/snippets/php_laravel_blade.js +9 -0
  373. package/dist/ace-editor/ace/snippets/pig.js +9 -0
  374. package/dist/ace-editor/ace/snippets/plain_text.js +9 -0
  375. package/dist/ace-editor/ace/snippets/plsql.js +9 -0
  376. package/dist/ace-editor/ace/snippets/powershell.js +9 -0
  377. package/dist/ace-editor/ace/snippets/praat.js +9 -0
  378. package/dist/ace-editor/ace/snippets/prisma.js +9 -0
  379. package/dist/ace-editor/ace/snippets/prolog.js +9 -0
  380. package/dist/ace-editor/ace/snippets/properties.js +9 -0
  381. package/dist/ace-editor/ace/snippets/protobuf.js +9 -0
  382. package/dist/ace-editor/ace/snippets/prql.js +9 -0
  383. package/dist/ace-editor/ace/snippets/puppet.js +9 -0
  384. package/dist/ace-editor/ace/snippets/python.js +16 -0
  385. package/dist/ace-editor/ace/snippets/qml.js +9 -0
  386. package/dist/ace-editor/ace/snippets/r.js +16 -0
  387. package/dist/ace-editor/ace/snippets/raku.js +9 -0
  388. package/dist/ace-editor/ace/snippets/razor.js +16 -0
  389. package/dist/ace-editor/ace/snippets/rdoc.js +9 -0
  390. package/dist/ace-editor/ace/snippets/red.js +9 -0
  391. package/dist/ace-editor/ace/snippets/redshift.js +9 -0
  392. package/dist/ace-editor/ace/snippets/rhtml.js +9 -0
  393. package/dist/ace-editor/ace/snippets/robot.js +16 -0
  394. package/dist/ace-editor/ace/snippets/rst.js +16 -0
  395. package/dist/ace-editor/ace/snippets/ruby.js +16 -0
  396. package/dist/ace-editor/ace/snippets/rust.js +9 -0
  397. package/dist/ace-editor/ace/snippets/sac.js +9 -0
  398. package/dist/ace-editor/ace/snippets/sass.js +9 -0
  399. package/dist/ace-editor/ace/snippets/scad.js +9 -0
  400. package/dist/ace-editor/ace/snippets/scala.js +9 -0
  401. package/dist/ace-editor/ace/snippets/scheme.js +9 -0
  402. package/dist/ace-editor/ace/snippets/scrypt.js +9 -0
  403. package/dist/ace-editor/ace/snippets/scss.js +9 -0
  404. package/dist/ace-editor/ace/snippets/sh.js +16 -0
  405. package/dist/ace-editor/ace/snippets/sjs.js +9 -0
  406. package/dist/ace-editor/ace/snippets/slim.js +9 -0
  407. package/dist/ace-editor/ace/snippets/smarty.js +9 -0
  408. package/dist/ace-editor/ace/snippets/smithy.js +9 -0
  409. package/dist/ace-editor/ace/snippets/snippets.js +16 -0
  410. package/dist/ace-editor/ace/snippets/soy_template.js +9 -0
  411. package/dist/ace-editor/ace/snippets/space.js +9 -0
  412. package/dist/ace-editor/ace/snippets/sparql.js +9 -0
  413. package/dist/ace-editor/ace/snippets/sql.js +16 -0
  414. package/dist/ace-editor/ace/snippets/sqlserver.js +16 -0
  415. package/dist/ace-editor/ace/snippets/stylus.js +9 -0
  416. package/dist/ace-editor/ace/snippets/svg.js +9 -0
  417. package/dist/ace-editor/ace/snippets/swift.js +9 -0
  418. package/dist/ace-editor/ace/snippets/tcl.js +16 -0
  419. package/dist/ace-editor/ace/snippets/terraform.js +9 -0
  420. package/dist/ace-editor/ace/snippets/tex.js +16 -0
  421. package/dist/ace-editor/ace/snippets/text.js +9 -0
  422. package/dist/ace-editor/ace/snippets/textile.js +16 -0
  423. package/dist/ace-editor/ace/snippets/toml.js +9 -0
  424. package/dist/ace-editor/ace/snippets/tsv.js +9 -0
  425. package/dist/ace-editor/ace/snippets/tsx.js +9 -0
  426. package/dist/ace-editor/ace/snippets/turtle.js +9 -0
  427. package/dist/ace-editor/ace/snippets/twig.js +9 -0
  428. package/dist/ace-editor/ace/snippets/typescript.js +9 -0
  429. package/dist/ace-editor/ace/snippets/vala.js +199 -0
  430. package/dist/ace-editor/ace/snippets/vbscript.js +9 -0
  431. package/dist/ace-editor/ace/snippets/velocity.js +17 -0
  432. package/dist/ace-editor/ace/snippets/verilog.js +9 -0
  433. package/dist/ace-editor/ace/snippets/vhdl.js +9 -0
  434. package/dist/ace-editor/ace/snippets/visualforce.js +9 -0
  435. package/dist/ace-editor/ace/snippets/vue.js +9 -0
  436. package/dist/ace-editor/ace/snippets/wollok.js +16 -0
  437. package/dist/ace-editor/ace/snippets/xml.js +9 -0
  438. package/dist/ace-editor/ace/snippets/xquery.js +78 -0
  439. package/dist/ace-editor/ace/snippets/yaml.js +9 -0
  440. package/dist/ace-editor/ace/snippets/zeek.js +9 -0
  441. package/dist/ace-editor/ace/snippets/zig.js +9 -0
  442. package/dist/ace-editor/ace/theme-ambiance.js +18 -0
  443. package/dist/ace-editor/ace/theme-chaos.js +18 -0
  444. package/dist/ace-editor/ace/theme-chrome.js +18 -0
  445. package/dist/ace-editor/ace/theme-cloud9_day.js +19 -0
  446. package/dist/ace-editor/ace/theme-cloud9_night.js +18 -0
  447. package/dist/ace-editor/ace/theme-cloud9_night_low_color.js +18 -0
  448. package/dist/ace-editor/ace/theme-cloud_editor.js +19 -0
  449. package/dist/ace-editor/ace/theme-cloud_editor_dark.js +19 -0
  450. package/dist/ace-editor/ace/theme-clouds.js +18 -0
  451. package/dist/ace-editor/ace/theme-clouds_midnight.js +18 -0
  452. package/dist/ace-editor/ace/theme-cobalt.js +18 -0
  453. package/dist/ace-editor/ace/theme-crimson_editor.js +18 -0
  454. package/dist/ace-editor/ace/theme-dawn.js +18 -0
  455. package/dist/ace-editor/ace/theme-dracula.js +19 -0
  456. package/dist/ace-editor/ace/theme-dreamweaver.js +18 -0
  457. package/dist/ace-editor/ace/theme-eclipse.js +19 -0
  458. package/dist/ace-editor/ace/theme-github.js +18 -0
  459. package/dist/ace-editor/ace/theme-github_dark.js +18 -0
  460. package/dist/ace-editor/ace/theme-github_light_default.js +18 -0
  461. package/dist/ace-editor/ace/theme-gob.js +18 -0
  462. package/dist/ace-editor/ace/theme-gruvbox.js +18 -0
  463. package/dist/ace-editor/ace/theme-gruvbox_dark_hard.js +18 -0
  464. package/dist/ace-editor/ace/theme-gruvbox_light_hard.js +18 -0
  465. package/dist/ace-editor/ace/theme-idle_fingers.js +18 -0
  466. package/dist/ace-editor/ace/theme-iplastic.js +18 -0
  467. package/dist/ace-editor/ace/theme-katzenmilch.js +18 -0
  468. package/dist/ace-editor/ace/theme-kr_theme.js +18 -0
  469. package/dist/ace-editor/ace/theme-kuroir.js +18 -0
  470. package/dist/ace-editor/ace/theme-merbivore.js +18 -0
  471. package/dist/ace-editor/ace/theme-merbivore_soft.js +18 -0
  472. package/dist/ace-editor/ace/theme-mono_industrial.js +18 -0
  473. package/dist/ace-editor/ace/theme-monokai.js +18 -0
  474. package/dist/ace-editor/ace/theme-nord_dark.js +19 -0
  475. package/dist/ace-editor/ace/theme-one_dark.js +18 -0
  476. package/dist/ace-editor/ace/theme-pastel_on_dark.js +18 -0
  477. package/dist/ace-editor/ace/theme-solarized_dark.js +18 -0
  478. package/dist/ace-editor/ace/theme-solarized_light.js +18 -0
  479. package/dist/ace-editor/ace/theme-sqlserver.js +18 -0
  480. package/dist/ace-editor/ace/theme-terminal.js +18 -0
  481. package/dist/ace-editor/ace/theme-textmate.js +16 -0
  482. package/dist/ace-editor/ace/theme-tomorrow.js +18 -0
  483. package/dist/ace-editor/ace/theme-tomorrow_night.js +18 -0
  484. package/dist/ace-editor/ace/theme-tomorrow_night_blue.js +18 -0
  485. package/dist/ace-editor/ace/theme-tomorrow_night_bright.js +18 -0
  486. package/dist/ace-editor/ace/theme-tomorrow_night_eighties.js +18 -0
  487. package/dist/ace-editor/ace/theme-twilight.js +18 -0
  488. package/dist/ace-editor/ace/theme-vibrant_ink.js +18 -0
  489. package/dist/ace-editor/ace/theme-xcode.js +18 -0
  490. package/dist/ace-editor/ace/worker-base.js +1337 -0
  491. package/dist/ace-editor/ace/worker-coffee.js +1386 -0
  492. package/dist/ace-editor/ace/worker-css.js +8918 -0
  493. package/dist/ace-editor/ace/worker-html.js +10848 -0
  494. package/dist/ace-editor/ace/worker-javascript.js +15358 -0
  495. package/dist/ace-editor/ace/worker-json.js +1631 -0
  496. package/dist/ace-editor/ace/worker-lua.js +3524 -0
  497. package/dist/ace-editor/ace/worker-php.js +3793 -0
  498. package/dist/ace-editor/ace/worker-xml.js +3127 -0
  499. package/dist/ace-editor/ace/worker-xquery.js +57584 -0
  500. package/dist/ace-editor/ace/worker-yaml.js +5824 -0
  501. package/dist/ace-editor/internal/AceEditor.d.ts +22 -0
  502. package/dist/ace-editor/internal/AceEditor.js +113 -0
  503. package/dist/ace-editor/internal/AceEditor.js.map +1 -0
  504. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.d.ts +55 -0
  505. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js +205 -0
  506. package/dist/ace-editor/internal/ace-editor-base/AceEditorBase.js.map +1 -0
  507. package/dist/ace-editor/internal/ace-editor-base/debounce.d.ts +24 -0
  508. package/dist/ace-editor/internal/ace-editor-base/debounce.js +41 -0
  509. package/dist/ace-editor/internal/ace-editor-base/debounce.js.map +1 -0
  510. package/dist/ace-editor/internal/ace-editor-base/property-decorators.d.ts +66 -0
  511. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js +171 -0
  512. package/dist/ace-editor/internal/ace-editor-base/property-decorators.js.map +1 -0
  513. package/dist/ace-editor/internal/ace-theme-oscd.d.ts +1 -0
  514. package/dist/ace-editor/internal/ace-theme-oscd.js +247 -0
  515. package/dist/ace-editor/internal/ace-theme-oscd.js.map +1 -0
  516. package/dist/ace-editor/internal/ace.config.d.ts +54 -0
  517. package/dist/ace-editor/internal/ace.config.js +61 -0
  518. package/dist/ace-editor/internal/ace.config.js.map +1 -0
  519. package/dist/ace-editor/oscd-ace-editor.d.ts +2 -0
  520. package/dist/ace-editor/oscd-ace-editor.js +4 -0
  521. package/dist/ace-editor/oscd-ace-editor.js.map +1 -0
  522. package/dist/action-icon/OscdActionIcon.js +1 -3
  523. package/dist/action-icon/OscdActionIcon.js.map +1 -1
  524. package/dist/action-list/OscdActionList.js +8 -8
  525. package/dist/action-list/OscdActionList.js.map +1 -1
  526. package/dist/action-pane/OscdActionPane.js +1 -3
  527. package/dist/action-pane/OscdActionPane.js.map +1 -1
  528. package/dist/action-tree/OscdActionTree.d.ts +2 -0
  529. package/dist/action-tree/OscdActionTree.js +32 -62
  530. package/dist/action-tree/OscdActionTree.js.map +1 -1
  531. package/dist/action-tree/oscd-action-tree.spec.js +2 -2
  532. package/dist/action-tree/oscd-action-tree.spec.js.map +1 -1
  533. package/dist/app-bar/OscdAppBar.d.ts +1 -1
  534. package/dist/app-bar/OscdAppBar.js +1 -1
  535. package/dist/app-bar/OscdAppBar.js.map +1 -1
  536. package/dist/app-bar/oscd-app-bar.d.ts +1 -1
  537. package/dist/app-bar/oscd-app-bar.js +1 -1
  538. package/dist/app-bar/oscd-app-bar.js.map +1 -1
  539. package/dist/button/OscdElevatedButton.d.ts +1 -1
  540. package/dist/button/OscdElevatedButton.js +1 -1
  541. package/dist/button/OscdElevatedButton.js.map +1 -1
  542. package/dist/button/OscdFilledButton.d.ts +1 -1
  543. package/dist/button/OscdFilledButton.js +1 -1
  544. package/dist/button/OscdFilledButton.js.map +1 -1
  545. package/dist/button/OscdFilledTonalButton.d.ts +1 -1
  546. package/dist/button/OscdFilledTonalButton.js +1 -1
  547. package/dist/button/OscdFilledTonalButton.js.map +1 -1
  548. package/dist/button/OscdOutlinedButton.d.ts +1 -1
  549. package/dist/button/OscdOutlinedButton.js +1 -1
  550. package/dist/button/OscdOutlinedButton.js.map +1 -1
  551. package/dist/button/OscdTextButton.d.ts +1 -1
  552. package/dist/button/OscdTextButton.js +1 -1
  553. package/dist/button/OscdTextButton.js.map +1 -1
  554. package/dist/checkbox/OscdCheckbox.d.ts +1 -1
  555. package/dist/checkbox/OscdCheckbox.js +1 -1
  556. package/dist/checkbox/OscdCheckbox.js.map +1 -1
  557. package/dist/chips/OscdAssistChip.d.ts +1 -1
  558. package/dist/chips/OscdAssistChip.js +1 -1
  559. package/dist/chips/OscdAssistChip.js.map +1 -1
  560. package/dist/chips/OscdChipSet.d.ts +1 -1
  561. package/dist/chips/OscdChipSet.js.map +1 -1
  562. package/dist/chips/OscdFilterChip.d.ts +1 -1
  563. package/dist/chips/OscdFilterChip.js +1 -1
  564. package/dist/chips/OscdFilterChip.js.map +1 -1
  565. package/dist/chips/OscdInputChip.d.ts +1 -1
  566. package/dist/chips/OscdInputChip.js +1 -1
  567. package/dist/chips/OscdInputChip.js.map +1 -1
  568. package/dist/chips/OscdSuggestionChip.d.ts +1 -1
  569. package/dist/chips/OscdSuggestionChip.js +1 -1
  570. package/dist/chips/OscdSuggestionChip.js.map +1 -1
  571. package/dist/decorators/localstorage.js.map +1 -1
  572. package/dist/dialog/OscdDialog.d.ts +1 -1
  573. package/dist/dialog/OscdDialog.js +1 -1
  574. package/dist/dialog/OscdDialog.js.map +1 -1
  575. package/dist/dialog/warning/OscdWarnDialog.d.ts +31 -0
  576. package/dist/dialog/warning/OscdWarnDialog.js +74 -0
  577. package/dist/dialog/warning/OscdWarnDialog.js.map +1 -0
  578. package/dist/dialog/warning/oscd-warn-dialog.d.ts +2 -0
  579. package/dist/dialog/warning/oscd-warn-dialog.js +4 -0
  580. package/dist/dialog/warning/oscd-warn-dialog.js.map +1 -0
  581. package/dist/divider/OscdDivider.d.ts +1 -1
  582. package/dist/divider/OscdDivider.js.map +1 -1
  583. package/dist/elevation/OscdElevation.d.ts +1 -1
  584. package/dist/elevation/OscdElevation.js.map +1 -1
  585. package/dist/fab/OscdBrandedFab.d.ts +1 -1
  586. package/dist/fab/OscdBrandedFab.js +1 -1
  587. package/dist/fab/OscdBrandedFab.js.map +1 -1
  588. package/dist/fab/OscdFab.d.ts +1 -1
  589. package/dist/fab/OscdFab.js +1 -1
  590. package/dist/fab/OscdFab.js.map +1 -1
  591. package/dist/field/OscdFilledField.d.ts +1 -1
  592. package/dist/field/OscdFilledField.js.map +1 -1
  593. package/dist/field/OscdOutlinedField.d.ts +1 -1
  594. package/dist/field/OscdOutlinedField.js.map +1 -1
  595. package/dist/filter-button/OscdFilterButton.js.map +1 -1
  596. package/dist/focus/OscdFocusRing.d.ts +1 -1
  597. package/dist/focus/OscdFocusRing.js.map +1 -1
  598. package/dist/icon/OscdIcon.d.ts +1 -1
  599. package/dist/icon/OscdIcon.js +1 -1
  600. package/dist/icon/OscdIcon.js.map +1 -1
  601. package/dist/icon/internal/icon.d.ts +1 -1
  602. package/dist/icon/internal/icon.js +1 -1
  603. package/dist/icon/internal/icon.js.map +1 -1
  604. package/dist/iconbutton/OscdFilledIconButton.d.ts +1 -1
  605. package/dist/iconbutton/OscdFilledIconButton.js +1 -1
  606. package/dist/iconbutton/OscdFilledIconButton.js.map +1 -1
  607. package/dist/iconbutton/OscdFilledTonalIconButton.d.ts +1 -1
  608. package/dist/iconbutton/OscdFilledTonalIconButton.js +1 -1
  609. package/dist/iconbutton/OscdFilledTonalIconButton.js.map +1 -1
  610. package/dist/iconbutton/OscdIconButton.d.ts +1 -1
  611. package/dist/iconbutton/OscdIconButton.js +1 -1
  612. package/dist/iconbutton/OscdIconButton.js.map +1 -1
  613. package/dist/iconbutton/OscdOutlinedIconButton.d.ts +1 -1
  614. package/dist/iconbutton/OscdOutlinedIconButton.js +1 -1
  615. package/dist/iconbutton/OscdOutlinedIconButton.js.map +1 -1
  616. package/dist/labs/badge/OscdBadge.d.ts +1 -1
  617. package/dist/labs/badge/OscdBadge.js.map +1 -1
  618. package/dist/labs/card/OscdElevatedCard.d.ts +1 -1
  619. package/dist/labs/card/OscdElevatedCard.js +1 -1
  620. package/dist/labs/card/OscdElevatedCard.js.map +1 -1
  621. package/dist/labs/card/OscdFilledCard.d.ts +1 -1
  622. package/dist/labs/card/OscdFilledCard.js +1 -1
  623. package/dist/labs/card/OscdFilledCard.js.map +1 -1
  624. package/dist/labs/card/OscdOutlinedCard.d.ts +1 -1
  625. package/dist/labs/card/OscdOutlinedCard.js +1 -1
  626. package/dist/labs/card/OscdOutlinedCard.js.map +1 -1
  627. package/dist/labs/item/OscdItem.d.ts +1 -1
  628. package/dist/labs/item/OscdItem.js.map +1 -1
  629. package/dist/labs/navigationbar/OscdNavigationBar.d.ts +1 -1
  630. package/dist/labs/navigationbar/OscdNavigationBar.js +1 -1
  631. package/dist/labs/navigationbar/OscdNavigationBar.js.map +1 -1
  632. package/dist/labs/navigationtab/OscdNavigationTab.d.ts +1 -1
  633. package/dist/labs/navigationtab/OscdNavigationTab.js +1 -1
  634. package/dist/labs/navigationtab/OscdNavigationTab.js.map +1 -1
  635. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.d.ts +1 -1
  636. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js +1 -1
  637. package/dist/labs/segmentedbutton/OscdOutlinedSegmentedButton.js.map +1 -1
  638. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.d.ts +1 -1
  639. package/dist/labs/segmentedbuttonset/OscdOutlinedSegmentedButtonSet.js.map +1 -1
  640. package/dist/list/OscdList.d.ts +1 -1
  641. package/dist/list/OscdList.js.map +1 -1
  642. package/dist/list/OscdListItem.d.ts +1 -1
  643. package/dist/list/OscdListItem.js +1 -1
  644. package/dist/list/OscdListItem.js.map +1 -1
  645. package/dist/menu/OscdMenu.d.ts +1 -1
  646. package/dist/menu/OscdMenu.js +1 -1
  647. package/dist/menu/OscdMenu.js.map +1 -1
  648. package/dist/menu/OscdMenuItem.d.ts +1 -1
  649. package/dist/menu/OscdMenuItem.js +1 -1
  650. package/dist/menu/OscdMenuItem.js.map +1 -1
  651. package/dist/menu/OscdSubMenu.d.ts +1 -1
  652. package/dist/menu/OscdSubMenu.js.map +1 -1
  653. package/dist/navigation-drawer/OscdNavigationDrawer.d.ts +1 -1
  654. package/dist/navigation-drawer/OscdNavigationDrawer.js +1 -1
  655. package/dist/navigation-drawer/OscdNavigationDrawer.js.map +1 -1
  656. package/dist/navigation-drawer/OscdNavigationDrawerHeader.d.ts +1 -1
  657. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js +1 -1
  658. package/dist/navigation-drawer/OscdNavigationDrawerHeader.js.map +1 -1
  659. package/dist/progress/OscdCircularProgress.d.ts +1 -1
  660. package/dist/progress/OscdCircularProgress.js.map +1 -1
  661. package/dist/progress/OscdLinearProgress.d.ts +1 -1
  662. package/dist/progress/OscdLinearProgress.js.map +1 -1
  663. package/dist/radio/OscdRadio.d.ts +1 -1
  664. package/dist/radio/OscdRadio.js +1 -1
  665. package/dist/radio/OscdRadio.js.map +1 -1
  666. package/dist/ripple/OscdRipple.d.ts +1 -1
  667. package/dist/ripple/OscdRipple.js.map +1 -1
  668. package/dist/scl-checkbox/OscdSclCheckbox.js +1 -3
  669. package/dist/scl-checkbox/OscdSclCheckbox.js.map +1 -1
  670. package/dist/scl-icon/OscdSclIcon.d.ts +1 -1
  671. package/dist/scl-icon/OscdSclIcon.js +1 -1
  672. package/dist/scl-icon/OscdSclIcon.js.map +1 -1
  673. package/dist/search-field/internal/OutlinedSearchField.js.map +1 -1
  674. package/dist/search-field/oscd-outlined-search-field.spec.js +5 -6
  675. package/dist/search-field/oscd-outlined-search-field.spec.js.map +1 -1
  676. package/dist/select/OscdFilledSelect.d.ts +1 -1
  677. package/dist/select/OscdFilledSelect.js +1 -1
  678. package/dist/select/OscdFilledSelect.js.map +1 -1
  679. package/dist/select/OscdOutlinedSelect.d.ts +1 -1
  680. package/dist/select/OscdOutlinedSelect.js +1 -1
  681. package/dist/select/OscdOutlinedSelect.js.map +1 -1
  682. package/dist/select/OscdSelectOption.d.ts +1 -1
  683. package/dist/select/OscdSelectOption.js +1 -1
  684. package/dist/select/OscdSelectOption.js.map +1 -1
  685. package/dist/selection-list/OscdSelectionList.js.map +1 -1
  686. package/dist/slider/OscdSlider.d.ts +1 -1
  687. package/dist/slider/OscdSlider.js +1 -1
  688. package/dist/slider/OscdSlider.js.map +1 -1
  689. package/dist/switch/OscdSwitch.d.ts +1 -1
  690. package/dist/switch/OscdSwitch.js +1 -1
  691. package/dist/switch/OscdSwitch.js.map +1 -1
  692. package/dist/tabs/OscdPrimaryTab.d.ts +1 -1
  693. package/dist/tabs/OscdPrimaryTab.js +1 -1
  694. package/dist/tabs/OscdPrimaryTab.js.map +1 -1
  695. package/dist/tabs/OscdPrimaryTab.stories.js +1 -3
  696. package/dist/tabs/OscdPrimaryTab.stories.js.map +1 -1
  697. package/dist/tabs/OscdSecondaryTab.d.ts +1 -1
  698. package/dist/tabs/OscdSecondaryTab.js +1 -1
  699. package/dist/tabs/OscdSecondaryTab.js.map +1 -1
  700. package/dist/tabs/OscdSecondaryTab.stories.js +1 -3
  701. package/dist/tabs/OscdSecondaryTab.stories.js.map +1 -1
  702. package/dist/tabs/OscdTabs.d.ts +1 -1
  703. package/dist/tabs/OscdTabs.js +1 -1
  704. package/dist/tabs/OscdTabs.js.map +1 -1
  705. package/dist/textfield/OscdFilledTextField.d.ts +1 -1
  706. package/dist/textfield/OscdFilledTextField.js +1 -1
  707. package/dist/textfield/OscdFilledTextField.js.map +1 -1
  708. package/dist/textfield/OscdOutlinedTextField.d.ts +1 -1
  709. package/dist/textfield/OscdOutlinedTextField.js +1 -1
  710. package/dist/textfield/OscdOutlinedTextField.js.map +1 -1
  711. package/dist/tree/OscdTree.stories.js +22 -4
  712. package/dist/tree/OscdTree.stories.js.map +1 -1
  713. package/dist/tree/internal/Tree.js +30 -6
  714. package/dist/tree/internal/Tree.js.map +1 -1
  715. package/dist/tree/internal/TreeItem.js +22 -8
  716. package/dist/tree/internal/TreeItem.js.map +1 -1
  717. package/dist/tree-grid/OscdTreeGrid.js +1 -4
  718. package/dist/tree-grid/OscdTreeGrid.js.map +1 -1
  719. package/dist/utils/storybook/getStorybookHelpers.js +2 -2
  720. package/dist/utils/storybook/getStorybookHelpers.js.map +1 -1
  721. package/dist/utils/storybook/getStorybookMeta.d.ts +5 -0
  722. package/dist/utils/storybook/getStorybookMeta.js +2 -1
  723. package/dist/utils/storybook/getStorybookMeta.js.map +1 -1
  724. package/package.json +39 -71
@@ -0,0 +1,3278 @@
1
+ ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2
+ var oop = require("../lib/oop");
3
+ var lang = require("../lib/lang");
4
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
5
+ 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";
6
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
7
+ 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|flex-end|flex-start|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";
8
+ 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";
9
+ 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";
10
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
11
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
12
+ 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";
13
+ var CssHighlightRules = function () {
14
+ var keywordMapper = this.createKeywordMapper({
15
+ "support.function": supportFunction,
16
+ "support.constant": supportConstant,
17
+ "support.type": supportType,
18
+ "support.constant.color": supportConstantColor,
19
+ "support.constant.fonts": supportConstantFonts
20
+ }, "text", true);
21
+ this.$rules = {
22
+ "start": [{
23
+ include: ["strings", "url", "comments"]
24
+ }, {
25
+ token: "paren.lparen",
26
+ regex: "\\{",
27
+ next: "ruleset"
28
+ }, {
29
+ token: "paren.rparen",
30
+ regex: "\\}"
31
+ }, {
32
+ token: "string",
33
+ regex: "@(?!viewport)",
34
+ next: "media"
35
+ }, {
36
+ token: "keyword",
37
+ regex: "#[a-z0-9-_]+"
38
+ }, {
39
+ token: "keyword",
40
+ regex: "%"
41
+ }, {
42
+ token: "variable",
43
+ regex: "\\.[a-z0-9-_]+"
44
+ }, {
45
+ token: "string",
46
+ regex: ":[a-z0-9-_]+"
47
+ }, {
48
+ token: "constant.numeric",
49
+ regex: numRe
50
+ }, {
51
+ token: "constant",
52
+ regex: "[a-z0-9-_]+"
53
+ }, {
54
+ caseInsensitive: true
55
+ }],
56
+ "media": [{
57
+ include: ["strings", "url", "comments"]
58
+ }, {
59
+ token: "paren.lparen",
60
+ regex: "\\{",
61
+ next: "start"
62
+ }, {
63
+ token: "paren.rparen",
64
+ regex: "\\}",
65
+ next: "start"
66
+ }, {
67
+ token: "string",
68
+ regex: ";",
69
+ next: "start"
70
+ }, {
71
+ token: "keyword",
72
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
73
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
74
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
75
+ }],
76
+ "comments": [{
77
+ token: "comment", // multi line comment
78
+ regex: "\\/\\*",
79
+ push: [{
80
+ token: "comment",
81
+ regex: "\\*\\/",
82
+ next: "pop"
83
+ }, {
84
+ defaultToken: "comment"
85
+ }]
86
+ }],
87
+ "ruleset": [{
88
+ regex: "-(webkit|ms|moz|o)-",
89
+ token: "text"
90
+ }, {
91
+ token: "punctuation.operator",
92
+ regex: "[:;]"
93
+ }, {
94
+ token: "paren.rparen",
95
+ regex: "\\}",
96
+ next: "start"
97
+ }, {
98
+ include: ["strings", "url", "comments"]
99
+ }, {
100
+ token: ["constant.numeric", "keyword"],
101
+ 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|%)"
102
+ }, {
103
+ token: "constant.numeric",
104
+ regex: numRe
105
+ }, {
106
+ token: "constant.numeric", // hex6 color
107
+ regex: "#[a-f0-9]{6}"
108
+ }, {
109
+ token: "constant.numeric", // hex3 color
110
+ regex: "#[a-f0-9]{3}"
111
+ }, {
112
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
113
+ regex: pseudoElements
114
+ }, {
115
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
116
+ regex: pseudoClasses
117
+ }, {
118
+ include: "url"
119
+ }, {
120
+ token: keywordMapper,
121
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
122
+ }, {
123
+ token: "paren.lparen",
124
+ regex: "\\{"
125
+ }, {
126
+ caseInsensitive: true
127
+ }],
128
+ url: [{
129
+ token: "support.function",
130
+ regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
131
+ push: [{
132
+ token: "support.function",
133
+ regex: "\\)",
134
+ next: "pop"
135
+ }, {
136
+ defaultToken: "string"
137
+ }]
138
+ }],
139
+ strings: [{
140
+ token: "string.start",
141
+ regex: "'",
142
+ push: [{
143
+ token: "string.end",
144
+ regex: "'|$",
145
+ next: "pop"
146
+ }, {
147
+ include: "escapes"
148
+ }, {
149
+ token: "constant.language.escape",
150
+ regex: /\\$/,
151
+ consumeLineEnd: true
152
+ }, {
153
+ defaultToken: "string"
154
+ }]
155
+ }, {
156
+ token: "string.start",
157
+ regex: '"',
158
+ push: [{
159
+ token: "string.end",
160
+ regex: '"|$',
161
+ next: "pop"
162
+ }, {
163
+ include: "escapes"
164
+ }, {
165
+ token: "constant.language.escape",
166
+ regex: /\\$/,
167
+ consumeLineEnd: true
168
+ }, {
169
+ defaultToken: "string"
170
+ }]
171
+ }],
172
+ escapes: [{
173
+ token: "constant.language.escape",
174
+ regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
175
+ }]
176
+ };
177
+ this.normalizeRules();
178
+ };
179
+ oop.inherits(CssHighlightRules, TextHighlightRules);
180
+ exports.CssHighlightRules = CssHighlightRules;
181
+
182
+ });
183
+
184
+ ace.define("ace/mode/jsdoc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
185
+ var oop = require("../lib/oop");
186
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
187
+ var JsDocCommentHighlightRules = function () {
188
+ this.$rules = {
189
+ "start": [
190
+ {
191
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
192
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
193
+ push: [
194
+ {
195
+ token: "lparen.doc",
196
+ regex: "{",
197
+ push: [
198
+ {
199
+ include: "doc-syntax"
200
+ }, {
201
+ token: "rparen.doc",
202
+ regex: "}|(?=$)",
203
+ next: "pop"
204
+ }
205
+ ]
206
+ }, {
207
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
208
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.\-\'\" ]+)(\])))/,
209
+ next: "pop"
210
+ }, {
211
+ token: "rparen.doc",
212
+ regex: "}|(?=$)",
213
+ next: "pop"
214
+ }, {
215
+ include: "doc-syntax"
216
+ }, {
217
+ defaultToken: "text.doc"
218
+ }
219
+ ]
220
+ }, {
221
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
222
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
223
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
224
+ push: [
225
+ {
226
+ token: "lparen.doc",
227
+ regex: "{",
228
+ push: [
229
+ {
230
+ include: "doc-syntax"
231
+ }, {
232
+ token: "rparen.doc",
233
+ regex: "}|(?=$)",
234
+ next: "pop"
235
+ }
236
+ ]
237
+ }, {
238
+ token: "rparen.doc",
239
+ regex: "}|(?=$)",
240
+ next: "pop"
241
+ }, {
242
+ include: "doc-syntax"
243
+ }, {
244
+ defaultToken: "text.doc"
245
+ }
246
+ ]
247
+ }, {
248
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
249
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
250
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
251
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
252
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
253
+ }, {
254
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
255
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
256
+ }, {
257
+ token: "comment.doc.tag",
258
+ regex: "@access\\s+(?:private|public|protected)"
259
+ }, {
260
+ token: "comment.doc.tag",
261
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
262
+ }, {
263
+ token: "comment.doc.tag",
264
+ regex: "@\\w+(?=\\s|$)"
265
+ },
266
+ JsDocCommentHighlightRules.getTagRule(),
267
+ {
268
+ defaultToken: "comment.doc.body",
269
+ caseInsensitive: true
270
+ }
271
+ ],
272
+ "doc-syntax": [{
273
+ token: "operator.doc",
274
+ regex: /[|:]/
275
+ }, {
276
+ token: "paren.doc",
277
+ regex: /[\[\]]/
278
+ }]
279
+ };
280
+ this.normalizeRules();
281
+ };
282
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
283
+ JsDocCommentHighlightRules.getTagRule = function (start) {
284
+ return {
285
+ token: "comment.doc.tag.storage.type",
286
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
287
+ };
288
+ };
289
+ JsDocCommentHighlightRules.getStartRule = function (start) {
290
+ return {
291
+ token: "comment.doc", // doc comment
292
+ regex: /\/\*\*(?!\/)/,
293
+ next: start
294
+ };
295
+ };
296
+ JsDocCommentHighlightRules.getEndRule = function (start) {
297
+ return {
298
+ token: "comment.doc", // closing comment
299
+ regex: "\\*\\/",
300
+ next: start
301
+ };
302
+ };
303
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
304
+
305
+ });
306
+
307
+ ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/jsdoc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
308
+ var oop = require("../lib/oop");
309
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
310
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
311
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
312
+ var JavaScriptHighlightRules = function (options) {
313
+ var keywords = {
314
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
315
+ "Namespace|QName|XML|XMLList|" + // E4X
316
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
317
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
318
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
319
+ "SyntaxError|TypeError|URIError|" +
320
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
321
+ "isNaN|parseFloat|parseInt|" +
322
+ "JSON|Math|" + // Other
323
+ "this|arguments|prototype|window|document", // Pseudo
324
+ "keyword": "const|yield|import|get|set|async|await|" +
325
+ "break|case|catch|continue|default|delete|do|else|finally|for|" +
326
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
327
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
328
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
329
+ "storage.type": "const|let|var|function",
330
+ "constant.language": "null|Infinity|NaN|undefined",
331
+ "support.function": "alert",
332
+ "constant.language.boolean": "true|false"
333
+ };
334
+ var keywordMapper = this.createKeywordMapper(keywords, "identifier");
335
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
336
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
337
+ "u[0-9a-fA-F]{4}|" + // unicode
338
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
339
+ "[0-2][0-7]{0,2}|" + // oct
340
+ "3[0-7][0-7]?|" + // oct
341
+ "[4-7][0-7]?|" + //oct
342
+ ".)";
343
+ var anonymousFunctionRe = "(function)(\\s*)(\\*?)";
344
+ var functionCallStartRule = {
345
+ token: ["identifier", "text", "paren.lparen"],
346
+ regex: "(\\b(?!" + Object.values(keywords).join("|") + "\\b)" + identifierRe + ")(\\s*)(\\()"
347
+ };
348
+ this.$rules = {
349
+ "no_regex": [
350
+ DocCommentHighlightRules.getStartRule("doc-start"),
351
+ comments("no_regex"),
352
+ functionCallStartRule,
353
+ {
354
+ token: "string",
355
+ regex: "'(?=.)",
356
+ next: "qstring"
357
+ }, {
358
+ token: "string",
359
+ regex: '"(?=.)',
360
+ next: "qqstring"
361
+ }, {
362
+ include: "numeric_constants"
363
+ }, {
364
+ token: [
365
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
366
+ "text", "storage.type", "text", "paren.lparen"
367
+ ],
368
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
369
+ next: "function_arguments"
370
+ }, {
371
+ token: [
372
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
373
+ ],
374
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(" + identifierRe + ")(\\s*)(\\()",
375
+ next: "function_arguments"
376
+ }, {
377
+ token: [
378
+ "entity.name.function", "text", "punctuation.operator",
379
+ "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
380
+ ],
381
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
382
+ next: "function_arguments"
383
+ }, {
384
+ token: [
385
+ "text", "text", "storage.type", "text", "storage.type", "text", "paren.lparen"
386
+ ],
387
+ regex: "(:)(\\s*)" + anonymousFunctionRe + "(\\s*)(\\()",
388
+ next: "function_arguments"
389
+ }, {
390
+ token: "keyword",
391
+ regex: "from(?=\\s*('|\"))"
392
+ }, {
393
+ token: "keyword",
394
+ regex: "(?:" + kwBeforeRe + ")\\b",
395
+ next: "start"
396
+ }, {
397
+ token: "support.constant",
398
+ regex: /that\b/
399
+ }, {
400
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
401
+ regex: /(console)(\.)(warn|info|log|error|debug|time|trace|timeEnd|assert)\b/
402
+ }, {
403
+ token: keywordMapper,
404
+ regex: identifierRe
405
+ }, {
406
+ token: "punctuation.operator",
407
+ regex: /[.](?![.])/,
408
+ next: "property"
409
+ }, {
410
+ token: "storage.type",
411
+ regex: /=>/,
412
+ next: "start"
413
+ }, {
414
+ token: "keyword.operator",
415
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
416
+ next: "start"
417
+ }, {
418
+ token: "punctuation.operator",
419
+ regex: /[?:,;.]/,
420
+ next: "start"
421
+ }, {
422
+ token: "paren.lparen",
423
+ regex: /[\[({]/,
424
+ next: "start"
425
+ }, {
426
+ token: "paren.rparen",
427
+ regex: /[\])}]/
428
+ }, {
429
+ token: "comment",
430
+ regex: /^#!.*$/
431
+ }
432
+ ],
433
+ property: [{
434
+ token: "text",
435
+ regex: "\\s+"
436
+ }, {
437
+ token: "keyword.operator",
438
+ regex: /=/
439
+ }, {
440
+ token: [
441
+ "storage.type", "text", "storage.type", "text", "paren.lparen"
442
+ ],
443
+ regex: anonymousFunctionRe + "(\\s*)(\\()",
444
+ next: "function_arguments"
445
+ }, {
446
+ token: [
447
+ "storage.type", "text", "storage.type", "text", "text", "entity.name.function", "text", "paren.lparen"
448
+ ],
449
+ regex: "(function)(?:(?:(\\s*)(\\*)(\\s*))|(\\s+))(\\w+)(\\s*)(\\()",
450
+ next: "function_arguments"
451
+ }, {
452
+ token: "punctuation.operator",
453
+ regex: /[.](?![.])/
454
+ }, {
455
+ token: "support.function",
456
+ regex: "prototype"
457
+ }, {
458
+ token: "support.function",
459
+ 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|lter|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward|rEach)|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(?=\()/
460
+ }, {
461
+ token: "support.function.dom",
462
+ 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(?=\()/
463
+ }, {
464
+ token: "support.constant",
465
+ 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/
466
+ }, {
467
+ token: "identifier",
468
+ regex: identifierRe
469
+ }, {
470
+ regex: "",
471
+ token: "empty",
472
+ next: "no_regex"
473
+ }
474
+ ],
475
+ "start": [
476
+ DocCommentHighlightRules.getStartRule("doc-start"),
477
+ comments("start"),
478
+ {
479
+ token: "string.regexp",
480
+ regex: "\\/",
481
+ next: "regex"
482
+ }, {
483
+ token: "text",
484
+ regex: "\\s+|^$",
485
+ next: "start"
486
+ }, {
487
+ token: "empty",
488
+ regex: "",
489
+ next: "no_regex"
490
+ }
491
+ ],
492
+ "regex": [
493
+ {
494
+ token: "regexp.keyword.operator",
495
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
496
+ }, {
497
+ token: "string.regexp",
498
+ regex: "/[sxngimy]*",
499
+ next: "no_regex"
500
+ }, {
501
+ token: "invalid",
502
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
503
+ }, {
504
+ token: "constant.language.escape",
505
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
506
+ }, {
507
+ token: "constant.language.delimiter",
508
+ regex: /\|/
509
+ }, {
510
+ token: "constant.language.escape",
511
+ regex: /\[\^?/,
512
+ next: "regex_character_class"
513
+ }, {
514
+ token: "empty",
515
+ regex: "$",
516
+ next: "no_regex"
517
+ }, {
518
+ defaultToken: "string.regexp"
519
+ }
520
+ ],
521
+ "regex_character_class": [
522
+ {
523
+ token: "regexp.charclass.keyword.operator",
524
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
525
+ }, {
526
+ token: "constant.language.escape",
527
+ regex: "]",
528
+ next: "regex"
529
+ }, {
530
+ token: "constant.language.escape",
531
+ regex: "-"
532
+ }, {
533
+ token: "empty",
534
+ regex: "$",
535
+ next: "no_regex"
536
+ }, {
537
+ defaultToken: "string.regexp.charachterclass"
538
+ }
539
+ ],
540
+ "default_parameter": [
541
+ {
542
+ token: "string",
543
+ regex: "'(?=.)",
544
+ push: [
545
+ {
546
+ token: "string",
547
+ regex: "'|$",
548
+ next: "pop"
549
+ }, {
550
+ include: "qstring"
551
+ }
552
+ ]
553
+ }, {
554
+ token: "string",
555
+ regex: '"(?=.)',
556
+ push: [
557
+ {
558
+ token: "string",
559
+ regex: '"|$',
560
+ next: "pop"
561
+ }, {
562
+ include: "qqstring"
563
+ }
564
+ ]
565
+ }, {
566
+ token: "constant.language",
567
+ regex: "null|Infinity|NaN|undefined"
568
+ }, {
569
+ include: "numeric_constants"
570
+ }, {
571
+ token: "punctuation.operator",
572
+ regex: ",",
573
+ next: "function_arguments"
574
+ }, {
575
+ token: "text",
576
+ regex: "\\s+"
577
+ }, {
578
+ token: "punctuation.operator",
579
+ regex: "$"
580
+ }, {
581
+ token: "empty",
582
+ regex: "",
583
+ next: "no_regex"
584
+ }
585
+ ],
586
+ "function_arguments": [
587
+ comments("function_arguments"),
588
+ {
589
+ token: "variable.parameter",
590
+ regex: identifierRe
591
+ }, {
592
+ token: "punctuation.operator",
593
+ regex: ","
594
+ }, {
595
+ token: "text",
596
+ regex: "\\s+"
597
+ }, {
598
+ token: "punctuation.operator",
599
+ regex: "$"
600
+ }, {
601
+ token: "empty",
602
+ regex: "",
603
+ next: "no_regex"
604
+ }
605
+ ],
606
+ "qqstring": [
607
+ {
608
+ token: "constant.language.escape",
609
+ regex: escapedRe
610
+ }, {
611
+ token: "string",
612
+ regex: "\\\\$",
613
+ consumeLineEnd: true
614
+ }, {
615
+ token: "string",
616
+ regex: '"|$',
617
+ next: "no_regex"
618
+ }, {
619
+ defaultToken: "string"
620
+ }
621
+ ],
622
+ "qstring": [
623
+ {
624
+ token: "constant.language.escape",
625
+ regex: escapedRe
626
+ }, {
627
+ token: "string",
628
+ regex: "\\\\$",
629
+ consumeLineEnd: true
630
+ }, {
631
+ token: "string",
632
+ regex: "'|$",
633
+ next: "no_regex"
634
+ }, {
635
+ defaultToken: "string"
636
+ }
637
+ ],
638
+ "numeric_constants": [
639
+ {
640
+ token: "constant.numeric", // hexadecimal, octal and binary
641
+ regex: /0(?:[xX][0-9a-fA-F_]+|[oO][0-7_]+|[bB][01_]+)\b/
642
+ }, {
643
+ token: "constant.numeric", // decimal integers and floats
644
+ regex: /(?:\d[\d_]*(?:\.[\d_]*)?|\.\d[\d_]*)(?:[eE][+-]?\d+\b)?/
645
+ },
646
+ ]
647
+ };
648
+ if (!options || !options.noES6) {
649
+ this.$rules.no_regex.unshift({
650
+ regex: "[{}]", onMatch: function (val, state, stack) {
651
+ this.next = val == "{" ? this.nextState : "";
652
+ if (val == "{" && stack.length) {
653
+ stack.unshift("start", state);
654
+ }
655
+ else if (val == "}" && stack.length) {
656
+ stack.shift();
657
+ this.next = stack.shift();
658
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
659
+ return "paren.quasi.end";
660
+ }
661
+ return val == "{" ? "paren.lparen" : "paren.rparen";
662
+ },
663
+ nextState: "start"
664
+ }, {
665
+ token: "string.quasi.start",
666
+ regex: /`/,
667
+ push: [{
668
+ token: "constant.language.escape",
669
+ regex: escapedRe
670
+ }, {
671
+ token: "paren.quasi.start",
672
+ regex: /\${/,
673
+ push: "start"
674
+ }, {
675
+ token: "string.quasi.end",
676
+ regex: /`/,
677
+ next: "pop"
678
+ }, {
679
+ defaultToken: "string.quasi"
680
+ }]
681
+ }, {
682
+ token: ["variable.parameter", "text"],
683
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
684
+ }, {
685
+ token: "paren.lparen",
686
+ regex: "(\\()(?=[^\\(]+\\s*=>)",
687
+ next: "function_arguments"
688
+ }, {
689
+ token: "variable.language",
690
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
691
+ });
692
+ this.$rules["function_arguments"].unshift({
693
+ token: "keyword.operator",
694
+ regex: "=",
695
+ next: "default_parameter"
696
+ }, {
697
+ token: "keyword.operator",
698
+ regex: "\\.{3}"
699
+ });
700
+ this.$rules["property"].unshift({
701
+ token: "support.function",
702
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
703
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
704
+ }, {
705
+ token: "constant.language",
706
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
707
+ });
708
+ if (!options || options.jsx != false)
709
+ JSX.call(this);
710
+ }
711
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
712
+ this.normalizeRules();
713
+ };
714
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
715
+ function JSX() {
716
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
717
+ var jsxTag = {
718
+ onMatch: function (val, state, stack) {
719
+ var offset = val.charAt(1) == "/" ? 2 : 1;
720
+ if (offset == 1) {
721
+ if (state != this.nextState)
722
+ stack.unshift(this.next, this.nextState, 0);
723
+ else
724
+ stack.unshift(this.next);
725
+ stack[2]++;
726
+ }
727
+ else if (offset == 2) {
728
+ if (state == this.nextState) {
729
+ stack[1]--;
730
+ if (!stack[1] || stack[1] < 0) {
731
+ stack.shift();
732
+ stack.shift();
733
+ }
734
+ }
735
+ }
736
+ return [{
737
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
738
+ value: val.slice(0, offset)
739
+ }, {
740
+ type: "meta.tag.tag-name.xml",
741
+ value: val.substr(offset)
742
+ }];
743
+ },
744
+ regex: "</?(?:" + tagRegex + "|(?=>))",
745
+ next: "jsxAttributes",
746
+ nextState: "jsx"
747
+ };
748
+ this.$rules.start.unshift(jsxTag);
749
+ var jsxJsRule = {
750
+ regex: "{",
751
+ token: "paren.quasi.start",
752
+ push: "start"
753
+ };
754
+ this.$rules.jsx = [
755
+ jsxJsRule,
756
+ jsxTag,
757
+ { include: "reference" }, { defaultToken: "string.xml" }
758
+ ];
759
+ this.$rules.jsxAttributes = [{
760
+ token: "meta.tag.punctuation.tag-close.xml",
761
+ regex: "/?>",
762
+ onMatch: function (value, currentState, stack) {
763
+ if (currentState == stack[0])
764
+ stack.shift();
765
+ if (value.length == 2) {
766
+ if (stack[0] == this.nextState)
767
+ stack[1]--;
768
+ if (!stack[1] || stack[1] < 0) {
769
+ stack.splice(0, 2);
770
+ }
771
+ }
772
+ this.next = stack[0] || "start";
773
+ return [{ type: this.token, value: value }];
774
+ },
775
+ nextState: "jsx"
776
+ },
777
+ jsxJsRule,
778
+ comments("jsxAttributes"),
779
+ {
780
+ token: "entity.other.attribute-name.xml",
781
+ regex: tagRegex
782
+ }, {
783
+ token: "keyword.operator.attribute-equals.xml",
784
+ regex: "="
785
+ }, {
786
+ token: "text.tag-whitespace.xml",
787
+ regex: "\\s+"
788
+ }, {
789
+ token: "string.attribute-value.xml",
790
+ regex: "'",
791
+ stateName: "jsx_attr_q",
792
+ push: [
793
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
794
+ { include: "reference" },
795
+ { defaultToken: "string.attribute-value.xml" }
796
+ ]
797
+ }, {
798
+ token: "string.attribute-value.xml",
799
+ regex: '"',
800
+ stateName: "jsx_attr_qq",
801
+ push: [
802
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
803
+ { include: "reference" },
804
+ { defaultToken: "string.attribute-value.xml" }
805
+ ]
806
+ },
807
+ jsxTag
808
+ ];
809
+ this.$rules.reference = [{
810
+ token: "constant.language.escape.reference.xml",
811
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
812
+ }];
813
+ }
814
+ function comments(next) {
815
+ return [
816
+ {
817
+ token: "comment", // multi line comment
818
+ regex: /\/\*/,
819
+ next: [
820
+ DocCommentHighlightRules.getTagRule(),
821
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
822
+ { defaultToken: "comment", caseInsensitive: true }
823
+ ]
824
+ }, {
825
+ token: "comment",
826
+ regex: "\\/\\/",
827
+ next: [
828
+ DocCommentHighlightRules.getTagRule(),
829
+ { token: "comment", regex: "$|^", next: next || "pop" },
830
+ { defaultToken: "comment", caseInsensitive: true }
831
+ ]
832
+ }
833
+ ];
834
+ }
835
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
836
+
837
+ });
838
+
839
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
840
+ var oop = require("../lib/oop");
841
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
842
+ var XmlHighlightRules = function (normalize) {
843
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
844
+ this.$rules = {
845
+ start: [
846
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
847
+ {
848
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
849
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
850
+ },
851
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
852
+ {
853
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
854
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
855
+ },
856
+ { include: "tag" },
857
+ { token: "text.end-tag-open.xml", regex: "</" },
858
+ { token: "text.tag-open.xml", regex: "<" },
859
+ { include: "reference" },
860
+ { defaultToken: "text.xml" }
861
+ ],
862
+ processing_instruction: [{
863
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
864
+ regex: tagRegex
865
+ }, {
866
+ token: "keyword.operator.decl-attribute-equals.xml",
867
+ regex: "="
868
+ }, {
869
+ include: "whitespace"
870
+ }, {
871
+ include: "string"
872
+ }, {
873
+ token: "punctuation.xml-decl.xml",
874
+ regex: "\\?>",
875
+ next: "start"
876
+ }],
877
+ doctype: [
878
+ { include: "whitespace" },
879
+ { include: "string" },
880
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
881
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
882
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
883
+ ],
884
+ int_subset: [{
885
+ token: "text.xml",
886
+ regex: "\\s+"
887
+ }, {
888
+ token: "punctuation.int-subset.xml",
889
+ regex: "]",
890
+ next: "pop"
891
+ }, {
892
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
893
+ regex: "(<\\!)(" + tagRegex + ")",
894
+ push: [{
895
+ token: "text",
896
+ regex: "\\s+"
897
+ },
898
+ {
899
+ token: "punctuation.markup-decl.xml",
900
+ regex: ">",
901
+ next: "pop"
902
+ },
903
+ { include: "string" }]
904
+ }],
905
+ cdata: [
906
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
907
+ { token: "text.xml", regex: "\\s+" },
908
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
909
+ ],
910
+ comment: [
911
+ { token: "comment.end.xml", regex: "-->", next: "start" },
912
+ { defaultToken: "comment.xml" }
913
+ ],
914
+ reference: [{
915
+ token: "constant.language.escape.reference.xml",
916
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
917
+ }],
918
+ attr_reference: [{
919
+ token: "constant.language.escape.reference.attribute-value.xml",
920
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
921
+ }],
922
+ tag: [{
923
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
924
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
925
+ next: [
926
+ { include: "attributes" },
927
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
928
+ ]
929
+ }],
930
+ tag_whitespace: [
931
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
932
+ ],
933
+ whitespace: [
934
+ { token: "text.whitespace.xml", regex: "\\s+" }
935
+ ],
936
+ string: [{
937
+ token: "string.xml",
938
+ regex: "'",
939
+ push: [
940
+ { token: "string.xml", regex: "'", next: "pop" },
941
+ { defaultToken: "string.xml" }
942
+ ]
943
+ }, {
944
+ token: "string.xml",
945
+ regex: '"',
946
+ push: [
947
+ { token: "string.xml", regex: '"', next: "pop" },
948
+ { defaultToken: "string.xml" }
949
+ ]
950
+ }],
951
+ attributes: [{
952
+ token: "entity.other.attribute-name.xml",
953
+ regex: tagRegex
954
+ }, {
955
+ token: "keyword.operator.attribute-equals.xml",
956
+ regex: "="
957
+ }, {
958
+ include: "tag_whitespace"
959
+ }, {
960
+ include: "attribute_value"
961
+ }],
962
+ attribute_value: [{
963
+ token: "string.attribute-value.xml",
964
+ regex: "'",
965
+ push: [
966
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
967
+ { include: "attr_reference" },
968
+ { defaultToken: "string.attribute-value.xml" }
969
+ ]
970
+ }, {
971
+ token: "string.attribute-value.xml",
972
+ regex: '"',
973
+ push: [
974
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
975
+ { include: "attr_reference" },
976
+ { defaultToken: "string.attribute-value.xml" }
977
+ ]
978
+ }]
979
+ };
980
+ if (this.constructor === XmlHighlightRules)
981
+ this.normalizeRules();
982
+ };
983
+ (function () {
984
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
985
+ this.$rules.tag.unshift({
986
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
987
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
988
+ next: [
989
+ { include: "attributes" },
990
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
991
+ ]
992
+ });
993
+ this.$rules[tag + "-end"] = [
994
+ { include: "attributes" },
995
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
996
+ onMatch: function (value, currentState, stack) {
997
+ stack.splice(0);
998
+ return this.token;
999
+ } }
1000
+ ];
1001
+ this.embedRules(HighlightRules, prefix, [{
1002
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1003
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
1004
+ next: tag + "-end"
1005
+ }, {
1006
+ token: "string.cdata.xml",
1007
+ regex: "<\\!\\[CDATA\\["
1008
+ }, {
1009
+ token: "string.cdata.xml",
1010
+ regex: "\\]\\]>"
1011
+ }]);
1012
+ };
1013
+ }).call(TextHighlightRules.prototype);
1014
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
1015
+ exports.XmlHighlightRules = XmlHighlightRules;
1016
+
1017
+ });
1018
+
1019
+ ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module){"use strict";
1020
+ var oop = require("../lib/oop");
1021
+ var lang = require("../lib/lang");
1022
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1023
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1024
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1025
+ var tagMap = lang.createMap({
1026
+ a: 'anchor',
1027
+ button: 'form',
1028
+ form: 'form',
1029
+ img: 'image',
1030
+ input: 'form',
1031
+ label: 'form',
1032
+ option: 'form',
1033
+ script: 'script',
1034
+ select: 'form',
1035
+ textarea: 'form',
1036
+ style: 'style',
1037
+ table: 'table',
1038
+ tbody: 'table',
1039
+ td: 'table',
1040
+ tfoot: 'table',
1041
+ th: 'table',
1042
+ tr: 'table'
1043
+ });
1044
+ var HtmlHighlightRules = function () {
1045
+ XmlHighlightRules.call(this);
1046
+ this.addRules({
1047
+ attributes: [{
1048
+ include: "tag_whitespace"
1049
+ }, {
1050
+ token: "entity.other.attribute-name.xml",
1051
+ regex: "[-_a-zA-Z0-9:.]+"
1052
+ }, {
1053
+ token: "keyword.operator.attribute-equals.xml",
1054
+ regex: "=",
1055
+ push: [{
1056
+ include: "tag_whitespace"
1057
+ }, {
1058
+ token: "string.unquoted.attribute-value.html",
1059
+ regex: "[^<>='\"`\\s]+",
1060
+ next: "pop"
1061
+ }, {
1062
+ token: "empty",
1063
+ regex: "",
1064
+ next: "pop"
1065
+ }]
1066
+ }, {
1067
+ include: "attribute_value"
1068
+ }],
1069
+ tag: [{
1070
+ token: function (start, tag) {
1071
+ var group = tagMap[tag];
1072
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1073
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1074
+ },
1075
+ regex: "(</?)([-_a-zA-Z0-9:.]+)",
1076
+ next: "tag_stuff"
1077
+ }],
1078
+ tag_stuff: [
1079
+ { include: "attributes" },
1080
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1081
+ ]
1082
+ });
1083
+ this.embedTagRules(CssHighlightRules, "css-", "style");
1084
+ this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
1085
+ if (this.constructor === HtmlHighlightRules)
1086
+ this.normalizeRules();
1087
+ };
1088
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1089
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1090
+
1091
+ });
1092
+
1093
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
1094
+ var Range = require("../range").Range;
1095
+ var MatchingBraceOutdent = function () { };
1096
+ (function () {
1097
+ this.checkOutdent = function (line, input) {
1098
+ if (!/^\s+$/.test(line))
1099
+ return false;
1100
+ return /^\s*\}/.test(input);
1101
+ };
1102
+ this.autoOutdent = function (doc, row) {
1103
+ var line = doc.getLine(row);
1104
+ var match = line.match(/^(\s*\})/);
1105
+ if (!match)
1106
+ return 0;
1107
+ var column = match[1].length;
1108
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
1109
+ if (!openBracePos || openBracePos.row == row)
1110
+ return 0;
1111
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
1112
+ doc.replace(new Range(row, 0, row, column - 1), indent);
1113
+ };
1114
+ this.$getIndent = function (line) {
1115
+ return line.match(/^\s*/)[0];
1116
+ };
1117
+ }).call(MatchingBraceOutdent.prototype);
1118
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
1119
+
1120
+ });
1121
+
1122
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator"], function(require, exports, module){"use strict";
1123
+ var oop = require("../../lib/oop");
1124
+ var Behaviour = require("../behaviour").Behaviour;
1125
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1126
+ function is(token, type) {
1127
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1128
+ }
1129
+ var XmlBehaviour = function () {
1130
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1131
+ if (text == '"' || text == "'") {
1132
+ var quote = text;
1133
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1134
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1135
+ return {
1136
+ text: quote + selected + quote,
1137
+ selection: false
1138
+ };
1139
+ }
1140
+ var cursor = editor.getCursorPosition();
1141
+ var line = session.doc.getLine(cursor.row);
1142
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1143
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1144
+ var token = iterator.getCurrentToken();
1145
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1146
+ return {
1147
+ text: "",
1148
+ selection: [1, 1]
1149
+ };
1150
+ }
1151
+ if (!token)
1152
+ token = iterator.stepBackward();
1153
+ if (!token)
1154
+ return;
1155
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1156
+ token = iterator.stepBackward();
1157
+ }
1158
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1159
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1160
+ return {
1161
+ text: quote + quote,
1162
+ selection: [1, 1]
1163
+ };
1164
+ }
1165
+ }
1166
+ });
1167
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1168
+ var selected = session.doc.getTextRange(range);
1169
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1170
+ var line = session.doc.getLine(range.start.row);
1171
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1172
+ if (rightChar == selected) {
1173
+ range.end.column++;
1174
+ return range;
1175
+ }
1176
+ }
1177
+ });
1178
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1179
+ if (text == '>') {
1180
+ var position = editor.getSelectionRange().start;
1181
+ var iterator = new TokenIterator(session, position.row, position.column);
1182
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1183
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1184
+ return;
1185
+ if (is(token, "reference.attribute-value"))
1186
+ return;
1187
+ if (is(token, "attribute-value")) {
1188
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1189
+ if (position.column < tokenEndColumn)
1190
+ return;
1191
+ if (position.column == tokenEndColumn) {
1192
+ var nextToken = iterator.stepForward();
1193
+ if (nextToken && is(nextToken, "attribute-value"))
1194
+ return;
1195
+ iterator.stepBackward();
1196
+ }
1197
+ }
1198
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1199
+ return;
1200
+ while (!is(token, "tag-name")) {
1201
+ token = iterator.stepBackward();
1202
+ if (token.value == "<") {
1203
+ token = iterator.stepForward();
1204
+ break;
1205
+ }
1206
+ }
1207
+ var tokenRow = iterator.getCurrentTokenRow();
1208
+ var tokenColumn = iterator.getCurrentTokenColumn();
1209
+ if (is(iterator.stepBackward(), "end-tag-open"))
1210
+ return;
1211
+ var element = token.value;
1212
+ if (tokenRow == position.row)
1213
+ element = element.substring(0, position.column - tokenColumn);
1214
+ if (this.voidElements && this.voidElements.hasOwnProperty(element.toLowerCase()))
1215
+ return;
1216
+ return {
1217
+ text: ">" + "</" + element + ">",
1218
+ selection: [1, 1]
1219
+ };
1220
+ }
1221
+ });
1222
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1223
+ if (text == "\n") {
1224
+ var cursor = editor.getCursorPosition();
1225
+ var line = session.getLine(cursor.row);
1226
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1227
+ var token = iterator.getCurrentToken();
1228
+ if (is(token, "") && token.type.indexOf("tag-close") !== -1) {
1229
+ if (token.value == "/>")
1230
+ return;
1231
+ while (token && token.type.indexOf("tag-name") === -1) {
1232
+ token = iterator.stepBackward();
1233
+ }
1234
+ if (!token) {
1235
+ return;
1236
+ }
1237
+ var tag = token.value;
1238
+ var row = iterator.getCurrentTokenRow();
1239
+ token = iterator.stepBackward();
1240
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1241
+ return;
1242
+ }
1243
+ if (this.voidElements && !this.voidElements[tag] || !this.voidElements) {
1244
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1245
+ var line = session.getLine(row);
1246
+ var nextIndent = this.$getIndent(line);
1247
+ var indent = nextIndent + session.getTabString();
1248
+ if (nextToken && nextToken.value === "</") {
1249
+ return {
1250
+ text: "\n" + indent + "\n" + nextIndent,
1251
+ selection: [1, indent.length, 1, indent.length]
1252
+ };
1253
+ }
1254
+ else {
1255
+ return {
1256
+ text: "\n" + indent
1257
+ };
1258
+ }
1259
+ }
1260
+ }
1261
+ }
1262
+ });
1263
+ };
1264
+ oop.inherits(XmlBehaviour, Behaviour);
1265
+ exports.XmlBehaviour = XmlBehaviour;
1266
+
1267
+ });
1268
+
1269
+ ace.define("ace/mode/behaviour/javascript",["require","exports","module","ace/lib/oop","ace/token_iterator","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
1270
+ var oop = require("../../lib/oop");
1271
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1272
+ var CstyleBehaviour = require("../behaviour/cstyle").CstyleBehaviour;
1273
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
1274
+ var JavaScriptBehaviour = function () {
1275
+ var xmlBehaviours = new XmlBehaviour({ closeCurlyBraces: true }).getBehaviours();
1276
+ this.addBehaviours(xmlBehaviours);
1277
+ this.inherit(CstyleBehaviour);
1278
+ this.add("autoclosing-fragment", "insertion", function (state, action, editor, session, text) {
1279
+ if (text == '>') {
1280
+ var position = editor.getSelectionRange().start;
1281
+ var iterator = new TokenIterator(session, position.row, position.column);
1282
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1283
+ if (!token)
1284
+ return;
1285
+ if (token.value == '<') {
1286
+ return {
1287
+ text: "></>",
1288
+ selection: [1, 1]
1289
+ };
1290
+ }
1291
+ }
1292
+ });
1293
+ };
1294
+ oop.inherits(JavaScriptBehaviour, CstyleBehaviour);
1295
+ exports.JavaScriptBehaviour = JavaScriptBehaviour;
1296
+
1297
+ });
1298
+
1299
+ ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1300
+ var oop = require("../../lib/oop");
1301
+ var Range = require("../../range").Range;
1302
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1303
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1304
+ BaseFoldMode.call(this);
1305
+ this.voidElements = voidElements || {};
1306
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1307
+ if (optionalEndTags)
1308
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1309
+ };
1310
+ oop.inherits(FoldMode, BaseFoldMode);
1311
+ var Tag = function () {
1312
+ this.tagName = "";
1313
+ this.closing = false;
1314
+ this.selfClosing = false;
1315
+ this.start = { row: 0, column: 0 };
1316
+ this.end = { row: 0, column: 0 };
1317
+ };
1318
+ function is(token, type) {
1319
+ return token && token.type && token.type.lastIndexOf(type + ".xml") > -1;
1320
+ }
1321
+ (function () {
1322
+ this.getFoldWidget = function (session, foldStyle, row) {
1323
+ var tag = this._getFirstTagInLine(session, row);
1324
+ if (!tag)
1325
+ return this.getCommentFoldWidget(session, row);
1326
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1327
+ return foldStyle === "markbeginend" ? "end" : "";
1328
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1329
+ return "";
1330
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1331
+ return "";
1332
+ return "start";
1333
+ };
1334
+ this.getCommentFoldWidget = function (session, row) {
1335
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1336
+ return "start";
1337
+ return "";
1338
+ };
1339
+ this._getFirstTagInLine = function (session, row) {
1340
+ var tokens = session.getTokens(row);
1341
+ var tag = new Tag();
1342
+ for (var i = 0; i < tokens.length; i++) {
1343
+ var token = tokens[i];
1344
+ if (is(token, "tag-open")) {
1345
+ tag.end.column = tag.start.column + token.value.length;
1346
+ tag.closing = is(token, "end-tag-open");
1347
+ token = tokens[++i];
1348
+ if (!token)
1349
+ return null;
1350
+ tag.tagName = token.value;
1351
+ if (token.value === "") { //skip empty tag name token for fragment
1352
+ token = tokens[++i];
1353
+ if (!token)
1354
+ return null;
1355
+ tag.tagName = token.value;
1356
+ }
1357
+ tag.end.column += token.value.length;
1358
+ for (i++; i < tokens.length; i++) {
1359
+ token = tokens[i];
1360
+ tag.end.column += token.value.length;
1361
+ if (is(token, "tag-close")) {
1362
+ tag.selfClosing = token.value == '/>';
1363
+ break;
1364
+ }
1365
+ }
1366
+ return tag;
1367
+ }
1368
+ else if (is(token, "tag-close")) {
1369
+ tag.selfClosing = token.value == '/>';
1370
+ return tag;
1371
+ }
1372
+ tag.start.column += token.value.length;
1373
+ }
1374
+ return null;
1375
+ };
1376
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1377
+ var tokens = session.getTokens(row);
1378
+ var column = 0;
1379
+ for (var i = 0; i < tokens.length; i++) {
1380
+ var token = tokens[i];
1381
+ column += token.value.length;
1382
+ if (column < startColumn - 1)
1383
+ continue;
1384
+ if (is(token, "end-tag-open")) {
1385
+ token = tokens[i + 1];
1386
+ if (is(token, "tag-name") && token.value === "") {
1387
+ token = tokens[i + 2];
1388
+ }
1389
+ if (token && token.value == tagName)
1390
+ return true;
1391
+ }
1392
+ }
1393
+ return false;
1394
+ };
1395
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1396
+ var firstTag = this._getFirstTagInLine(session, row);
1397
+ if (!firstTag) {
1398
+ return this.getCommentFoldWidget(session, row) && session.getCommentFoldRange(row, session.getLine(row).length);
1399
+ }
1400
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1401
+ if (tags) {
1402
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1403
+ }
1404
+ };
1405
+ }).call(FoldMode.prototype);
1406
+
1407
+ });
1408
+
1409
+ ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1410
+ var oop = require("../../lib/oop");
1411
+ var Range = require("../../range").Range;
1412
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1413
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1414
+ if (commentRegex) {
1415
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1416
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1417
+ }
1418
+ };
1419
+ oop.inherits(FoldMode, BaseFoldMode);
1420
+ (function () {
1421
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
1422
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
1423
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
1424
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
1425
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
1426
+ this._getFoldWidgetBase = this.getFoldWidget;
1427
+ this.getFoldWidget = function (session, foldStyle, row) {
1428
+ var line = session.getLine(row);
1429
+ if (this.singleLineBlockCommentRe.test(line)) {
1430
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
1431
+ return "";
1432
+ }
1433
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
1434
+ if (!fw && this.startRegionRe.test(line))
1435
+ return "start"; // lineCommentRegionStart
1436
+ return fw;
1437
+ };
1438
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1439
+ var line = session.getLine(row);
1440
+ if (this.startRegionRe.test(line))
1441
+ return this.getCommentRegionBlock(session, line, row);
1442
+ var match = line.match(this.foldingStartMarker);
1443
+ if (match) {
1444
+ var i = match.index;
1445
+ if (match[1])
1446
+ return this.openingBracketBlock(session, match[1], row, i);
1447
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
1448
+ if (range && !range.isMultiLine()) {
1449
+ if (forceMultiline) {
1450
+ range = this.getSectionRange(session, row);
1451
+ }
1452
+ else if (foldStyle != "all")
1453
+ range = null;
1454
+ }
1455
+ return range;
1456
+ }
1457
+ if (foldStyle === "markbegin")
1458
+ return;
1459
+ var match = line.match(this.foldingStopMarker);
1460
+ if (match) {
1461
+ var i = match.index + match[0].length;
1462
+ if (match[1])
1463
+ return this.closingBracketBlock(session, match[1], row, i);
1464
+ return session.getCommentFoldRange(row, i, -1);
1465
+ }
1466
+ };
1467
+ this.getSectionRange = function (session, row) {
1468
+ var line = session.getLine(row);
1469
+ var startIndent = line.search(/\S/);
1470
+ var startRow = row;
1471
+ var startColumn = line.length;
1472
+ row = row + 1;
1473
+ var endRow = row;
1474
+ var maxRow = session.getLength();
1475
+ while (++row < maxRow) {
1476
+ line = session.getLine(row);
1477
+ var indent = line.search(/\S/);
1478
+ if (indent === -1)
1479
+ continue;
1480
+ if (startIndent > indent)
1481
+ break;
1482
+ var subRange = this.getFoldWidgetRange(session, "all", row);
1483
+ if (subRange) {
1484
+ if (subRange.start.row <= startRow) {
1485
+ break;
1486
+ }
1487
+ else if (subRange.isMultiLine()) {
1488
+ row = subRange.end.row;
1489
+ }
1490
+ else if (startIndent == indent) {
1491
+ break;
1492
+ }
1493
+ }
1494
+ endRow = row;
1495
+ }
1496
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
1497
+ };
1498
+ this.getCommentRegionBlock = function (session, line, row) {
1499
+ var startColumn = line.search(/\s*$/);
1500
+ var maxRow = session.getLength();
1501
+ var startRow = row;
1502
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
1503
+ var depth = 1;
1504
+ while (++row < maxRow) {
1505
+ line = session.getLine(row);
1506
+ var m = re.exec(line);
1507
+ if (!m)
1508
+ continue;
1509
+ if (m[1])
1510
+ depth--;
1511
+ else
1512
+ depth++;
1513
+ if (!depth)
1514
+ break;
1515
+ }
1516
+ var endRow = row;
1517
+ if (endRow > startRow) {
1518
+ return new Range(startRow, startColumn, endRow, line.length);
1519
+ }
1520
+ };
1521
+ }).call(FoldMode.prototype);
1522
+
1523
+ });
1524
+
1525
+ ace.define("ace/mode/folding/javascript",["require","exports","module","ace/lib/oop","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1526
+ var oop = require("../../lib/oop");
1527
+ var XmlFoldMode = require("./xml").FoldMode;
1528
+ var CFoldMode = require("./cstyle").FoldMode;
1529
+ var FoldMode = exports.FoldMode = function (commentRegex) {
1530
+ if (commentRegex) {
1531
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
1532
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
1533
+ }
1534
+ this.xmlFoldMode = new XmlFoldMode();
1535
+ };
1536
+ oop.inherits(FoldMode, CFoldMode);
1537
+ (function () {
1538
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
1539
+ this.getFoldWidgetBase = this.getFoldWidget;
1540
+ this.getFoldWidget = function (session, foldStyle, row) {
1541
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
1542
+ if (!fw) {
1543
+ return this.xmlFoldMode.getFoldWidget(session, foldStyle, row);
1544
+ }
1545
+ return fw;
1546
+ };
1547
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
1548
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row, forceMultiline);
1549
+ if (range)
1550
+ return range;
1551
+ return this.xmlFoldMode.getFoldWidgetRange(session, foldStyle, row);
1552
+ };
1553
+ }).call(FoldMode.prototype);
1554
+
1555
+ });
1556
+
1557
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/javascript","ace/mode/folding/javascript"], function(require, exports, module){"use strict";
1558
+ var oop = require("../lib/oop");
1559
+ var TextMode = require("./text").Mode;
1560
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1561
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1562
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1563
+ var JavaScriptBehaviour = require("./behaviour/javascript").JavaScriptBehaviour;
1564
+ var JavaScriptFoldMode = require("./folding/javascript").FoldMode;
1565
+ var Mode = function () {
1566
+ this.HighlightRules = JavaScriptHighlightRules;
1567
+ this.$outdent = new MatchingBraceOutdent();
1568
+ this.$behaviour = new JavaScriptBehaviour();
1569
+ this.foldingRules = new JavaScriptFoldMode();
1570
+ };
1571
+ oop.inherits(Mode, TextMode);
1572
+ (function () {
1573
+ this.lineCommentStart = "//";
1574
+ this.blockComment = { start: "/*", end: "*/" };
1575
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
1576
+ this.$pairQuotesAfter = {
1577
+ "`": /\w/
1578
+ };
1579
+ this.getNextLineIndent = function (state, line, tab) {
1580
+ var indent = this.$getIndent(line);
1581
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
1582
+ var tokens = tokenizedLine.tokens;
1583
+ var endState = tokenizedLine.state;
1584
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1585
+ return indent;
1586
+ }
1587
+ if (state == "start" || state == "no_regex") {
1588
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
1589
+ if (match) {
1590
+ indent += tab;
1591
+ }
1592
+ }
1593
+ else if (state == "doc-start") {
1594
+ if (endState == "start" || endState == "no_regex") {
1595
+ return "";
1596
+ }
1597
+ }
1598
+ return indent;
1599
+ };
1600
+ this.checkOutdent = function (state, line, input) {
1601
+ return this.$outdent.checkOutdent(line, input);
1602
+ };
1603
+ this.autoOutdent = function (state, doc, row) {
1604
+ this.$outdent.autoOutdent(doc, row);
1605
+ };
1606
+ this.createWorker = function (session) {
1607
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
1608
+ worker.attachToDocument(session.getDocument());
1609
+ worker.on("annotate", function (results) {
1610
+ session.setAnnotations(results.data);
1611
+ });
1612
+ worker.on("terminate", function () {
1613
+ session.clearAnnotations();
1614
+ });
1615
+ return worker;
1616
+ };
1617
+ this.$id = "ace/mode/javascript";
1618
+ this.snippetFileId = "ace/snippets/javascript";
1619
+ }).call(Mode.prototype);
1620
+ exports.Mode = Mode;
1621
+
1622
+ });
1623
+
1624
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
1625
+ var propertyMap = {
1626
+ "background": { "#$0": 1 },
1627
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
1628
+ "background-image": { "url('/$0')": 1 },
1629
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
1630
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
1631
+ "background-attachment": { "scroll": 1, "fixed": 1 },
1632
+ "background-size": { "cover": 1, "contain": 1 },
1633
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1634
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1635
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
1636
+ "border-color": { "#$0": 1 },
1637
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
1638
+ "border-collapse": { "collapse": 1, "separate": 1 },
1639
+ "bottom": { "px": 1, "em": 1, "%": 1 },
1640
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
1641
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
1642
+ "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 },
1643
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
1644
+ "empty-cells": { "show": 1, "hide": 1 },
1645
+ "float": { "left": 1, "right": 1, "none": 1 },
1646
+ "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 },
1647
+ "font-size": { "px": 1, "em": 1, "%": 1 },
1648
+ "font-weight": { "bold": 1, "normal": 1 },
1649
+ "font-style": { "italic": 1, "normal": 1 },
1650
+ "font-variant": { "normal": 1, "small-caps": 1 },
1651
+ "height": { "px": 1, "em": 1, "%": 1 },
1652
+ "left": { "px": 1, "em": 1, "%": 1 },
1653
+ "letter-spacing": { "normal": 1 },
1654
+ "line-height": { "normal": 1 },
1655
+ "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 },
1656
+ "margin": { "px": 1, "em": 1, "%": 1 },
1657
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
1658
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
1659
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
1660
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
1661
+ "max-height": { "px": 1, "em": 1, "%": 1 },
1662
+ "max-width": { "px": 1, "em": 1, "%": 1 },
1663
+ "min-height": { "px": 1, "em": 1, "%": 1 },
1664
+ "min-width": { "px": 1, "em": 1, "%": 1 },
1665
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1666
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1667
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1668
+ "padding": { "px": 1, "em": 1, "%": 1 },
1669
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
1670
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
1671
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
1672
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
1673
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1674
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1675
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
1676
+ "right": { "px": 1, "em": 1, "%": 1 },
1677
+ "table-layout": { "fixed": 1, "auto": 1 },
1678
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
1679
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
1680
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
1681
+ "top": { "px": 1, "em": 1, "%": 1 },
1682
+ "vertical-align": { "top": 1, "bottom": 1 },
1683
+ "visibility": { "hidden": 1, "visible": 1 },
1684
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
1685
+ "width": { "px": 1, "em": 1, "%": 1 },
1686
+ "word-spacing": { "normal": 1 },
1687
+ "filter": { "alpha(opacity=$0100)": 1 },
1688
+ "text-shadow": { "$02px 2px 2px #777": 1 },
1689
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
1690
+ "-moz-border-radius": 1,
1691
+ "-moz-border-radius-topright": 1,
1692
+ "-moz-border-radius-bottomright": 1,
1693
+ "-moz-border-radius-topleft": 1,
1694
+ "-moz-border-radius-bottomleft": 1,
1695
+ "-webkit-border-radius": 1,
1696
+ "-webkit-border-top-right-radius": 1,
1697
+ "-webkit-border-top-left-radius": 1,
1698
+ "-webkit-border-bottom-right-radius": 1,
1699
+ "-webkit-border-bottom-left-radius": 1,
1700
+ "-moz-box-shadow": 1,
1701
+ "-webkit-box-shadow": 1,
1702
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1703
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1704
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
1705
+ };
1706
+ var CssCompletions = function () {
1707
+ };
1708
+ (function () {
1709
+ this.completionsDefined = false;
1710
+ this.defineCompletions = function () {
1711
+ if (document) {
1712
+ var style = document.createElement('c').style;
1713
+ for (var i in style) {
1714
+ if (typeof style[i] !== 'string')
1715
+ continue;
1716
+ var name = i.replace(/[A-Z]/g, function (x) {
1717
+ return '-' + x.toLowerCase();
1718
+ });
1719
+ if (!propertyMap.hasOwnProperty(name))
1720
+ propertyMap[name] = 1;
1721
+ }
1722
+ }
1723
+ this.completionsDefined = true;
1724
+ };
1725
+ this.getCompletions = function (state, session, pos, prefix) {
1726
+ if (!this.completionsDefined) {
1727
+ this.defineCompletions();
1728
+ }
1729
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
1730
+ var line = session.getLine(pos.row).substr(0, pos.column);
1731
+ var inParens = /\([^)]*$/.test(line);
1732
+ if (inParens) {
1733
+ line = line.substr(line.lastIndexOf('(') + 1);
1734
+ }
1735
+ if (/:[^;]+$/.test(line)) {
1736
+ /([\w\-]+):[^:]*$/.test(line);
1737
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1738
+ }
1739
+ else {
1740
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
1741
+ }
1742
+ }
1743
+ return [];
1744
+ };
1745
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
1746
+ skipSemicolon = skipSemicolon || false;
1747
+ var properties = Object.keys(propertyMap);
1748
+ return properties.map(function (property) {
1749
+ return {
1750
+ caption: property,
1751
+ snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
1752
+ meta: "property",
1753
+ score: 1000000
1754
+ };
1755
+ });
1756
+ };
1757
+ this.getPropertyValueCompletions = function (state, session, pos, prefix) {
1758
+ var line = session.getLine(pos.row).substr(0, pos.column);
1759
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1760
+ if (!property)
1761
+ return [];
1762
+ var values = [];
1763
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1764
+ values = Object.keys(propertyMap[property]);
1765
+ }
1766
+ return values.map(function (value) {
1767
+ return {
1768
+ caption: value,
1769
+ snippet: value,
1770
+ meta: "property value",
1771
+ score: 1000000
1772
+ };
1773
+ });
1774
+ };
1775
+ }).call(CssCompletions.prototype);
1776
+ exports.CssCompletions = CssCompletions;
1777
+
1778
+ });
1779
+
1780
+ ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module){"use strict";
1781
+ var oop = require("../../lib/oop");
1782
+ var Behaviour = require("../behaviour").Behaviour;
1783
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1784
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1785
+ var CssBehaviour = function () {
1786
+ this.inherit(CstyleBehaviour);
1787
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1788
+ if (text === ':' && editor.selection.isEmpty()) {
1789
+ var cursor = editor.getCursorPosition();
1790
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1791
+ var token = iterator.getCurrentToken();
1792
+ if (token && token.value.match(/\s+/)) {
1793
+ token = iterator.stepBackward();
1794
+ }
1795
+ if (token && token.type === 'support.type') {
1796
+ var line = session.doc.getLine(cursor.row);
1797
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1798
+ if (rightChar === ':') {
1799
+ return {
1800
+ text: '',
1801
+ selection: [1, 1]
1802
+ };
1803
+ }
1804
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1805
+ return {
1806
+ text: ':;',
1807
+ selection: [1, 1]
1808
+ };
1809
+ }
1810
+ }
1811
+ }
1812
+ });
1813
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1814
+ var selected = session.doc.getTextRange(range);
1815
+ if (!range.isMultiLine() && selected === ':') {
1816
+ var cursor = editor.getCursorPosition();
1817
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1818
+ var token = iterator.getCurrentToken();
1819
+ if (token && token.value.match(/\s+/)) {
1820
+ token = iterator.stepBackward();
1821
+ }
1822
+ if (token && token.type === 'support.type') {
1823
+ var line = session.doc.getLine(range.start.row);
1824
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1825
+ if (rightChar === ';') {
1826
+ range.end.column++;
1827
+ return range;
1828
+ }
1829
+ }
1830
+ }
1831
+ });
1832
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1833
+ if (text === ';' && editor.selection.isEmpty()) {
1834
+ var cursor = editor.getCursorPosition();
1835
+ var line = session.doc.getLine(cursor.row);
1836
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1837
+ if (rightChar === ';') {
1838
+ return {
1839
+ text: '',
1840
+ selection: [1, 1]
1841
+ };
1842
+ }
1843
+ }
1844
+ });
1845
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1846
+ if (text === '!' && editor.selection.isEmpty()) {
1847
+ var cursor = editor.getCursorPosition();
1848
+ var line = session.doc.getLine(cursor.row);
1849
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1850
+ return {
1851
+ text: '!important',
1852
+ selection: [10, 10]
1853
+ };
1854
+ }
1855
+ }
1856
+ });
1857
+ };
1858
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1859
+ exports.CssBehaviour = CssBehaviour;
1860
+
1861
+ });
1862
+
1863
+ ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1864
+ var oop = require("../lib/oop");
1865
+ var TextMode = require("./text").Mode;
1866
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1867
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1868
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1869
+ var CssCompletions = require("./css_completions").CssCompletions;
1870
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1871
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1872
+ var Mode = function () {
1873
+ this.HighlightRules = CssHighlightRules;
1874
+ this.$outdent = new MatchingBraceOutdent();
1875
+ this.$behaviour = new CssBehaviour();
1876
+ this.$completer = new CssCompletions();
1877
+ this.foldingRules = new CStyleFoldMode();
1878
+ };
1879
+ oop.inherits(Mode, TextMode);
1880
+ (function () {
1881
+ this.foldingRules = "cStyle";
1882
+ this.blockComment = { start: "/*", end: "*/" };
1883
+ this.getNextLineIndent = function (state, line, tab) {
1884
+ var indent = this.$getIndent(line);
1885
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1886
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1887
+ return indent;
1888
+ }
1889
+ var match = line.match(/^.*\{\s*$/);
1890
+ if (match) {
1891
+ indent += tab;
1892
+ }
1893
+ return indent;
1894
+ };
1895
+ this.checkOutdent = function (state, line, input) {
1896
+ return this.$outdent.checkOutdent(line, input);
1897
+ };
1898
+ this.autoOutdent = function (state, doc, row) {
1899
+ this.$outdent.autoOutdent(doc, row);
1900
+ };
1901
+ this.getCompletions = function (state, session, pos, prefix) {
1902
+ return this.$completer.getCompletions(state, session, pos, prefix);
1903
+ };
1904
+ this.createWorker = function (session) {
1905
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1906
+ worker.attachToDocument(session.getDocument());
1907
+ worker.on("annotate", function (e) {
1908
+ session.setAnnotations(e.data);
1909
+ });
1910
+ worker.on("terminate", function () {
1911
+ session.clearAnnotations();
1912
+ });
1913
+ return worker;
1914
+ };
1915
+ this.$id = "ace/mode/css";
1916
+ this.snippetFileId = "ace/snippets/css";
1917
+ }).call(Mode.prototype);
1918
+ exports.Mode = Mode;
1919
+
1920
+ });
1921
+
1922
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1923
+ var oop = require("../../lib/oop");
1924
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1925
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
1926
+ this.defaultMode = defaultMode;
1927
+ this.subModes = subModes;
1928
+ };
1929
+ oop.inherits(FoldMode, BaseFoldMode);
1930
+ (function () {
1931
+ this.$getMode = function (state) {
1932
+ if (typeof state != "string")
1933
+ state = state[0];
1934
+ for (var key in this.subModes) {
1935
+ if (state.indexOf(key) === 0)
1936
+ return this.subModes[key];
1937
+ }
1938
+ return null;
1939
+ };
1940
+ this.$tryMode = function (state, session, foldStyle, row) {
1941
+ var mode = this.$getMode(state);
1942
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1943
+ };
1944
+ this.getFoldWidget = function (session, foldStyle, row) {
1945
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
1946
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
1947
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
1948
+ };
1949
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1950
+ var mode = this.$getMode(session.getState(row - 1));
1951
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1952
+ mode = this.$getMode(session.getState(row));
1953
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1954
+ mode = this.defaultMode;
1955
+ return mode.getFoldWidgetRange(session, foldStyle, row);
1956
+ };
1957
+ }).call(FoldMode.prototype);
1958
+
1959
+ });
1960
+
1961
+ ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
1962
+ var oop = require("../../lib/oop");
1963
+ var MixedFoldMode = require("./mixed").FoldMode;
1964
+ var XmlFoldMode = require("./xml").FoldMode;
1965
+ var CStyleFoldMode = require("./cstyle").FoldMode;
1966
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
1967
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
1968
+ "js-": new CStyleFoldMode(),
1969
+ "css-": new CStyleFoldMode()
1970
+ });
1971
+ };
1972
+ oop.inherits(FoldMode, MixedFoldMode);
1973
+
1974
+ });
1975
+
1976
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
1977
+ var TokenIterator = require("../token_iterator").TokenIterator;
1978
+ var commonAttributes = [
1979
+ "accesskey",
1980
+ "class",
1981
+ "contenteditable",
1982
+ "contextmenu",
1983
+ "dir",
1984
+ "draggable",
1985
+ "dropzone",
1986
+ "hidden",
1987
+ "id",
1988
+ "inert",
1989
+ "itemid",
1990
+ "itemprop",
1991
+ "itemref",
1992
+ "itemscope",
1993
+ "itemtype",
1994
+ "lang",
1995
+ "spellcheck",
1996
+ "style",
1997
+ "tabindex",
1998
+ "title",
1999
+ "translate"
2000
+ ];
2001
+ var eventAttributes = [
2002
+ "onabort",
2003
+ "onblur",
2004
+ "oncancel",
2005
+ "oncanplay",
2006
+ "oncanplaythrough",
2007
+ "onchange",
2008
+ "onclick",
2009
+ "onclose",
2010
+ "oncontextmenu",
2011
+ "oncuechange",
2012
+ "ondblclick",
2013
+ "ondrag",
2014
+ "ondragend",
2015
+ "ondragenter",
2016
+ "ondragleave",
2017
+ "ondragover",
2018
+ "ondragstart",
2019
+ "ondrop",
2020
+ "ondurationchange",
2021
+ "onemptied",
2022
+ "onended",
2023
+ "onerror",
2024
+ "onfocus",
2025
+ "oninput",
2026
+ "oninvalid",
2027
+ "onkeydown",
2028
+ "onkeypress",
2029
+ "onkeyup",
2030
+ "onload",
2031
+ "onloadeddata",
2032
+ "onloadedmetadata",
2033
+ "onloadstart",
2034
+ "onmousedown",
2035
+ "onmousemove",
2036
+ "onmouseout",
2037
+ "onmouseover",
2038
+ "onmouseup",
2039
+ "onmousewheel",
2040
+ "onpause",
2041
+ "onplay",
2042
+ "onplaying",
2043
+ "onprogress",
2044
+ "onratechange",
2045
+ "onreset",
2046
+ "onscroll",
2047
+ "onseeked",
2048
+ "onseeking",
2049
+ "onselect",
2050
+ "onshow",
2051
+ "onstalled",
2052
+ "onsubmit",
2053
+ "onsuspend",
2054
+ "ontimeupdate",
2055
+ "onvolumechange",
2056
+ "onwaiting"
2057
+ ];
2058
+ var globalAttributes = commonAttributes.concat(eventAttributes);
2059
+ var attributeMap = {
2060
+ "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 },
2061
+ "abbr": {},
2062
+ "address": {},
2063
+ "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
2064
+ "article": { "pubdate": 1 },
2065
+ "aside": {},
2066
+ "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
2067
+ "b": {},
2068
+ "base": { "href": 1, "target": 1 },
2069
+ "bdi": {},
2070
+ "bdo": {},
2071
+ "blockquote": { "cite": 1 },
2072
+ "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 },
2073
+ "br": {},
2074
+ "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 } },
2075
+ "canvas": { "width": 1, "height": 1 },
2076
+ "caption": {},
2077
+ "cite": {},
2078
+ "code": {},
2079
+ "col": { "span": 1 },
2080
+ "colgroup": { "span": 1 },
2081
+ "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
2082
+ "data": {},
2083
+ "datalist": {},
2084
+ "dd": {},
2085
+ "del": { "cite": 1, "datetime": 1 },
2086
+ "details": { "open": 1 },
2087
+ "dfn": {},
2088
+ "dialog": { "open": 1 },
2089
+ "div": {},
2090
+ "dl": {},
2091
+ "dt": {},
2092
+ "em": {},
2093
+ "embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
2094
+ "fieldset": { "disabled": 1, "form": 1, "name": 1 },
2095
+ "figcaption": {},
2096
+ "figure": {},
2097
+ "footer": {},
2098
+ "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 } },
2099
+ "h1": {},
2100
+ "h2": {},
2101
+ "h3": {},
2102
+ "h4": {},
2103
+ "h5": {},
2104
+ "h6": {},
2105
+ "head": {},
2106
+ "header": {},
2107
+ "hr": {},
2108
+ "html": { "manifest": 1 },
2109
+ "i": {},
2110
+ "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 } },
2111
+ "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
2112
+ "input": {
2113
+ "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 },
2114
+ "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
2115
+ },
2116
+ "ins": { "cite": 1, "datetime": 1 },
2117
+ "kbd": {},
2118
+ "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
2119
+ "label": { "form": 1, "for": 1 },
2120
+ "legend": {},
2121
+ "li": { "value": 1 },
2122
+ "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 },
2123
+ "main": {},
2124
+ "map": { "name": 1 },
2125
+ "mark": {},
2126
+ "math": {},
2127
+ "menu": { "type": 1, "label": 1 },
2128
+ "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
2129
+ "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
2130
+ "nav": {},
2131
+ "noscript": { "href": 1 },
2132
+ "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
2133
+ "ol": { "start": 1, "reversed": 1 },
2134
+ "optgroup": { "disabled": 1, "label": 1 },
2135
+ "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
2136
+ "output": { "for": 1, "form": 1, "name": 1 },
2137
+ "p": {},
2138
+ "param": { "name": 1, "value": 1 },
2139
+ "pre": {},
2140
+ "progress": { "value": 1, "max": 1 },
2141
+ "q": { "cite": 1 },
2142
+ "rp": {},
2143
+ "rt": {},
2144
+ "ruby": {},
2145
+ "s": {},
2146
+ "samp": {},
2147
+ "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
2148
+ "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
2149
+ "small": {},
2150
+ "source": { "src": 1, "type": 1, "media": 1 },
2151
+ "span": {},
2152
+ "strong": {},
2153
+ "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
2154
+ "sub": {},
2155
+ "sup": {},
2156
+ "svg": {},
2157
+ "table": { "summary": 1 },
2158
+ "tbody": {},
2159
+ "td": { "headers": 1, "rowspan": 1, "colspan": 1 },
2160
+ "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 } },
2161
+ "tfoot": {},
2162
+ "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
2163
+ "thead": {},
2164
+ "time": { "datetime": 1 },
2165
+ "title": {},
2166
+ "tr": {},
2167
+ "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
2168
+ "section": {},
2169
+ "summary": {},
2170
+ "u": {},
2171
+ "ul": {},
2172
+ "var": {},
2173
+ "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 } },
2174
+ "wbr": {}
2175
+ };
2176
+ var elements = Object.keys(attributeMap);
2177
+ function is(token, type) {
2178
+ return token.type.lastIndexOf(type + ".xml") > -1;
2179
+ }
2180
+ function findTagName(session, pos) {
2181
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2182
+ var token = iterator.getCurrentToken();
2183
+ while (token && !is(token, "tag-name")) {
2184
+ token = iterator.stepBackward();
2185
+ }
2186
+ if (token)
2187
+ return token.value;
2188
+ }
2189
+ function findAttributeName(session, pos) {
2190
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2191
+ var token = iterator.getCurrentToken();
2192
+ while (token && !is(token, "attribute-name")) {
2193
+ token = iterator.stepBackward();
2194
+ }
2195
+ if (token)
2196
+ return token.value;
2197
+ }
2198
+ var HtmlCompletions = function () {
2199
+ };
2200
+ (function () {
2201
+ this.getCompletions = function (state, session, pos, prefix) {
2202
+ var token = session.getTokenAt(pos.row, pos.column);
2203
+ if (!token)
2204
+ return [];
2205
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2206
+ return this.getTagCompletions(state, session, pos, prefix);
2207
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2208
+ return this.getAttributeCompletions(state, session, pos, prefix);
2209
+ if (is(token, "attribute-value"))
2210
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2211
+ var line = session.getLine(pos.row).substr(0, pos.column);
2212
+ if (/&[a-z]*$/i.test(line))
2213
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2214
+ return [];
2215
+ };
2216
+ this.getTagCompletions = function (state, session, pos, prefix) {
2217
+ return elements.map(function (element) {
2218
+ return {
2219
+ value: element,
2220
+ meta: "tag",
2221
+ score: 1000000
2222
+ };
2223
+ });
2224
+ };
2225
+ this.getAttributeCompletions = function (state, session, pos, prefix) {
2226
+ var tagName = findTagName(session, pos);
2227
+ if (!tagName)
2228
+ return [];
2229
+ var attributes = globalAttributes;
2230
+ if (tagName in attributeMap) {
2231
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2232
+ }
2233
+ return attributes.map(function (attribute) {
2234
+ return {
2235
+ caption: attribute,
2236
+ snippet: attribute + '="$0"',
2237
+ meta: "attribute",
2238
+ score: 1000000
2239
+ };
2240
+ });
2241
+ };
2242
+ this.getAttributeValueCompletions = function (state, session, pos, prefix) {
2243
+ var tagName = findTagName(session, pos);
2244
+ var attributeName = findAttributeName(session, pos);
2245
+ if (!tagName)
2246
+ return [];
2247
+ var values = [];
2248
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2249
+ values = Object.keys(attributeMap[tagName][attributeName]);
2250
+ }
2251
+ return values.map(function (value) {
2252
+ return {
2253
+ caption: value,
2254
+ snippet: value,
2255
+ meta: "attribute value",
2256
+ score: 1000000
2257
+ };
2258
+ });
2259
+ };
2260
+ this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
2261
+ 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;'];
2262
+ return values.map(function (value) {
2263
+ return {
2264
+ caption: value,
2265
+ snippet: value,
2266
+ meta: "html entity",
2267
+ score: 1000000
2268
+ };
2269
+ });
2270
+ };
2271
+ }).call(HtmlCompletions.prototype);
2272
+ exports.HtmlCompletions = HtmlCompletions;
2273
+
2274
+ });
2275
+
2276
+ ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module){"use strict";
2277
+ var oop = require("../lib/oop");
2278
+ var lang = require("../lib/lang");
2279
+ var TextMode = require("./text").Mode;
2280
+ var JavaScriptMode = require("./javascript").Mode;
2281
+ var CssMode = require("./css").Mode;
2282
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2283
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2284
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2285
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2286
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2287
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2288
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2289
+ var Mode = function (options) {
2290
+ this.fragmentContext = options && options.fragmentContext;
2291
+ this.HighlightRules = HtmlHighlightRules;
2292
+ this.$behaviour = new XmlBehaviour();
2293
+ this.$completer = new HtmlCompletions();
2294
+ this.createModeDelegates({
2295
+ "js-": JavaScriptMode,
2296
+ "css-": CssMode
2297
+ });
2298
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2299
+ };
2300
+ oop.inherits(Mode, TextMode);
2301
+ (function () {
2302
+ this.blockComment = { start: "<!--", end: "-->" };
2303
+ this.voidElements = lang.arrayToMap(voidElements);
2304
+ this.getNextLineIndent = function (state, line, tab) {
2305
+ return this.$getIndent(line);
2306
+ };
2307
+ this.checkOutdent = function (state, line, input) {
2308
+ return false;
2309
+ };
2310
+ this.getCompletions = function (state, session, pos, prefix) {
2311
+ return this.$completer.getCompletions(state, session, pos, prefix);
2312
+ };
2313
+ this.createWorker = function (session) {
2314
+ if (this.constructor != Mode)
2315
+ return;
2316
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2317
+ worker.attachToDocument(session.getDocument());
2318
+ if (this.fragmentContext)
2319
+ worker.call("setOptions", [{ context: this.fragmentContext }]);
2320
+ worker.on("error", function (e) {
2321
+ session.setAnnotations(e.data);
2322
+ });
2323
+ worker.on("terminate", function () {
2324
+ session.clearAnnotations();
2325
+ });
2326
+ return worker;
2327
+ };
2328
+ this.$id = "ace/mode/html";
2329
+ this.snippetFileId = "ace/snippets/html";
2330
+ }).call(Mode.prototype);
2331
+ exports.Mode = Mode;
2332
+
2333
+ });
2334
+
2335
+ ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
2336
+ var oop = require("../lib/oop");
2337
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
2338
+ var constantOtherSymbol = exports.constantOtherSymbol = {
2339
+ token: "constant.other.symbol.ruby", // symbol
2340
+ regex: "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"
2341
+ };
2342
+ exports.qString = {
2343
+ token: "string", // single line
2344
+ regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
2345
+ };
2346
+ exports.qqString = {
2347
+ token: "string", // single line
2348
+ regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
2349
+ };
2350
+ exports.tString = {
2351
+ token: "string", // backtick string
2352
+ regex: "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"
2353
+ };
2354
+ var constantNumericHex = exports.constantNumericHex = {
2355
+ token: "constant.numeric", // hex
2356
+ regex: "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"
2357
+ };
2358
+ var constantNumericBinary = exports.constantNumericBinary = {
2359
+ token: "constant.numeric",
2360
+ regex: /\b(0[bB][01](?:[01]|_(?=[01]))*)\b/
2361
+ };
2362
+ var constantNumericDecimal = exports.constantNumericDecimal = {
2363
+ token: "constant.numeric",
2364
+ regex: /\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/
2365
+ };
2366
+ var constantNumericOctal = exports.constantNumericOctal = {
2367
+ token: "constant.numeric",
2368
+ regex: /\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/
2369
+ };
2370
+ var constantNumericRational = exports.constantNumericRational = {
2371
+ token: "constant.numeric", //rational + complex
2372
+ regex: /\b([\d]+(?:[./][\d]+)?ri?)\b/
2373
+ };
2374
+ var constantNumericComplex = exports.constantNumericComplex = {
2375
+ token: "constant.numeric", //simple complex numbers
2376
+ regex: /\b([\d]i)\b/
2377
+ };
2378
+ var constantNumericFloat = exports.constantNumericFloat = {
2379
+ token: "constant.numeric", // float + complex
2380
+ regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"
2381
+ };
2382
+ var instanceVariable = exports.instanceVariable = {
2383
+ token: "variable.instance", // instance variable
2384
+ regex: "@{1,2}[a-zA-Z_\\d]+"
2385
+ };
2386
+ var RubyHighlightRules = function () {
2387
+ var builtinFunctions = ("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" +
2388
+ "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" +
2389
+ "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" +
2390
+ "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" +
2391
+ "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" +
2392
+ "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" +
2393
+ "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" +
2394
+ "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" +
2395
+ "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" +
2396
+ "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" +
2397
+ "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" +
2398
+ "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" +
2399
+ "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" +
2400
+ "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" +
2401
+ "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" +
2402
+ "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" +
2403
+ "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" +
2404
+ "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" +
2405
+ "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" +
2406
+ "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" +
2407
+ "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" +
2408
+ "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" +
2409
+ "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" +
2410
+ "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" +
2411
+ "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" +
2412
+ "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" +
2413
+ "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" +
2414
+ "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" +
2415
+ "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" +
2416
+ "has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|" +
2417
+ "private_class_method|remove_method|undef_method");
2418
+ var keywords = ("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" +
2419
+ "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" +
2420
+ "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend");
2421
+ var buildinConstants = ("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" +
2422
+ "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION");
2423
+ var builtinVariables = ("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" +
2424
+ "$!|root_url|flash|session|cookies|params|request|response|logger|self");
2425
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
2426
+ "keyword": keywords,
2427
+ "constant.language": buildinConstants,
2428
+ "variable.language": builtinVariables,
2429
+ "support.function": builtinFunctions,
2430
+ "invalid.deprecated": "debugger" // TODO is this a remnant from js mode?
2431
+ }, "identifier");
2432
+ var escapedChars = "\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})";
2433
+ var closeParen = {
2434
+ "(": ")",
2435
+ "[": "]",
2436
+ "{": "}",
2437
+ "<": ">",
2438
+ "^": "^",
2439
+ "|": "|",
2440
+ "%": "%"
2441
+ };
2442
+ this.$rules = {
2443
+ "start": [
2444
+ {
2445
+ token: "comment",
2446
+ regex: "#.*$"
2447
+ }, {
2448
+ token: "comment.multiline", // multi line comment
2449
+ regex: "^=begin(?=$|\\s.*$)",
2450
+ next: "comment"
2451
+ }, {
2452
+ token: "string.regexp",
2453
+ regex: /[/](?=.*\/)/,
2454
+ next: "regex"
2455
+ },
2456
+ [{
2457
+ token: ["constant.other.symbol.ruby", "string.start"],
2458
+ regex: /(:)?(")/,
2459
+ push: [{
2460
+ token: "constant.language.escape",
2461
+ regex: escapedChars
2462
+ }, {
2463
+ token: "paren.start",
2464
+ regex: /#{/,
2465
+ push: "start"
2466
+ }, {
2467
+ token: "string.end",
2468
+ regex: /"/,
2469
+ next: "pop"
2470
+ }, {
2471
+ defaultToken: "string"
2472
+ }]
2473
+ }, {
2474
+ token: "string.start",
2475
+ regex: /`/,
2476
+ push: [{
2477
+ token: "constant.language.escape",
2478
+ regex: escapedChars
2479
+ }, {
2480
+ token: "paren.start",
2481
+ regex: /#{/,
2482
+ push: "start"
2483
+ }, {
2484
+ token: "string.end",
2485
+ regex: /`/,
2486
+ next: "pop"
2487
+ }, {
2488
+ defaultToken: "string"
2489
+ }]
2490
+ }, {
2491
+ token: ["constant.other.symbol.ruby", "string.start"],
2492
+ regex: /(:)?(')/,
2493
+ push: [{
2494
+ token: "constant.language.escape",
2495
+ regex: /\\['\\]/
2496
+ }, {
2497
+ token: "string.end",
2498
+ regex: /'/,
2499
+ next: "pop"
2500
+ }, {
2501
+ defaultToken: "string"
2502
+ }]
2503
+ }, {
2504
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
2505
+ regex: /%[qwx]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2506
+ if (stack.length)
2507
+ stack = [];
2508
+ var paren = val[val.length - 1];
2509
+ stack.unshift(paren, state);
2510
+ this.next = "qStateWithoutInterpolation";
2511
+ return this.token;
2512
+ }
2513
+ }, {
2514
+ token: "string.start", //doesn't see any differences between strings and array of strings in highlighting
2515
+ regex: /%[QWX]?([(\[<{^|%])/, onMatch: function (val, state, stack) {
2516
+ if (stack.length)
2517
+ stack = [];
2518
+ var paren = val[val.length - 1];
2519
+ stack.unshift(paren, state);
2520
+ this.next = "qStateWithInterpolation";
2521
+ return this.token;
2522
+ }
2523
+ }, {
2524
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
2525
+ regex: /%[si]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2526
+ if (stack.length)
2527
+ stack = [];
2528
+ var paren = val[val.length - 1];
2529
+ stack.unshift(paren, state);
2530
+ this.next = "sStateWithoutInterpolation";
2531
+ return this.token;
2532
+ }
2533
+ }, {
2534
+ token: "constant.other.symbol.ruby", //doesn't see any differences between symbols and array of symbols in highlighting
2535
+ regex: /%[SI]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2536
+ if (stack.length)
2537
+ stack = [];
2538
+ var paren = val[val.length - 1];
2539
+ stack.unshift(paren, state);
2540
+ this.next = "sStateWithInterpolation";
2541
+ return this.token;
2542
+ }
2543
+ }, {
2544
+ token: "string.regexp",
2545
+ regex: /%[r]([(\[<{^|%])/, onMatch: function (val, state, stack) {
2546
+ if (stack.length)
2547
+ stack = [];
2548
+ var paren = val[val.length - 1];
2549
+ stack.unshift(paren, state);
2550
+ this.next = "rState";
2551
+ return this.token;
2552
+ }
2553
+ }],
2554
+ {
2555
+ token: "punctuation", // namespaces aren't symbols
2556
+ regex: "::"
2557
+ },
2558
+ instanceVariable,
2559
+ {
2560
+ token: "variable.global", // global variable
2561
+ regex: "[$][a-zA-Z_\\d]+"
2562
+ }, {
2563
+ token: "support.class", // class name
2564
+ regex: "[A-Z][a-zA-Z_\\d]*"
2565
+ }, {
2566
+ token: ["punctuation.operator", "support.function"],
2567
+ regex: /(\.)([a-zA-Z_\d]+)(?=\()/
2568
+ }, {
2569
+ token: ["punctuation.operator", "identifier"],
2570
+ regex: /(\.)([a-zA-Z_][a-zA-Z_\d]*)/
2571
+ }, {
2572
+ token: "string.character",
2573
+ regex: "\\B\\?(?:" + escapedChars + "|\\S)"
2574
+ }, {
2575
+ token: "punctuation.operator",
2576
+ regex: /\?(?=.+:)/
2577
+ },
2578
+ constantNumericRational,
2579
+ constantNumericComplex,
2580
+ constantOtherSymbol,
2581
+ constantNumericHex,
2582
+ constantNumericFloat,
2583
+ constantNumericBinary,
2584
+ constantNumericDecimal,
2585
+ constantNumericOctal,
2586
+ {
2587
+ token: "constant.language.boolean",
2588
+ regex: "(?:true|false)\\b"
2589
+ }, {
2590
+ token: keywordMapper,
2591
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
2592
+ }, {
2593
+ token: "punctuation.separator.key-value",
2594
+ regex: "=>"
2595
+ }, {
2596
+ stateName: "heredoc",
2597
+ onMatch: function (value, currentState, stack) {
2598
+ var next = (value[2] == '-' || value[2] == '~') ? "indentedHeredoc" : "heredoc";
2599
+ var tokens = value.split(this.splitRegex);
2600
+ stack.push(next, tokens[3]);
2601
+ return [
2602
+ { type: "constant", value: tokens[1] },
2603
+ { type: "string", value: tokens[2] },
2604
+ { type: "support.class", value: tokens[3] },
2605
+ { type: "string", value: tokens[4] }
2606
+ ];
2607
+ },
2608
+ regex: "(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",
2609
+ rules: {
2610
+ heredoc: [{
2611
+ onMatch: function (value, currentState, stack) {
2612
+ if (value === stack[1]) {
2613
+ stack.shift();
2614
+ stack.shift();
2615
+ this.next = stack[0] || "start";
2616
+ return "support.class";
2617
+ }
2618
+ this.next = "";
2619
+ return "string";
2620
+ },
2621
+ regex: ".*$",
2622
+ next: "start"
2623
+ }],
2624
+ indentedHeredoc: [{
2625
+ token: "string",
2626
+ regex: "^ +"
2627
+ }, {
2628
+ onMatch: function (value, currentState, stack) {
2629
+ if (value === stack[1]) {
2630
+ stack.shift();
2631
+ stack.shift();
2632
+ this.next = stack[0] || "start";
2633
+ return "support.class";
2634
+ }
2635
+ this.next = "";
2636
+ return "string";
2637
+ },
2638
+ regex: ".*$",
2639
+ next: "start"
2640
+ }]
2641
+ }
2642
+ }, {
2643
+ regex: "$",
2644
+ token: "empty",
2645
+ next: function (currentState, stack) {
2646
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
2647
+ return stack[0];
2648
+ return currentState;
2649
+ }
2650
+ }, {
2651
+ token: "keyword.operator",
2652
+ regex: "!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"
2653
+ }, {
2654
+ token: "paren.lparen",
2655
+ regex: "[[({]"
2656
+ }, {
2657
+ token: "paren.rparen",
2658
+ regex: "[\\])}]",
2659
+ onMatch: function (value, currentState, stack) {
2660
+ this.next = '';
2661
+ if (value == "}" && stack.length > 1 && stack[1] != "start") {
2662
+ stack.shift();
2663
+ this.next = stack.shift();
2664
+ }
2665
+ return this.token;
2666
+ }
2667
+ }, {
2668
+ token: "text",
2669
+ regex: "\\s+"
2670
+ }, {
2671
+ token: "punctuation.operator",
2672
+ regex: /[?:,;.]/
2673
+ }
2674
+ ],
2675
+ "comment": [
2676
+ {
2677
+ token: "comment.multiline", // closing comment
2678
+ regex: "^=end(?=$|\\s.*$)",
2679
+ next: "start"
2680
+ }, {
2681
+ token: "comment", // comment spanning whole line
2682
+ regex: ".+"
2683
+ }
2684
+ ],
2685
+ "qStateWithInterpolation": [{
2686
+ token: "string.start", // excluded nested |^% due to difficulty in realization
2687
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2688
+ if (stack.length && val === stack[0]) {
2689
+ stack.unshift(val, state);
2690
+ return this.token;
2691
+ }
2692
+ return "string";
2693
+ }
2694
+ }, {
2695
+ token: "constant.language.escape",
2696
+ regex: escapedChars
2697
+ }, {
2698
+ token: "constant.language.escape",
2699
+ regex: /\\./
2700
+ }, {
2701
+ token: "paren.start",
2702
+ regex: /#{/,
2703
+ push: "start"
2704
+ }, {
2705
+ token: "string.end",
2706
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
2707
+ if (stack.length && val === closeParen[stack[0]]) {
2708
+ stack.shift();
2709
+ this.next = stack.shift();
2710
+ return this.token;
2711
+ }
2712
+ this.next = '';
2713
+ return "string";
2714
+ }
2715
+ }, {
2716
+ defaultToken: "string"
2717
+ }],
2718
+ "qStateWithoutInterpolation": [{
2719
+ token: "string.start", // excluded nested |^% due to difficulty in realization
2720
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2721
+ if (stack.length && val === stack[0]) {
2722
+ stack.unshift(val, state);
2723
+ return this.token;
2724
+ }
2725
+ return "string";
2726
+ }
2727
+ }, {
2728
+ token: "constant.language.escape",
2729
+ regex: /\\['\\]/
2730
+ }, {
2731
+ token: "constant.language.escape",
2732
+ regex: /\\./
2733
+ }, {
2734
+ token: "string.end",
2735
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
2736
+ if (stack.length && val === closeParen[stack[0]]) {
2737
+ stack.shift();
2738
+ this.next = stack.shift();
2739
+ return this.token;
2740
+ }
2741
+ this.next = '';
2742
+ return "string";
2743
+ }
2744
+ }, {
2745
+ defaultToken: "string"
2746
+ }],
2747
+ "sStateWithoutInterpolation": [{
2748
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
2749
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2750
+ if (stack.length && val === stack[0]) {
2751
+ stack.unshift(val, state);
2752
+ return this.token;
2753
+ }
2754
+ return "constant.other.symbol.ruby";
2755
+ }
2756
+ }, {
2757
+ token: "constant.other.symbol.ruby",
2758
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
2759
+ if (stack.length && val === closeParen[stack[0]]) {
2760
+ stack.shift();
2761
+ this.next = stack.shift();
2762
+ return this.token;
2763
+ }
2764
+ this.next = '';
2765
+ return "constant.other.symbol.ruby";
2766
+ }
2767
+ }, {
2768
+ defaultToken: "constant.other.symbol.ruby"
2769
+ }],
2770
+ "sStateWithInterpolation": [{
2771
+ token: "constant.other.symbol.ruby", // excluded nested |^% due to difficulty in realization
2772
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2773
+ if (stack.length && val === stack[0]) {
2774
+ stack.unshift(val, state);
2775
+ return this.token;
2776
+ }
2777
+ return "constant.other.symbol.ruby";
2778
+ }
2779
+ }, {
2780
+ token: "constant.language.escape",
2781
+ regex: escapedChars
2782
+ }, {
2783
+ token: "constant.language.escape",
2784
+ regex: /\\./
2785
+ }, {
2786
+ token: "paren.start",
2787
+ regex: /#{/,
2788
+ push: "start"
2789
+ }, {
2790
+ token: "constant.other.symbol.ruby",
2791
+ regex: /[)\]>}^|%]/, onMatch: function (val, state, stack) {
2792
+ if (stack.length && val === closeParen[stack[0]]) {
2793
+ stack.shift();
2794
+ this.next = stack.shift();
2795
+ return this.token;
2796
+ }
2797
+ this.next = '';
2798
+ return "constant.other.symbol.ruby";
2799
+ }
2800
+ }, {
2801
+ defaultToken: "constant.other.symbol.ruby"
2802
+ }],
2803
+ "rState": [{
2804
+ token: "string.regexp", // excluded nested |^% due to difficulty in realization
2805
+ regex: /[(\[<{]/, onMatch: function (val, state, stack) {
2806
+ if (stack.length && val === stack[0]) {
2807
+ stack.unshift(val, state);
2808
+ return this.token;
2809
+ }
2810
+ return "constant.language.escape";
2811
+ }
2812
+ }, {
2813
+ token: "paren.start",
2814
+ regex: /#{/,
2815
+ push: "start"
2816
+ }, {
2817
+ token: "string.regexp",
2818
+ regex: /\//
2819
+ }, {
2820
+ token: "string.regexp",
2821
+ regex: /[)\]>}^|%][imxouesn]*/, onMatch: function (val, state, stack) {
2822
+ if (stack.length && val[0] === closeParen[stack[0]]) {
2823
+ stack.shift();
2824
+ this.next = stack.shift();
2825
+ return this.token;
2826
+ }
2827
+ this.next = '';
2828
+ return "constant.language.escape";
2829
+ }
2830
+ },
2831
+ { include: "regex" },
2832
+ {
2833
+ defaultToken: "string.regexp"
2834
+ }],
2835
+ "regex": [
2836
+ {
2837
+ token: "regexp.keyword",
2838
+ regex: /\\[wWdDhHsS]/
2839
+ }, {
2840
+ token: "constant.language.escape",
2841
+ regex: /\\[AGbBzZ]/
2842
+ }, {
2843
+ token: "constant.language.escape",
2844
+ regex: /\\g<[a-zA-Z0-9]*>/
2845
+ }, {
2846
+ token: ["constant.language.escape", "regexp.keyword", "constant.language.escape"],
2847
+ regex: /(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/
2848
+ }, {
2849
+ token: ["constant.language.escape", "invalid", "constant.language.escape"],
2850
+ regex: /(\\p{\^?)([^/]*)(})/
2851
+ }, {
2852
+ token: "regexp.keyword.operator",
2853
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
2854
+ }, {
2855
+ token: "string.regexp",
2856
+ regex: /[/][imxouesn]*/,
2857
+ next: "start"
2858
+ }, {
2859
+ token: "invalid",
2860
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
2861
+ }, {
2862
+ token: "constant.language.escape",
2863
+ regex: /\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
2864
+ }, {
2865
+ token: "constant.language.delimiter",
2866
+ regex: /\|/
2867
+ }, {
2868
+ token: "regexp.keyword",
2869
+ regex: /\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/
2870
+ }, {
2871
+ token: "constant.language.escape",
2872
+ regex: /\[\^?/,
2873
+ push: "regex_character_class"
2874
+ }, {
2875
+ defaultToken: "string.regexp"
2876
+ }
2877
+ ],
2878
+ "regex_character_class": [
2879
+ {
2880
+ token: "regexp.keyword",
2881
+ regex: /\\[wWdDhHsS]/
2882
+ }, {
2883
+ token: "regexp.charclass.keyword.operator",
2884
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
2885
+ }, {
2886
+ token: "constant.language.escape",
2887
+ regex: /&?&?\[\^?/,
2888
+ push: "regex_character_class"
2889
+ }, {
2890
+ token: "constant.language.escape",
2891
+ regex: "]",
2892
+ next: "pop"
2893
+ }, {
2894
+ token: "constant.language.escape",
2895
+ regex: "-"
2896
+ }, {
2897
+ defaultToken: "string.regexp.characterclass"
2898
+ }
2899
+ ]
2900
+ };
2901
+ this.normalizeRules();
2902
+ };
2903
+ oop.inherits(RubyHighlightRules, TextHighlightRules);
2904
+ exports.RubyHighlightRules = RubyHighlightRules;
2905
+
2906
+ });
2907
+
2908
+ ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module){"use strict";
2909
+ var oop = require("../../lib/oop");
2910
+ var BaseFoldMode = require("./fold_mode").FoldMode;
2911
+ var Range = require("../../range").Range;
2912
+ var TokenIterator = require("../../token_iterator").TokenIterator;
2913
+ var FoldMode = exports.FoldMode = function () {
2914
+ };
2915
+ oop.inherits(FoldMode, BaseFoldMode);
2916
+ (function () {
2917
+ this.indentKeywords = {
2918
+ "class": 1,
2919
+ "def": 1,
2920
+ "module": 1,
2921
+ "do": 1,
2922
+ "unless": 1,
2923
+ "if": 1,
2924
+ "while": 1,
2925
+ "for": 1,
2926
+ "until": 1,
2927
+ "begin": 1,
2928
+ "else": 0,
2929
+ "elsif": 0,
2930
+ "rescue": 0,
2931
+ "ensure": 0,
2932
+ "when": 0,
2933
+ "end": -1,
2934
+ "case": 1,
2935
+ "=begin": 1,
2936
+ "=end": -1
2937
+ };
2938
+ this.foldingStartMarker = /(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/;
2939
+ this.foldingStopMarker = /(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/;
2940
+ this.getFoldWidget = function (session, foldStyle, row) {
2941
+ var line = session.getLine(row);
2942
+ var isStart = this.foldingStartMarker.test(line);
2943
+ var isEnd = this.foldingStopMarker.test(line);
2944
+ if (isStart && !isEnd) {
2945
+ var match = line.match(this.foldingStartMarker);
2946
+ if (match[1]) {
2947
+ if (match[1] == "if" || match[1] == "else" || match[1] == "while" || match[1] == "until" || match[1] == "unless") {
2948
+ if (match[1] == "else" && /^\s*else\s*$/.test(line) === false) {
2949
+ return;
2950
+ }
2951
+ if (/^\s*(?:if|else|while|until|unless)\s*/.test(line) === false) {
2952
+ return;
2953
+ }
2954
+ }
2955
+ if (match[1] == "when") {
2956
+ if (/\sthen\s/.test(line) === true) {
2957
+ return;
2958
+ }
2959
+ }
2960
+ if (session.getTokenAt(row, match.index + 2).type === "keyword")
2961
+ return "start";
2962
+ }
2963
+ else if (match[3]) {
2964
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
2965
+ return "start";
2966
+ }
2967
+ else {
2968
+ return "start";
2969
+ }
2970
+ }
2971
+ if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd)
2972
+ return "";
2973
+ var match = line.match(this.foldingStopMarker);
2974
+ if (match[3] === "end") {
2975
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
2976
+ return "end";
2977
+ }
2978
+ else if (match[1]) {
2979
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
2980
+ return "end";
2981
+ }
2982
+ else
2983
+ return "end";
2984
+ };
2985
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
2986
+ var line = session.doc.getLine(row);
2987
+ var match = this.foldingStartMarker.exec(line);
2988
+ if (match) {
2989
+ if (match[1] || match[3])
2990
+ return this.rubyBlock(session, row, match.index + 2);
2991
+ return this.openingBracketBlock(session, "{", row, match.index);
2992
+ }
2993
+ var match = this.foldingStopMarker.exec(line);
2994
+ if (match) {
2995
+ if (match[3] === "end") {
2996
+ if (session.getTokenAt(row, match.index + 1).type === "keyword")
2997
+ return this.rubyBlock(session, row, match.index + 1);
2998
+ }
2999
+ if (match[1] === "=end") {
3000
+ if (session.getTokenAt(row, match.index + 1).type === "comment.multiline")
3001
+ return this.rubyBlock(session, row, match.index + 1);
3002
+ }
3003
+ return this.closingBracketBlock(session, "}", row, match.index + match[0].length);
3004
+ }
3005
+ };
3006
+ this.rubyBlock = function (session, row, column, tokenRange) {
3007
+ var stream = new TokenIterator(session, row, column);
3008
+ var token = stream.getCurrentToken();
3009
+ if (!token || (token.type != "keyword" && token.type != "comment.multiline"))
3010
+ return;
3011
+ var val = token.value;
3012
+ var line = session.getLine(row);
3013
+ switch (token.value) {
3014
+ case "if":
3015
+ case "unless":
3016
+ case "while":
3017
+ case "until":
3018
+ var checkToken = new RegExp("^\\s*" + token.value);
3019
+ if (!checkToken.test(line)) {
3020
+ return;
3021
+ }
3022
+ var dir = this.indentKeywords[val];
3023
+ break;
3024
+ case "when":
3025
+ if (/\sthen\s/.test(line)) {
3026
+ return;
3027
+ }
3028
+ case "elsif":
3029
+ case "rescue":
3030
+ case "ensure":
3031
+ var dir = 1;
3032
+ break;
3033
+ case "else":
3034
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
3035
+ if (!checkToken.test(line)) {
3036
+ return;
3037
+ }
3038
+ var dir = 1;
3039
+ break;
3040
+ default:
3041
+ var dir = this.indentKeywords[val];
3042
+ break;
3043
+ }
3044
+ var stack = [val];
3045
+ if (!dir)
3046
+ return;
3047
+ var startColumn = dir === -1 ? session.getLine(row - 1).length : session.getLine(row).length;
3048
+ var startRow = row;
3049
+ var ranges = [];
3050
+ ranges.push(stream.getCurrentTokenRange());
3051
+ stream.step = dir === -1 ? stream.stepBackward : stream.stepForward;
3052
+ if (token.type == "comment.multiline") {
3053
+ while (token = stream.step()) {
3054
+ if (token.type !== "comment.multiline")
3055
+ continue;
3056
+ if (dir == 1) {
3057
+ startColumn = 6;
3058
+ if (token.value == "=end") {
3059
+ break;
3060
+ }
3061
+ }
3062
+ else {
3063
+ if (token.value == "=begin") {
3064
+ break;
3065
+ }
3066
+ }
3067
+ }
3068
+ }
3069
+ else {
3070
+ while (token = stream.step()) {
3071
+ var ignore = false;
3072
+ if (token.type !== "keyword")
3073
+ continue;
3074
+ var level = dir * this.indentKeywords[token.value];
3075
+ line = session.getLine(stream.getCurrentTokenRow());
3076
+ switch (token.value) {
3077
+ case "do":
3078
+ for (var i = stream.$tokenIndex - 1; i >= 0; i--) {
3079
+ var prevToken = stream.$rowTokens[i];
3080
+ if (prevToken && (prevToken.value == "while" || prevToken.value == "until" || prevToken.value == "for")) {
3081
+ level = 0;
3082
+ break;
3083
+ }
3084
+ }
3085
+ break;
3086
+ case "else":
3087
+ var checkToken = new RegExp("^\\s*" + token.value + "\\s*$");
3088
+ if (!checkToken.test(line) || val == "case") {
3089
+ level = 0;
3090
+ ignore = true;
3091
+ }
3092
+ break;
3093
+ case "if":
3094
+ case "unless":
3095
+ case "while":
3096
+ case "until":
3097
+ var checkToken = new RegExp("^\\s*" + token.value);
3098
+ if (!checkToken.test(line)) {
3099
+ level = 0;
3100
+ ignore = true;
3101
+ }
3102
+ break;
3103
+ case "when":
3104
+ if (/\sthen\s/.test(line) || val == "case") {
3105
+ level = 0;
3106
+ ignore = true;
3107
+ }
3108
+ break;
3109
+ }
3110
+ if (level > 0) {
3111
+ stack.unshift(token.value);
3112
+ }
3113
+ else if (level <= 0 && ignore === false) {
3114
+ stack.shift();
3115
+ if (!stack.length) {
3116
+ if ((val == "while" || val == "until" || val == "for") && token.value != "do") {
3117
+ break;
3118
+ }
3119
+ if (token.value == "do" && dir == -1 && level != 0)
3120
+ break;
3121
+ if (token.value != "do")
3122
+ break;
3123
+ }
3124
+ if (level === 0) {
3125
+ stack.unshift(token.value);
3126
+ }
3127
+ }
3128
+ }
3129
+ }
3130
+ if (!token)
3131
+ return null;
3132
+ if (tokenRange) {
3133
+ ranges.push(stream.getCurrentTokenRange());
3134
+ return ranges;
3135
+ }
3136
+ var row = stream.getCurrentTokenRow();
3137
+ if (dir === -1) {
3138
+ if (token.type === "comment.multiline") {
3139
+ var endColumn = 6;
3140
+ }
3141
+ else {
3142
+ var endColumn = session.getLine(row).length;
3143
+ }
3144
+ return new Range(row, endColumn, startRow - 1, startColumn);
3145
+ }
3146
+ else
3147
+ return new Range(startRow, startColumn, row - 1, session.getLine(row - 1).length);
3148
+ };
3149
+ }).call(FoldMode.prototype);
3150
+
3151
+ });
3152
+
3153
+ ace.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/folding/ruby"], function(require, exports, module){"use strict";
3154
+ var oop = require("../lib/oop");
3155
+ var TextMode = require("./text").Mode;
3156
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
3157
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
3158
+ var Range = require("../range").Range;
3159
+ var FoldMode = require("./folding/ruby").FoldMode;
3160
+ var Mode = function () {
3161
+ this.HighlightRules = RubyHighlightRules;
3162
+ this.$outdent = new MatchingBraceOutdent();
3163
+ this.$behaviour = this.$defaultBehaviour;
3164
+ this.foldingRules = new FoldMode();
3165
+ this.indentKeywords = this.foldingRules.indentKeywords;
3166
+ };
3167
+ oop.inherits(Mode, TextMode);
3168
+ (function () {
3169
+ this.lineCommentStart = "#";
3170
+ this.getNextLineIndent = function (state, line, tab) {
3171
+ var indent = this.$getIndent(line);
3172
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
3173
+ var tokens = tokenizedLine.tokens;
3174
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
3175
+ return indent;
3176
+ }
3177
+ if (state == "start") {
3178
+ var match = line.match(/^.*[\{\(\[]\s*$/);
3179
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
3180
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
3181
+ var startingConditional = line.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);
3182
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
3183
+ indent += tab;
3184
+ }
3185
+ }
3186
+ return indent;
3187
+ };
3188
+ this.checkOutdent = function (state, line, input) {
3189
+ return /^\s+(end|else|rescue|ensure)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
3190
+ };
3191
+ this.autoOutdent = function (state, session, row) {
3192
+ var line = session.getLine(row);
3193
+ if (/}/.test(line))
3194
+ return this.$outdent.autoOutdent(session, row);
3195
+ var indent = this.$getIndent(line);
3196
+ var prevLine = session.getLine(row - 1);
3197
+ var prevIndent = this.$getIndent(prevLine);
3198
+ var tab = session.getTabString();
3199
+ if (prevIndent.length <= indent.length) {
3200
+ if (indent.slice(-tab.length) == tab)
3201
+ session.remove(new Range(row, indent.length - tab.length, row, indent.length));
3202
+ }
3203
+ };
3204
+ this.getMatching = function (session, row, column) {
3205
+ if (row == undefined) {
3206
+ var pos = session.selection.lead;
3207
+ column = pos.column;
3208
+ row = pos.row;
3209
+ }
3210
+ var startToken = session.getTokenAt(row, column);
3211
+ if (startToken && startToken.value in this.indentKeywords)
3212
+ return this.foldingRules.rubyBlock(session, row, column, true);
3213
+ };
3214
+ this.$id = "ace/mode/ruby";
3215
+ this.snippetFileId = "ace/snippets/ruby";
3216
+ }).call(Mode.prototype);
3217
+ exports.Mode = Mode;
3218
+
3219
+ });
3220
+
3221
+ ace.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){"use strict";
3222
+ var oop = require("../lib/oop");
3223
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
3224
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
3225
+ var EjsHighlightRules = function (start, end) {
3226
+ HtmlHighlightRules.call(this);
3227
+ if (!start)
3228
+ start = "(?:<%|<\\?|{{)";
3229
+ if (!end)
3230
+ end = "(?:%>|\\?>|}})";
3231
+ for (var i in this.$rules) {
3232
+ this.$rules[i].unshift({
3233
+ token: "markup.list.meta.tag",
3234
+ regex: start + "(?![>}])[-=]?",
3235
+ push: "ejs-start"
3236
+ });
3237
+ }
3238
+ this.embedRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "ejs-", [{
3239
+ token: "markup.list.meta.tag",
3240
+ regex: "-?" + end,
3241
+ next: "pop"
3242
+ }, {
3243
+ token: "comment",
3244
+ regex: "//.*?" + end,
3245
+ next: "pop"
3246
+ }]);
3247
+ this.normalizeRules();
3248
+ };
3249
+ oop.inherits(EjsHighlightRules, HtmlHighlightRules);
3250
+ exports.EjsHighlightRules = EjsHighlightRules;
3251
+ var oop = require("../lib/oop");
3252
+ var HtmlMode = require("./html").Mode;
3253
+ var JavaScriptMode = require("./javascript").Mode;
3254
+ var CssMode = require("./css").Mode;
3255
+ var RubyMode = require("./ruby").Mode;
3256
+ var Mode = function () {
3257
+ HtmlMode.call(this);
3258
+ this.HighlightRules = EjsHighlightRules;
3259
+ this.createModeDelegates({
3260
+ "js-": JavaScriptMode,
3261
+ "css-": CssMode,
3262
+ "ejs-": JavaScriptMode
3263
+ });
3264
+ };
3265
+ oop.inherits(Mode, HtmlMode);
3266
+ (function () {
3267
+ this.$id = "ace/mode/ejs";
3268
+ }).call(Mode.prototype);
3269
+ exports.Mode = Mode;
3270
+
3271
+ }); (function() {
3272
+ ace.require(["ace/mode/ejs"], function(m) {
3273
+ if (typeof module == "object" && typeof exports == "object" && module) {
3274
+ module.exports = m;
3275
+ }
3276
+ });
3277
+ })();
3278
+