@openui5/sap.ui.codeeditor 1.120.6 → 1.121.0

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 (457) hide show
  1. package/.reuse/dep5 +23 -21
  2. package/THIRDPARTY.txt +6 -43
  3. package/package.json +2 -2
  4. package/src/sap/ui/codeeditor/.library +2 -2
  5. package/src/sap/ui/codeeditor/CodeEditor.js +41 -27
  6. package/src/sap/ui/codeeditor/js/ace/ace.js +16262 -16597
  7. package/src/sap/ui/codeeditor/js/ace/css/ace.css +358 -86
  8. package/src/sap/ui/codeeditor/js/ace/css/ambiance-3.png +0 -0
  9. package/src/sap/ui/codeeditor/js/ace/css/chrome-2.png +0 -0
  10. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-1.png +0 -0
  11. package/src/sap/ui/codeeditor/js/ace/css/cloud9_day-2.png +0 -0
  12. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-1.png +0 -0
  13. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night-2.png +0 -0
  14. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-1.png +0 -0
  15. package/src/sap/ui/codeeditor/js/ace/css/cloud9_night_low_color-2.png +0 -0
  16. package/src/sap/ui/codeeditor/js/ace/css/clouds-2.png +0 -0
  17. package/src/sap/ui/codeeditor/js/ace/css/clouds_midnight-2.png +0 -0
  18. package/src/sap/ui/codeeditor/js/ace/css/cobalt-2.png +0 -0
  19. package/src/sap/ui/codeeditor/js/ace/css/crimson_editor-2.png +0 -0
  20. package/src/sap/ui/codeeditor/js/ace/css/dawn-2.png +0 -0
  21. package/src/sap/ui/codeeditor/js/ace/css/dracula-2.png +0 -0
  22. package/src/sap/ui/codeeditor/js/ace/css/dreamweaver-2.png +0 -0
  23. package/src/sap/ui/codeeditor/js/ace/css/eclipse-2.png +0 -0
  24. package/src/sap/ui/codeeditor/js/ace/css/github-2.png +0 -0
  25. package/src/sap/ui/codeeditor/js/ace/css/github_dark-1.png +0 -0
  26. package/src/sap/ui/codeeditor/js/ace/css/github_dark-2.png +0 -0
  27. package/src/sap/ui/codeeditor/js/ace/css/gob-2.png +0 -0
  28. package/src/sap/ui/codeeditor/js/ace/css/gruvbox-2.png +0 -0
  29. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_dark_hard-1.png +0 -0
  30. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-1.png +0 -0
  31. package/src/sap/ui/codeeditor/js/ace/css/gruvbox_light_hard-2.png +0 -0
  32. package/src/sap/ui/codeeditor/js/ace/css/idle_fingers-2.png +0 -0
  33. package/src/sap/ui/codeeditor/js/ace/css/iplastic-3.png +0 -0
  34. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-1.png +0 -0
  35. package/src/sap/ui/codeeditor/js/ace/css/katzenmilch-2.png +0 -0
  36. package/src/sap/ui/codeeditor/js/ace/css/kr_theme-2.png +0 -0
  37. package/src/sap/ui/codeeditor/js/ace/css/kuroir-1.png +0 -0
  38. package/src/sap/ui/codeeditor/js/ace/css/kuroir-2.png +0 -0
  39. package/src/sap/ui/codeeditor/js/ace/css/main-10.png +0 -0
  40. package/src/sap/ui/codeeditor/js/ace/css/main-11.png +0 -0
  41. package/src/sap/ui/codeeditor/js/ace/css/main-12.png +0 -0
  42. package/src/sap/ui/codeeditor/js/ace/css/main-13.png +0 -0
  43. package/src/sap/ui/codeeditor/js/ace/css/main-14.png +0 -0
  44. package/src/sap/ui/codeeditor/js/ace/css/main-15.png +0 -0
  45. package/src/sap/ui/codeeditor/js/ace/css/main-16.png +0 -0
  46. package/src/sap/ui/codeeditor/js/ace/css/main-17.png +0 -0
  47. package/src/sap/ui/codeeditor/js/ace/css/main-18.png +0 -0
  48. package/src/sap/ui/codeeditor/js/ace/css/main-19.png +0 -0
  49. package/src/sap/ui/codeeditor/js/ace/css/main-20.png +0 -0
  50. package/src/sap/ui/codeeditor/js/ace/css/main-21.png +0 -0
  51. package/src/sap/ui/codeeditor/js/ace/css/main-22.png +0 -0
  52. package/src/sap/ui/codeeditor/js/ace/css/main-22.svg +1 -0
  53. package/src/sap/ui/codeeditor/js/ace/css/main-23.png +0 -0
  54. package/src/sap/ui/codeeditor/js/ace/css/main-5.svg +7 -0
  55. package/src/sap/ui/codeeditor/js/ace/css/main-6.svg +7 -0
  56. package/src/sap/ui/codeeditor/js/ace/css/main-7.svg +9 -0
  57. package/src/sap/ui/codeeditor/js/ace/css/main-8.png +0 -0
  58. package/src/sap/ui/codeeditor/js/ace/css/main-8.svg +4 -0
  59. package/src/sap/ui/codeeditor/js/ace/css/main-9.png +0 -0
  60. package/src/sap/ui/codeeditor/js/ace/css/main-9.svg +4 -0
  61. package/src/sap/ui/codeeditor/js/ace/css/merbivore-2.png +0 -0
  62. package/src/sap/ui/codeeditor/js/ace/css/merbivore_soft-2.png +0 -0
  63. package/src/sap/ui/codeeditor/js/ace/css/mono_industrial-2.png +0 -0
  64. package/src/sap/ui/codeeditor/js/ace/css/monokai-2.png +0 -0
  65. package/src/sap/ui/codeeditor/js/ace/css/one_dark-2.png +0 -0
  66. package/src/sap/ui/codeeditor/js/ace/css/pastel_on_dark-2.png +0 -0
  67. package/src/sap/ui/codeeditor/js/ace/css/solarized_dark-2.png +0 -0
  68. package/src/sap/ui/codeeditor/js/ace/css/solarized_light-2.png +0 -0
  69. package/src/sap/ui/codeeditor/js/ace/css/sqlserver-2.png +0 -0
  70. package/src/sap/ui/codeeditor/js/ace/css/terminal-2.png +0 -0
  71. package/src/sap/ui/codeeditor/js/ace/css/textmate-2.png +0 -0
  72. package/src/sap/ui/codeeditor/js/ace/css/theme/ambiance.css +120 -68
  73. package/src/sap/ui/codeeditor/js/ace/css/theme/chaos.css +79 -66
  74. package/src/sap/ui/codeeditor/js/ace/css/theme/chrome.css +82 -43
  75. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_day.css +160 -0
  76. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night.css +146 -0
  77. package/src/sap/ui/codeeditor/js/ace/css/theme/cloud9_night_low_color.css +134 -0
  78. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds.css +59 -31
  79. package/src/sap/ui/codeeditor/js/ace/css/theme/clouds_midnight.css +60 -32
  80. package/src/sap/ui/codeeditor/js/ace/css/theme/cobalt.css +71 -38
  81. package/src/sap/ui/codeeditor/js/ace/css/theme/crimson_editor.css +79 -42
  82. package/src/sap/ui/codeeditor/js/ace/css/theme/dawn.css +70 -40
  83. package/src/sap/ui/codeeditor/js/ace/css/theme/dracula.css +95 -49
  84. package/src/sap/ui/codeeditor/js/ace/css/theme/dreamweaver.css +95 -49
  85. package/src/sap/ui/codeeditor/js/ace/css/theme/eclipse.css +62 -33
  86. package/src/sap/ui/codeeditor/js/ace/css/theme/github.css +71 -38
  87. package/src/sap/ui/codeeditor/js/ace/css/theme/github_dark.css +134 -0
  88. package/src/sap/ui/codeeditor/js/ace/css/theme/gob.css +68 -38
  89. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox.css +54 -28
  90. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_dark_hard.css +163 -0
  91. package/src/sap/ui/codeeditor/js/ace/css/theme/gruvbox_light_hard.css +167 -0
  92. package/src/sap/ui/codeeditor/js/ace/css/theme/idle_fingers.css +62 -34
  93. package/src/sap/ui/codeeditor/js/ace/css/theme/iplastic.css +76 -45
  94. package/src/sap/ui/codeeditor/js/ace/css/theme/katzenmilch.css +91 -53
  95. package/src/sap/ui/codeeditor/js/ace/css/theme/kr_theme.css +67 -36
  96. package/src/sap/ui/codeeditor/js/ace/css/theme/kuroir.css +43 -17
  97. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore.css +57 -31
  98. package/src/sap/ui/codeeditor/js/ace/css/theme/merbivore_soft.css +57 -31
  99. package/src/sap/ui/codeeditor/js/ace/css/theme/mono_industrial.css +66 -36
  100. package/src/sap/ui/codeeditor/js/ace/css/theme/monokai.css +63 -35
  101. package/src/sap/ui/codeeditor/js/ace/css/theme/nord_dark.css +55 -29
  102. package/src/sap/ui/codeeditor/js/ace/css/theme/one_dark.css +88 -47
  103. package/src/sap/ui/codeeditor/js/ace/css/theme/pastel_on_dark.css +70 -38
  104. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_dark.css +52 -28
  105. package/src/sap/ui/codeeditor/js/ace/css/theme/solarized_light.css +55 -29
  106. package/src/sap/ui/codeeditor/js/ace/css/theme/sqlserver.css +90 -48
  107. package/src/sap/ui/codeeditor/js/ace/css/theme/terminal.css +64 -34
  108. package/src/sap/ui/codeeditor/js/ace/css/theme/textmate.css +82 -43
  109. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow.css +61 -33
  110. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night.css +61 -33
  111. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_blue.css +59 -32
  112. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_bright.css +71 -40
  113. package/src/sap/ui/codeeditor/js/ace/css/theme/tomorrow_night_eighties.css +61 -33
  114. package/src/sap/ui/codeeditor/js/ace/css/theme/twilight.css +66 -36
  115. package/src/sap/ui/codeeditor/js/ace/css/theme/vibrant_ink.css +59 -32
  116. package/src/sap/ui/codeeditor/js/ace/css/theme/xcode.css +54 -28
  117. package/src/sap/ui/codeeditor/js/ace/css/tomorrow-2.png +0 -0
  118. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night-2.png +0 -0
  119. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_blue-2.png +0 -0
  120. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_bright-2.png +0 -0
  121. package/src/sap/ui/codeeditor/js/ace/css/tomorrow_night_eighties-2.png +0 -0
  122. package/src/sap/ui/codeeditor/js/ace/css/twilight-2.png +0 -0
  123. package/src/sap/ui/codeeditor/js/ace/css/vibrant_ink-2.png +0 -0
  124. package/src/sap/ui/codeeditor/js/ace/css/xcode-2.png +0 -0
  125. package/src/sap/ui/codeeditor/js/ace/ext-beautify.js +90 -91
  126. package/src/sap/ui/codeeditor/js/ace/ext-code_lens.js +39 -75
  127. package/src/sap/ui/codeeditor/js/ace/ext-command_bar.js +457 -0
  128. package/src/sap/ui/codeeditor/js/ace/ext-elastic_tabstops_lite.js +47 -97
  129. package/src/sap/ui/codeeditor/js/ace/ext-emmet.js +496 -552
  130. package/src/sap/ui/codeeditor/js/ace/ext-hardwrap.js +47 -16
  131. package/src/sap/ui/codeeditor/js/ace/ext-inline_autocomplete.js +3269 -0
  132. package/src/sap/ui/codeeditor/js/ace/ext-keybinding_menu.js +45 -105
  133. package/src/sap/ui/codeeditor/js/ace/ext-language_tools.js +1438 -1128
  134. package/src/sap/ui/codeeditor/js/ace/ext-linking.js +8 -16
  135. package/src/sap/ui/codeeditor/js/ace/ext-modelist.js +198 -185
  136. package/src/sap/ui/codeeditor/js/ace/ext-options.js +405 -443
  137. package/src/sap/ui/codeeditor/js/ace/ext-prompt.js +1682 -1508
  138. package/src/sap/ui/codeeditor/js/ace/ext-rtl.js +26 -28
  139. package/src/sap/ui/codeeditor/js/ace/ext-searchbox.js +160 -332
  140. package/src/sap/ui/codeeditor/js/ace/ext-settings_menu.js +409 -446
  141. package/src/sap/ui/codeeditor/js/ace/ext-simple_tokenizer.js +45 -0
  142. package/src/sap/ui/codeeditor/js/ace/ext-spellcheck.js +4 -10
  143. package/src/sap/ui/codeeditor/js/ace/ext-split.js +41 -63
  144. package/src/sap/ui/codeeditor/js/ace/ext-statusbar.js +19 -27
  145. package/src/sap/ui/codeeditor/js/ace/ext-themelist.js +45 -41
  146. package/src/sap/ui/codeeditor/js/ace/ext-whitespace.js +62 -83
  147. package/src/sap/ui/codeeditor/js/ace/keybinding-emacs.js +442 -551
  148. package/src/sap/ui/codeeditor/js/ace/keybinding-sublime.js +338 -351
  149. package/src/sap/ui/codeeditor/js/ace/keybinding-vim.js +5242 -4758
  150. package/src/sap/ui/codeeditor/js/ace/keybinding-vscode.js +228 -235
  151. package/src/sap/ui/codeeditor/js/ace/mode-abap.js +72 -93
  152. package/src/sap/ui/codeeditor/js/ace/mode-abc.js +136 -164
  153. package/src/sap/ui/codeeditor/js/ace/mode-actionscript.js +109 -150
  154. package/src/sap/ui/codeeditor/js/ace/mode-ada.js +45 -74
  155. package/src/sap/ui/codeeditor/js/ace/mode-alda.js +77 -109
  156. package/src/sap/ui/codeeditor/js/ace/mode-apache_conf.js +196 -241
  157. package/src/sap/ui/codeeditor/js/ace/mode-apex.js +192 -247
  158. package/src/sap/ui/codeeditor/js/ace/mode-applescript.js +56 -102
  159. package/src/sap/ui/codeeditor/js/ace/mode-aql.js +85 -95
  160. package/src/sap/ui/codeeditor/js/ace/mode-asciidoc.js +120 -158
  161. package/src/sap/ui/codeeditor/js/ace/mode-asl.js +233 -298
  162. package/src/sap/ui/codeeditor/js/ace/mode-assembly_x86.js +78 -101
  163. package/src/sap/ui/codeeditor/js/ace/mode-astro.js +2414 -0
  164. package/src/sap/ui/codeeditor/js/ace/mode-autohotkey.js +80 -116
  165. package/src/sap/ui/codeeditor/js/ace/mode-batchfile.js +74 -105
  166. package/src/sap/ui/codeeditor/js/ace/mode-bibtex.js +318 -0
  167. package/src/sap/ui/codeeditor/js/ace/mode-c9search.js +72 -115
  168. package/src/sap/ui/codeeditor/js/ace/mode-c_cpp.js +171 -257
  169. package/src/sap/ui/codeeditor/js/ace/mode-cirru.js +97 -115
  170. package/src/sap/ui/codeeditor/js/ace/mode-clojure.js +126 -119
  171. package/src/sap/ui/codeeditor/js/ace/mode-cobol.js +48 -67
  172. package/src/sap/ui/codeeditor/js/ace/mode-coffee.js +203 -268
  173. package/src/sap/ui/codeeditor/js/ace/mode-coldfusion.js +1029 -1276
  174. package/src/sap/ui/codeeditor/js/ace/mode-crystal.js +337 -393
  175. package/src/sap/ui/codeeditor/js/ace/mode-csharp.js +127 -216
  176. package/src/sap/ui/codeeditor/js/ace/mode-csound_document.js +1539 -1569
  177. package/src/sap/ui/codeeditor/js/ace/mode-csound_orchestra.js +786 -898
  178. package/src/sap/ui/codeeditor/js/ace/mode-csound_score.js +184 -237
  179. package/src/sap/ui/codeeditor/js/ace/mode-csp.js +37 -37
  180. package/src/sap/ui/codeeditor/js/ace/mode-css.js +293 -384
  181. package/src/sap/ui/codeeditor/js/ace/mode-curly.js +1019 -1262
  182. package/src/sap/ui/codeeditor/js/ace/mode-cuttlefish.js +56 -0
  183. package/src/sap/ui/codeeditor/js/ace/mode-d.js +163 -233
  184. package/src/sap/ui/codeeditor/js/ace/mode-dart.js +330 -427
  185. package/src/sap/ui/codeeditor/js/ace/mode-diff.js +20 -38
  186. package/src/sap/ui/codeeditor/js/ace/mode-django.js +1032 -1271
  187. package/src/sap/ui/codeeditor/js/ace/mode-dockerfile.js +211 -284
  188. package/src/sap/ui/codeeditor/js/ace/mode-dot.js +131 -200
  189. package/src/sap/ui/codeeditor/js/ace/mode-drools.js +408 -349
  190. package/src/sap/ui/codeeditor/js/ace/mode-edifact.js +89 -125
  191. package/src/sap/ui/codeeditor/js/ace/mode-eiffel.js +47 -62
  192. package/src/sap/ui/codeeditor/js/ace/mode-ejs.js +1350 -1666
  193. package/src/sap/ui/codeeditor/js/ace/mode-elixir.js +349 -407
  194. package/src/sap/ui/codeeditor/js/ace/mode-elm.js +136 -168
  195. package/src/sap/ui/codeeditor/js/ace/mode-erlang.js +707 -881
  196. package/src/sap/ui/codeeditor/js/ace/mode-flix.js +164 -0
  197. package/src/sap/ui/codeeditor/js/ace/mode-forth.js +128 -172
  198. package/src/sap/ui/codeeditor/js/ace/mode-fortran.js +177 -246
  199. package/src/sap/ui/codeeditor/js/ace/mode-fsharp.js +92 -131
  200. package/src/sap/ui/codeeditor/js/ace/mode-fsl.js +91 -124
  201. package/src/sap/ui/codeeditor/js/ace/mode-ftl.js +813 -748
  202. package/src/sap/ui/codeeditor/js/ace/mode-gcode.js +52 -71
  203. package/src/sap/ui/codeeditor/js/ace/mode-gherkin.js +105 -119
  204. package/src/sap/ui/codeeditor/js/ace/mode-gitignore.js +12 -22
  205. package/src/sap/ui/codeeditor/js/ace/mode-glsl.js +184 -289
  206. package/src/sap/ui/codeeditor/js/ace/mode-gobstones.js +686 -623
  207. package/src/sap/ui/codeeditor/js/ace/mode-golang.js +167 -239
  208. package/src/sap/ui/codeeditor/js/ace/mode-graphqlschema.js +48 -88
  209. package/src/sap/ui/codeeditor/js/ace/mode-groovy.js +577 -471
  210. package/src/sap/ui/codeeditor/js/ace/mode-haml.js +1062 -1026
  211. package/src/sap/ui/codeeditor/js/ace/mode-handlebars.js +1061 -1305
  212. package/src/sap/ui/codeeditor/js/ace/mode-haskell.js +199 -255
  213. package/src/sap/ui/codeeditor/js/ace/mode-haskell_cabal.js +81 -87
  214. package/src/sap/ui/codeeditor/js/ace/mode-haxe.js +111 -184
  215. package/src/sap/ui/codeeditor/js/ace/mode-hjson.js +164 -199
  216. package/src/sap/ui/codeeditor/js/ace/mode-html.js +1009 -1239
  217. package/src/sap/ui/codeeditor/js/ace/mode-html_elixir.js +1402 -1705
  218. package/src/sap/ui/codeeditor/js/ace/mode-html_ruby.js +1390 -1706
  219. package/src/sap/ui/codeeditor/js/ace/mode-ini.js +58 -82
  220. package/src/sap/ui/codeeditor/js/ace/mode-io.js +85 -123
  221. package/src/sap/ui/codeeditor/js/ace/mode-ion.js +477 -0
  222. package/src/sap/ui/codeeditor/js/ace/mode-jack.js +109 -162
  223. package/src/sap/ui/codeeditor/js/ace/mode-jade.js +1339 -1344
  224. package/src/sap/ui/codeeditor/js/ace/mode-java.js +710 -498
  225. package/src/sap/ui/codeeditor/js/ace/mode-javascript.js +441 -354
  226. package/src/sap/ui/codeeditor/js/ace/mode-jexl.js +270 -0
  227. package/src/sap/ui/codeeditor/js/ace/mode-json.js +93 -147
  228. package/src/sap/ui/codeeditor/js/ace/mode-json5.js +128 -180
  229. package/src/sap/ui/codeeditor/js/ace/mode-jsoniq.js +58 -112
  230. package/src/sap/ui/codeeditor/js/ace/mode-jsp.js +1045 -865
  231. package/src/sap/ui/codeeditor/js/ace/mode-jssm.js +158 -190
  232. package/src/sap/ui/codeeditor/js/ace/mode-jsx.js +121 -194
  233. package/src/sap/ui/codeeditor/js/ace/mode-julia.js +128 -177
  234. package/src/sap/ui/codeeditor/js/ace/mode-kotlin.js +262 -614
  235. package/src/sap/ui/codeeditor/js/ace/mode-latex.js +94 -138
  236. package/src/sap/ui/codeeditor/js/ace/mode-latte.js +1120 -1366
  237. package/src/sap/ui/codeeditor/js/ace/mode-less.js +342 -442
  238. package/src/sap/ui/codeeditor/js/ace/mode-liquid.js +1353 -1414
  239. package/src/sap/ui/codeeditor/js/ace/mode-lisp.js +65 -73
  240. package/src/sap/ui/codeeditor/js/ace/mode-livescript.js +217 -224
  241. package/src/sap/ui/codeeditor/js/ace/mode-logiql.js +97 -142
  242. package/src/sap/ui/codeeditor/js/ace/mode-logtalk.js +187 -227
  243. package/src/sap/ui/codeeditor/js/ace/mode-lsl.js +99 -155
  244. package/src/sap/ui/codeeditor/js/ace/mode-lua.js +152 -211
  245. package/src/sap/ui/codeeditor/js/ace/mode-luapage.js +1167 -1470
  246. package/src/sap/ui/codeeditor/js/ace/mode-lucene.js +25 -34
  247. package/src/sap/ui/codeeditor/js/ace/mode-makefile.js +244 -282
  248. package/src/sap/ui/codeeditor/js/ace/mode-markdown.js +1858 -2177
  249. package/src/sap/ui/codeeditor/js/ace/mode-mask.js +964 -1007
  250. package/src/sap/ui/codeeditor/js/ace/mode-matlab.js +197 -221
  251. package/src/sap/ui/codeeditor/js/ace/mode-maze.js +127 -163
  252. package/src/sap/ui/codeeditor/js/ace/mode-mediawiki.js +464 -476
  253. package/src/sap/ui/codeeditor/js/ace/mode-mel.js +90 -140
  254. package/src/sap/ui/codeeditor/js/ace/mode-mips.js +101 -134
  255. package/src/sap/ui/codeeditor/js/ace/mode-mixal.js +63 -75
  256. package/src/sap/ui/codeeditor/js/ace/mode-mushcode.js +537 -576
  257. package/src/sap/ui/codeeditor/js/ace/mode-mysql.js +85 -102
  258. package/src/sap/ui/codeeditor/js/ace/mode-nasal.js +513 -0
  259. package/src/sap/ui/codeeditor/js/ace/mode-nginx.js +119 -155
  260. package/src/sap/ui/codeeditor/js/ace/mode-nim.js +159 -197
  261. package/src/sap/ui/codeeditor/js/ace/mode-nix.js +283 -375
  262. package/src/sap/ui/codeeditor/js/ace/mode-nsis.js +139 -172
  263. package/src/sap/ui/codeeditor/js/ace/mode-nunjucks.js +1138 -1378
  264. package/src/sap/ui/codeeditor/js/ace/mode-objectivec.js +400 -514
  265. package/src/sap/ui/codeeditor/js/ace/mode-ocaml.js +77 -120
  266. package/src/sap/ui/codeeditor/js/ace/mode-odin.js +449 -0
  267. package/src/sap/ui/codeeditor/js/ace/mode-partiql.js +750 -0
  268. package/src/sap/ui/codeeditor/js/ace/mode-pascal.js +28 -47
  269. package/src/sap/ui/codeeditor/js/ace/mode-perl.js +122 -185
  270. package/src/sap/ui/codeeditor/js/ace/mode-pgsql.js +974 -851
  271. package/src/sap/ui/codeeditor/js/ace/mode-php.js +2282 -1502
  272. package/src/sap/ui/codeeditor/js/ace/mode-php_laravel_blade.js +2463 -1696
  273. package/src/sap/ui/codeeditor/js/ace/mode-pig.js +133 -165
  274. package/src/sap/ui/codeeditor/js/ace/mode-plain_text.js +5 -10
  275. package/src/sap/ui/codeeditor/js/ace/mode-plsql.js +268 -0
  276. package/src/sap/ui/codeeditor/js/ace/mode-powershell.js +332 -183
  277. package/src/sap/ui/codeeditor/js/ace/mode-praat.js +168 -234
  278. package/src/sap/ui/codeeditor/js/ace/mode-prisma.js +292 -324
  279. package/src/sap/ui/codeeditor/js/ace/mode-prolog.js +180 -246
  280. package/src/sap/ui/codeeditor/js/ace/mode-properties.js +26 -37
  281. package/src/sap/ui/codeeditor/js/ace/mode-protobuf.js +232 -327
  282. package/src/sap/ui/codeeditor/js/ace/mode-prql.js +320 -0
  283. package/src/sap/ui/codeeditor/js/ace/mode-puppet.js +68 -120
  284. package/src/sap/ui/codeeditor/js/ace/mode-python.js +338 -370
  285. package/src/sap/ui/codeeditor/js/ace/mode-qml.js +244 -279
  286. package/src/sap/ui/codeeditor/js/ace/mode-r.js +295 -220
  287. package/src/sap/ui/codeeditor/js/ace/mode-raku.js +356 -433
  288. package/src/sap/ui/codeeditor/js/ace/mode-razor.js +1130 -1374
  289. package/src/sap/ui/codeeditor/js/ace/mode-rdoc.js +214 -171
  290. package/src/sap/ui/codeeditor/js/ace/mode-red.js +212 -274
  291. package/src/sap/ui/codeeditor/js/ace/mode-redshift.js +181 -220
  292. package/src/sap/ui/codeeditor/js/ace/mode-rhtml.js +1325 -1443
  293. package/src/sap/ui/codeeditor/js/ace/mode-robot.js +168 -0
  294. package/src/sap/ui/codeeditor/js/ace/mode-rst.js +217 -229
  295. package/src/sap/ui/codeeditor/js/ace/mode-ruby.js +338 -420
  296. package/src/sap/ui/codeeditor/js/ace/mode-rust.js +258 -155
  297. package/src/sap/ui/codeeditor/js/ace/mode-sac.js +349 -0
  298. package/src/sap/ui/codeeditor/js/ace/mode-sass.js +257 -309
  299. package/src/sap/ui/codeeditor/js/ace/mode-scad.js +127 -191
  300. package/src/sap/ui/codeeditor/js/ace/mode-scala.js +572 -468
  301. package/src/sap/ui/codeeditor/js/ace/mode-scheme.js +104 -126
  302. package/src/sap/ui/codeeditor/js/ace/mode-scrypt.js +181 -228
  303. package/src/sap/ui/codeeditor/js/ace/mode-scss.js +364 -472
  304. package/src/sap/ui/codeeditor/js/ace/mode-sh.js +204 -266
  305. package/src/sap/ui/codeeditor/js/ace/mode-sjs.js +477 -405
  306. package/src/sap/ui/codeeditor/js/ace/mode-slim.js +2631 -3161
  307. package/src/sap/ui/codeeditor/js/ace/mode-smarty.js +1075 -1334
  308. package/src/sap/ui/codeeditor/js/ace/mode-smithy.js +276 -327
  309. package/src/sap/ui/codeeditor/js/ace/mode-snippets.js +78 -102
  310. package/src/sap/ui/codeeditor/js/ace/mode-soy_template.js +1251 -1548
  311. package/src/sap/ui/codeeditor/js/ace/mode-space.js +47 -63
  312. package/src/sap/ui/codeeditor/js/ace/mode-sparql.js +139 -171
  313. package/src/sap/ui/codeeditor/js/ace/mode-sql.js +77 -133
  314. package/src/sap/ui/codeeditor/js/ace/mode-sqlserver.js +138 -192
  315. package/src/sap/ui/codeeditor/js/ace/mode-stylus.js +306 -338
  316. package/src/sap/ui/codeeditor/js/ace/mode-svg.js +642 -794
  317. package/src/sap/ui/codeeditor/js/ace/mode-swift.js +96 -150
  318. package/src/sap/ui/codeeditor/js/ace/mode-tcl.js +151 -200
  319. package/src/sap/ui/codeeditor/js/ace/mode-terraform.js +78 -132
  320. package/src/sap/ui/codeeditor/js/ace/mode-tex.js +148 -96
  321. package/src/sap/ui/codeeditor/js/ace/mode-textile.js +45 -70
  322. package/src/sap/ui/codeeditor/js/ace/mode-toml.js +63 -87
  323. package/src/sap/ui/codeeditor/js/ace/mode-tsx.js +462 -384
  324. package/src/sap/ui/codeeditor/js/ace/mode-turtle.js +119 -151
  325. package/src/sap/ui/codeeditor/js/ace/mode-twig.js +1099 -1350
  326. package/src/sap/ui/codeeditor/js/ace/mode-typescript.js +455 -376
  327. package/src/sap/ui/codeeditor/js/ace/mode-vala.js +382 -505
  328. package/src/sap/ui/codeeditor/js/ace/mode-vbscript.js +231 -264
  329. package/src/sap/ui/codeeditor/js/ace/mode-velocity.js +1116 -1388
  330. package/src/sap/ui/codeeditor/js/ace/mode-verilog.js +61 -81
  331. package/src/sap/ui/codeeditor/js/ace/mode-vhdl.js +57 -79
  332. package/src/sap/ui/codeeditor/js/ace/mode-visualforce.js +1046 -1292
  333. package/src/sap/ui/codeeditor/js/ace/mode-wollok.js +525 -417
  334. package/src/sap/ui/codeeditor/js/ace/mode-xml.js +182 -389
  335. package/src/sap/ui/codeeditor/js/ace/mode-xquery.js +58 -112
  336. package/src/sap/ui/codeeditor/js/ace/mode-yaml.js +202 -137
  337. package/src/sap/ui/codeeditor/js/ace/mode-zeek.js +237 -274
  338. package/src/sap/ui/codeeditor/js/ace/snippets/abc.js +5 -34
  339. package/src/sap/ui/codeeditor/js/ace/snippets/actionscript.js +5 -160
  340. package/src/sap/ui/codeeditor/js/ace/snippets/astro.js +9 -0
  341. package/src/sap/ui/codeeditor/js/ace/snippets/bibtex.js +9 -0
  342. package/src/sap/ui/codeeditor/js/ace/snippets/c_cpp.js +5 -134
  343. package/src/sap/ui/codeeditor/js/ace/snippets/clojure.js +5 -93
  344. package/src/sap/ui/codeeditor/js/ace/snippets/coffee.js +5 -98
  345. package/src/sap/ui/codeeditor/js/ace/snippets/csound_document.js +5 -13
  346. package/src/sap/ui/codeeditor/js/ace/snippets/csound_orchestra.js +5 -50
  347. package/src/sap/ui/codeeditor/js/ace/snippets/css.js +5 -970
  348. package/src/sap/ui/codeeditor/js/ace/snippets/cuttlefish.js +9 -0
  349. package/src/sap/ui/codeeditor/js/ace/snippets/dart.js +5 -86
  350. package/src/sap/ui/codeeditor/js/ace/snippets/diff.js +5 -14
  351. package/src/sap/ui/codeeditor/js/ace/snippets/django.js +5 -111
  352. package/src/sap/ui/codeeditor/js/ace/snippets/drools.js +5 -22
  353. package/src/sap/ui/codeeditor/js/ace/snippets/edifact.js +8 -246
  354. package/src/sap/ui/codeeditor/js/ace/snippets/erlang.js +5 -163
  355. package/src/sap/ui/codeeditor/js/ace/snippets/flix.js +9 -0
  356. package/src/sap/ui/codeeditor/js/ace/snippets/fsl.js +6 -4
  357. package/src/sap/ui/codeeditor/js/ace/snippets/gobstones.js +5 -1707
  358. package/src/sap/ui/codeeditor/js/ace/snippets/graphqlschema.js +5 -35
  359. package/src/sap/ui/codeeditor/js/ace/snippets/haml.js +5 -23
  360. package/src/sap/ui/codeeditor/js/ace/snippets/haskell.js +5 -85
  361. package/src/sap/ui/codeeditor/js/ace/snippets/html.js +5 -856
  362. package/src/sap/ui/codeeditor/js/ace/snippets/io.js +1 -3
  363. package/src/sap/ui/codeeditor/js/ace/snippets/ion.js +9 -0
  364. package/src/sap/ui/codeeditor/js/ace/snippets/java.js +5 -243
  365. package/src/sap/ui/codeeditor/js/ace/snippets/javascript.js +5 -198
  366. package/src/sap/ui/codeeditor/js/ace/snippets/jexl.js +9 -0
  367. package/src/sap/ui/codeeditor/js/ace/snippets/jsoniq.js +44 -41
  368. package/src/sap/ui/codeeditor/js/ace/snippets/jsp.js +5 -102
  369. package/src/sap/ui/codeeditor/js/ace/snippets/liquid.js +5 -884
  370. package/src/sap/ui/codeeditor/js/ace/snippets/lsl.js +5 -1235
  371. package/src/sap/ui/codeeditor/js/ace/snippets/lua.js +5 -24
  372. package/src/sap/ui/codeeditor/js/ace/snippets/makefile.js +5 -7
  373. package/src/sap/ui/codeeditor/js/ace/snippets/markdown.js +5 -91
  374. package/src/sap/ui/codeeditor/js/ace/snippets/maze.js +5 -12
  375. package/src/sap/ui/codeeditor/js/ace/snippets/nasal.js +9 -0
  376. package/src/sap/ui/codeeditor/js/ace/snippets/odin.js +9 -0
  377. package/src/sap/ui/codeeditor/js/ace/snippets/partiql.js +9 -0
  378. package/src/sap/ui/codeeditor/js/ace/snippets/perl.js +5 -350
  379. package/src/sap/ui/codeeditor/js/ace/snippets/php.js +5 -386
  380. package/src/sap/ui/codeeditor/js/ace/snippets/plsql.js +9 -0
  381. package/src/sap/ui/codeeditor/js/ace/snippets/prql.js +9 -0
  382. package/src/sap/ui/codeeditor/js/ace/snippets/python.js +5 -161
  383. package/src/sap/ui/codeeditor/js/ace/snippets/r.js +5 -124
  384. package/src/sap/ui/codeeditor/js/ace/snippets/razor.js +5 -6
  385. package/src/sap/ui/codeeditor/js/ace/snippets/robot.js +16 -0
  386. package/src/sap/ui/codeeditor/js/ace/snippets/rst.js +5 -25
  387. package/src/sap/ui/codeeditor/js/ace/snippets/ruby.js +5 -931
  388. package/src/sap/ui/codeeditor/js/ace/snippets/sac.js +9 -0
  389. package/src/sap/ui/codeeditor/js/ace/snippets/sh.js +5 -86
  390. package/src/sap/ui/codeeditor/js/ace/snippets/snippets.js +5 -12
  391. package/src/sap/ui/codeeditor/js/ace/snippets/sql.js +5 -29
  392. package/src/sap/ui/codeeditor/js/ace/snippets/sqlserver.js +5 -72
  393. package/src/sap/ui/codeeditor/js/ace/snippets/tcl.js +5 -95
  394. package/src/sap/ui/codeeditor/js/ace/snippets/tex.js +5 -193
  395. package/src/sap/ui/codeeditor/js/ace/snippets/textile.js +5 -33
  396. package/src/sap/ui/codeeditor/js/ace/snippets/vala.js +1 -2
  397. package/src/sap/ui/codeeditor/js/ace/snippets/velocity.js +5 -31
  398. package/src/sap/ui/codeeditor/js/ace/snippets/wollok.js +5 -87
  399. package/src/sap/ui/codeeditor/js/ace/snippets/xquery.js +44 -41
  400. package/src/sap/ui/codeeditor/js/ace/theme-ambiance.js +5 -172
  401. package/src/sap/ui/codeeditor/js/ace/theme-chaos.js +5 -150
  402. package/src/sap/ui/codeeditor/js/ace/theme-chrome.js +6 -123
  403. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_day.js +19 -0
  404. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night.js +18 -0
  405. package/src/sap/ui/codeeditor/js/ace/theme-cloud9_night_low_color.js +18 -0
  406. package/src/sap/ui/codeeditor/js/ace/theme-clouds.js +6 -90
  407. package/src/sap/ui/codeeditor/js/ace/theme-clouds_midnight.js +6 -91
  408. package/src/sap/ui/codeeditor/js/ace/theme-cobalt.js +6 -108
  409. package/src/sap/ui/codeeditor/js/ace/theme-crimson_editor.js +6 -113
  410. package/src/sap/ui/codeeditor/js/ace/theme-dawn.js +6 -103
  411. package/src/sap/ui/codeeditor/js/ace/theme-dracula.js +6 -122
  412. package/src/sap/ui/codeeditor/js/ace/theme-dreamweaver.js +7 -137
  413. package/src/sap/ui/codeeditor/js/ace/theme-eclipse.js +6 -92
  414. package/src/sap/ui/codeeditor/js/ace/theme-github.js +7 -99
  415. package/src/sap/ui/codeeditor/js/ace/theme-github_dark.js +18 -0
  416. package/src/sap/ui/codeeditor/js/ace/theme-gob.js +6 -107
  417. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox.js +5 -76
  418. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_dark_hard.js +18 -0
  419. package/src/sap/ui/codeeditor/js/ace/theme-gruvbox_light_hard.js +18 -0
  420. package/src/sap/ui/codeeditor/js/ace/theme-idle_fingers.js +6 -91
  421. package/src/sap/ui/codeeditor/js/ace/theme-iplastic.js +6 -116
  422. package/src/sap/ui/codeeditor/js/ace/theme-katzenmilch.js +6 -116
  423. package/src/sap/ui/codeeditor/js/ace/theme-kr_theme.js +6 -99
  424. package/src/sap/ui/codeeditor/js/ace/theme-kuroir.js +6 -56
  425. package/src/sap/ui/codeeditor/js/ace/theme-merbivore.js +6 -90
  426. package/src/sap/ui/codeeditor/js/ace/theme-merbivore_soft.js +6 -91
  427. package/src/sap/ui/codeeditor/js/ace/theme-mono_industrial.js +6 -102
  428. package/src/sap/ui/codeeditor/js/ace/theme-monokai.js +6 -100
  429. package/src/sap/ui/codeeditor/js/ace/theme-nord_dark.js +6 -89
  430. package/src/sap/ui/codeeditor/js/ace/theme-one_dark.js +10 -131
  431. package/src/sap/ui/codeeditor/js/ace/theme-pastel_on_dark.js +6 -103
  432. package/src/sap/ui/codeeditor/js/ace/theme-solarized_dark.js +6 -83
  433. package/src/sap/ui/codeeditor/js/ace/theme-solarized_light.js +6 -86
  434. package/src/sap/ui/codeeditor/js/ace/theme-sqlserver.js +6 -133
  435. package/src/sap/ui/codeeditor/js/ace/theme-terminal.js +6 -109
  436. package/src/sap/ui/codeeditor/js/ace/theme-textmate.js +3 -124
  437. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow.js +6 -103
  438. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night.js +6 -103
  439. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_blue.js +6 -101
  440. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_bright.js +6 -116
  441. package/src/sap/ui/codeeditor/js/ace/theme-tomorrow_night_eighties.js +6 -103
  442. package/src/sap/ui/codeeditor/js/ace/theme-twilight.js +6 -104
  443. package/src/sap/ui/codeeditor/js/ace/theme-vibrant_ink.js +6 -89
  444. package/src/sap/ui/codeeditor/js/ace/theme-xcode.js +6 -83
  445. package/src/sap/ui/codeeditor/js/ace/worker-base.js +516 -595
  446. package/src/sap/ui/codeeditor/js/ace/worker-coffee.js +496 -575
  447. package/src/sap/ui/codeeditor/js/ace/worker-css.js +501 -578
  448. package/src/sap/ui/codeeditor/js/ace/worker-html.js +515 -584
  449. package/src/sap/ui/codeeditor/js/ace/worker-javascript.js +2964 -2551
  450. package/src/sap/ui/codeeditor/js/ace/worker-json.js +496 -575
  451. package/src/sap/ui/codeeditor/js/ace/worker-lua.js +497 -576
  452. package/src/sap/ui/codeeditor/js/ace/worker-php.js +2906 -2795
  453. package/src/sap/ui/codeeditor/js/ace/worker-xml.js +496 -575
  454. package/src/sap/ui/codeeditor/js/ace/worker-xquery.js +496 -575
  455. package/src/sap/ui/codeeditor/js/ace/worker-yaml.js +5851 -0
  456. package/src/sap/ui/codeeditor/library.js +6 -5
  457. package/LICENSES/BSD-2-Clause.txt +0 -22
@@ -0,0 +1,2414 @@
1
+ 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";
2
+ var oop = require("../lib/oop");
3
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
4
+ var JsDocCommentHighlightRules = function () {
5
+ this.$rules = {
6
+ "start": [
7
+ {
8
+ token: ["comment.doc.tag", "comment.doc.text", "lparen.doc"],
9
+ regex: "(@(?:param|member|typedef|property|namespace|var|const|callback))(\\s*)({)",
10
+ push: [
11
+ {
12
+ token: "lparen.doc",
13
+ regex: "{",
14
+ push: [
15
+ {
16
+ include: "doc-syntax"
17
+ }, {
18
+ token: "rparen.doc",
19
+ regex: "}|(?=$)",
20
+ next: "pop"
21
+ }
22
+ ]
23
+ }, {
24
+ token: ["rparen.doc", "text.doc", "variable.parameter.doc", "lparen.doc", "variable.parameter.doc", "rparen.doc"],
25
+ regex: /(})(\s*)(?:([\w=:\/\.]+)|(?:(\[)([\w=:\/\.]+)(\])))/,
26
+ next: "pop"
27
+ }, {
28
+ token: "rparen.doc",
29
+ regex: "}|(?=$)",
30
+ next: "pop"
31
+ }, {
32
+ include: "doc-syntax"
33
+ }, {
34
+ defaultToken: "text.doc"
35
+ }
36
+ ]
37
+ }, {
38
+ token: ["comment.doc.tag", "text.doc", "lparen.doc"],
39
+ regex: "(@(?:returns?|yields|type|this|suppress|public|protected|private|package|modifies|"
40
+ + "implements|external|exception|throws|enum|define|extends))(\\s*)({)",
41
+ push: [
42
+ {
43
+ token: "lparen.doc",
44
+ regex: "{",
45
+ push: [
46
+ {
47
+ include: "doc-syntax"
48
+ }, {
49
+ token: "rparen.doc",
50
+ regex: "}|(?=$)",
51
+ next: "pop"
52
+ }
53
+ ]
54
+ }, {
55
+ token: "rparen.doc",
56
+ regex: "}|(?=$)",
57
+ next: "pop"
58
+ }, {
59
+ include: "doc-syntax"
60
+ }, {
61
+ defaultToken: "text.doc"
62
+ }
63
+ ]
64
+ }, {
65
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
66
+ regex: "(@(?:alias|memberof|instance|module|name|lends|namespace|external|this|template|"
67
+ + "requires|param|implements|function|extends|typedef|mixes|constructor|var|"
68
+ + "memberof\\!|event|listens|exports|class|constructs|interface|emits|fires|"
69
+ + "throws|const|callback|borrows|augments))(\\s+)(\\w[\\w#\.:\/~\"\\-]*)?"
70
+ }, {
71
+ token: ["comment.doc.tag", "text.doc", "variable.parameter.doc"],
72
+ regex: "(@method)(\\s+)(\\w[\\w\.\\(\\)]*)"
73
+ }, {
74
+ token: "comment.doc.tag",
75
+ regex: "@access\\s+(?:private|public|protected)"
76
+ }, {
77
+ token: "comment.doc.tag",
78
+ regex: "@kind\\s+(?:class|constant|event|external|file|function|member|mixin|module|namespace|typedef)"
79
+ }, {
80
+ token: "comment.doc.tag",
81
+ regex: "@\\w+(?=\\s|$)"
82
+ },
83
+ JsDocCommentHighlightRules.getTagRule(),
84
+ {
85
+ defaultToken: "comment.doc",
86
+ caseInsensitive: true
87
+ }
88
+ ],
89
+ "doc-syntax": [{
90
+ token: "operator.doc",
91
+ regex: /[|:]/
92
+ }, {
93
+ token: "paren.doc",
94
+ regex: /[\[\]]/
95
+ }]
96
+ };
97
+ this.normalizeRules();
98
+ };
99
+ oop.inherits(JsDocCommentHighlightRules, TextHighlightRules);
100
+ JsDocCommentHighlightRules.getTagRule = function (start) {
101
+ return {
102
+ token: "comment.doc.tag.storage.type",
103
+ regex: "\\b(?:TODO|FIXME|XXX|HACK)\\b"
104
+ };
105
+ };
106
+ JsDocCommentHighlightRules.getStartRule = function (start) {
107
+ return {
108
+ token: "comment.doc",
109
+ regex: "\\/\\*(?=\\*)",
110
+ next: start
111
+ };
112
+ };
113
+ JsDocCommentHighlightRules.getEndRule = function (start) {
114
+ return {
115
+ token: "comment.doc",
116
+ regex: "\\*\\/",
117
+ next: start
118
+ };
119
+ };
120
+ exports.JsDocCommentHighlightRules = JsDocCommentHighlightRules;
121
+
122
+ });
123
+
124
+ 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";
125
+ var oop = require("../lib/oop");
126
+ var DocCommentHighlightRules = require("./jsdoc_comment_highlight_rules").JsDocCommentHighlightRules;
127
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
128
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
129
+ var JavaScriptHighlightRules = function (options) {
130
+ var keywordMapper = this.createKeywordMapper({
131
+ "variable.language": "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Symbol|" + // Constructors
132
+ "Namespace|QName|XML|XMLList|" + // E4X
133
+ "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
134
+ "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
135
+ "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
136
+ "SyntaxError|TypeError|URIError|" +
137
+ "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
138
+ "isNaN|parseFloat|parseInt|" +
139
+ "JSON|Math|" + // Other
140
+ "this|arguments|prototype|window|document",
141
+ "keyword": "const|yield|import|get|set|async|await|" +
142
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
143
+ "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
144
+ "__parent__|__count__|escape|unescape|with|__proto__|" +
145
+ "class|enum|extends|super|export|implements|private|public|interface|package|protected|static|constructor",
146
+ "storage.type": "const|let|var|function",
147
+ "constant.language": "null|Infinity|NaN|undefined",
148
+ "support.function": "alert",
149
+ "constant.language.boolean": "true|false"
150
+ }, "identifier");
151
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
152
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
153
+ "u[0-9a-fA-F]{4}|" + // unicode
154
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
155
+ "[0-2][0-7]{0,2}|" + // oct
156
+ "3[0-7][0-7]?|" + // oct
157
+ "[4-7][0-7]?|" + //oct
158
+ ".)";
159
+ this.$rules = {
160
+ "no_regex": [
161
+ DocCommentHighlightRules.getStartRule("doc-start"),
162
+ comments("no_regex"),
163
+ {
164
+ token: "string",
165
+ regex: "'(?=.)",
166
+ next: "qstring"
167
+ }, {
168
+ token: "string",
169
+ regex: '"(?=.)',
170
+ next: "qqstring"
171
+ }, {
172
+ token: "constant.numeric",
173
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
174
+ }, {
175
+ token: "constant.numeric",
176
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
177
+ }, {
178
+ token: [
179
+ "storage.type", "punctuation.operator", "support.function",
180
+ "punctuation.operator", "entity.name.function", "text", "keyword.operator"
181
+ ],
182
+ regex: "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe + ")(\\s*)(=)",
183
+ next: "function_arguments"
184
+ }, {
185
+ token: [
186
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
187
+ "keyword.operator", "text", "storage.type", "text", "paren.lparen"
188
+ ],
189
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
190
+ next: "function_arguments"
191
+ }, {
192
+ token: [
193
+ "entity.name.function", "text", "keyword.operator", "text", "storage.type",
194
+ "text", "paren.lparen"
195
+ ],
196
+ regex: "(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s*)(\\()",
197
+ next: "function_arguments"
198
+ }, {
199
+ token: [
200
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
201
+ "keyword.operator", "text",
202
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
203
+ ],
204
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(\\s+)(\\w+)(\\s*)(\\()",
205
+ next: "function_arguments"
206
+ }, {
207
+ token: [
208
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
209
+ ],
210
+ regex: "(function\\*?)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
211
+ next: "function_arguments"
212
+ }, {
213
+ token: [
214
+ "entity.name.function", "text", "punctuation.operator",
215
+ "text", "storage.type", "text", "paren.lparen"
216
+ ],
217
+ regex: "(" + identifierRe + ")(\\s*)(:)(\\s*)(function\\*?)(\\s*)(\\()",
218
+ next: "function_arguments"
219
+ }, {
220
+ token: [
221
+ "text", "text", "storage.type", "text", "paren.lparen"
222
+ ],
223
+ regex: "(:)(\\s*)(function\\*?)(\\s*)(\\()",
224
+ next: "function_arguments"
225
+ }, {
226
+ token: "keyword",
227
+ regex: "from(?=\\s*('|\"))"
228
+ }, {
229
+ token: "keyword",
230
+ regex: "(?:" + kwBeforeRe + ")\\b",
231
+ next: "start"
232
+ }, {
233
+ token: "support.constant",
234
+ regex: /that\b/
235
+ }, {
236
+ token: ["storage.type", "punctuation.operator", "support.function.firebug"],
237
+ regex: /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
238
+ }, {
239
+ token: keywordMapper,
240
+ regex: identifierRe
241
+ }, {
242
+ token: "punctuation.operator",
243
+ regex: /[.](?![.])/,
244
+ next: "property"
245
+ }, {
246
+ token: "storage.type",
247
+ regex: /=>/,
248
+ next: "start"
249
+ }, {
250
+ token: "keyword.operator",
251
+ regex: /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
252
+ next: "start"
253
+ }, {
254
+ token: "punctuation.operator",
255
+ regex: /[?:,;.]/,
256
+ next: "start"
257
+ }, {
258
+ token: "paren.lparen",
259
+ regex: /[\[({]/,
260
+ next: "start"
261
+ }, {
262
+ token: "paren.rparen",
263
+ regex: /[\])}]/
264
+ }, {
265
+ token: "comment",
266
+ regex: /^#!.*$/
267
+ }
268
+ ],
269
+ property: [{
270
+ token: "text",
271
+ regex: "\\s+"
272
+ }, {
273
+ token: [
274
+ "storage.type", "punctuation.operator", "entity.name.function", "text",
275
+ "keyword.operator", "text",
276
+ "storage.type", "text", "entity.name.function", "text", "paren.lparen"
277
+ ],
278
+ regex: "(" + identifierRe + ")(\\.)(" + identifierRe + ")(\\s*)(=)(\\s*)(function\\*?)(?:(\\s+)(\\w+))?(\\s*)(\\()",
279
+ next: "function_arguments"
280
+ }, {
281
+ token: "punctuation.operator",
282
+ regex: /[.](?![.])/
283
+ }, {
284
+ token: "support.function",
285
+ 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(?=\()/
286
+ }, {
287
+ token: "support.function.dom",
288
+ 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(?=\()/
289
+ }, {
290
+ token: "support.constant",
291
+ 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/
292
+ }, {
293
+ token: "identifier",
294
+ regex: identifierRe
295
+ }, {
296
+ regex: "",
297
+ token: "empty",
298
+ next: "no_regex"
299
+ }
300
+ ],
301
+ "start": [
302
+ DocCommentHighlightRules.getStartRule("doc-start"),
303
+ comments("start"),
304
+ {
305
+ token: "string.regexp",
306
+ regex: "\\/",
307
+ next: "regex"
308
+ }, {
309
+ token: "text",
310
+ regex: "\\s+|^$",
311
+ next: "start"
312
+ }, {
313
+ token: "empty",
314
+ regex: "",
315
+ next: "no_regex"
316
+ }
317
+ ],
318
+ "regex": [
319
+ {
320
+ token: "regexp.keyword.operator",
321
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
322
+ }, {
323
+ token: "string.regexp",
324
+ regex: "/[sxngimy]*",
325
+ next: "no_regex"
326
+ }, {
327
+ token: "invalid",
328
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
329
+ }, {
330
+ token: "constant.language.escape",
331
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
332
+ }, {
333
+ token: "constant.language.delimiter",
334
+ regex: /\|/
335
+ }, {
336
+ token: "constant.language.escape",
337
+ regex: /\[\^?/,
338
+ next: "regex_character_class"
339
+ }, {
340
+ token: "empty",
341
+ regex: "$",
342
+ next: "no_regex"
343
+ }, {
344
+ defaultToken: "string.regexp"
345
+ }
346
+ ],
347
+ "regex_character_class": [
348
+ {
349
+ token: "regexp.charclass.keyword.operator",
350
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
351
+ }, {
352
+ token: "constant.language.escape",
353
+ regex: "]",
354
+ next: "regex"
355
+ }, {
356
+ token: "constant.language.escape",
357
+ regex: "-"
358
+ }, {
359
+ token: "empty",
360
+ regex: "$",
361
+ next: "no_regex"
362
+ }, {
363
+ defaultToken: "string.regexp.charachterclass"
364
+ }
365
+ ],
366
+ "default_parameter": [
367
+ {
368
+ token: "string",
369
+ regex: "'(?=.)",
370
+ push: [
371
+ {
372
+ token: "string",
373
+ regex: "'|$",
374
+ next: "pop"
375
+ }, {
376
+ include: "qstring"
377
+ }
378
+ ]
379
+ }, {
380
+ token: "string",
381
+ regex: '"(?=.)',
382
+ push: [
383
+ {
384
+ token: "string",
385
+ regex: '"|$',
386
+ next: "pop"
387
+ }, {
388
+ include: "qqstring"
389
+ }
390
+ ]
391
+ }, {
392
+ token: "constant.language",
393
+ regex: "null|Infinity|NaN|undefined"
394
+ }, {
395
+ token: "constant.numeric",
396
+ regex: /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
397
+ }, {
398
+ token: "constant.numeric",
399
+ regex: /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
400
+ }, {
401
+ token: "punctuation.operator",
402
+ regex: ",",
403
+ next: "function_arguments"
404
+ }, {
405
+ token: "text",
406
+ regex: "\\s+"
407
+ }, {
408
+ token: "punctuation.operator",
409
+ regex: "$"
410
+ }, {
411
+ token: "empty",
412
+ regex: "",
413
+ next: "no_regex"
414
+ }
415
+ ],
416
+ "function_arguments": [
417
+ comments("function_arguments"),
418
+ {
419
+ token: "variable.parameter",
420
+ regex: identifierRe
421
+ }, {
422
+ token: "punctuation.operator",
423
+ regex: ","
424
+ }, {
425
+ token: "text",
426
+ regex: "\\s+"
427
+ }, {
428
+ token: "punctuation.operator",
429
+ regex: "$"
430
+ }, {
431
+ token: "empty",
432
+ regex: "",
433
+ next: "no_regex"
434
+ }
435
+ ],
436
+ "qqstring": [
437
+ {
438
+ token: "constant.language.escape",
439
+ regex: escapedRe
440
+ }, {
441
+ token: "string",
442
+ regex: "\\\\$",
443
+ consumeLineEnd: true
444
+ }, {
445
+ token: "string",
446
+ regex: '"|$',
447
+ next: "no_regex"
448
+ }, {
449
+ defaultToken: "string"
450
+ }
451
+ ],
452
+ "qstring": [
453
+ {
454
+ token: "constant.language.escape",
455
+ regex: escapedRe
456
+ }, {
457
+ token: "string",
458
+ regex: "\\\\$",
459
+ consumeLineEnd: true
460
+ }, {
461
+ token: "string",
462
+ regex: "'|$",
463
+ next: "no_regex"
464
+ }, {
465
+ defaultToken: "string"
466
+ }
467
+ ]
468
+ };
469
+ if (!options || !options.noES6) {
470
+ this.$rules.no_regex.unshift({
471
+ regex: "[{}]", onMatch: function (val, state, stack) {
472
+ this.next = val == "{" ? this.nextState : "";
473
+ if (val == "{" && stack.length) {
474
+ stack.unshift("start", state);
475
+ }
476
+ else if (val == "}" && stack.length) {
477
+ stack.shift();
478
+ this.next = stack.shift();
479
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
480
+ return "paren.quasi.end";
481
+ }
482
+ return val == "{" ? "paren.lparen" : "paren.rparen";
483
+ },
484
+ nextState: "start"
485
+ }, {
486
+ token: "string.quasi.start",
487
+ regex: /`/,
488
+ push: [{
489
+ token: "constant.language.escape",
490
+ regex: escapedRe
491
+ }, {
492
+ token: "paren.quasi.start",
493
+ regex: /\${/,
494
+ push: "start"
495
+ }, {
496
+ token: "string.quasi.end",
497
+ regex: /`/,
498
+ next: "pop"
499
+ }, {
500
+ defaultToken: "string.quasi"
501
+ }]
502
+ }, {
503
+ token: ["variable.parameter", "text"],
504
+ regex: "(" + identifierRe + ")(\\s*)(?=\\=>)"
505
+ }, {
506
+ token: "paren.lparen",
507
+ regex: "(\\()(?=.+\\s*=>)",
508
+ next: "function_arguments"
509
+ }, {
510
+ token: "variable.language",
511
+ regex: "(?:(?:(?:Weak)?(?:Set|Map))|Promise)\\b"
512
+ });
513
+ this.$rules["function_arguments"].unshift({
514
+ token: "keyword.operator",
515
+ regex: "=",
516
+ next: "default_parameter"
517
+ }, {
518
+ token: "keyword.operator",
519
+ regex: "\\.{3}"
520
+ });
521
+ this.$rules["property"].unshift({
522
+ token: "support.function",
523
+ regex: "(findIndex|repeat|startsWith|endsWith|includes|isSafeInteger|trunc|cbrt|log2|log10|sign|then|catch|"
524
+ + "finally|resolve|reject|race|any|all|allSettled|keys|entries|isInteger)\\b(?=\\()"
525
+ }, {
526
+ token: "constant.language",
527
+ regex: "(?:MAX_SAFE_INTEGER|MIN_SAFE_INTEGER|EPSILON)\\b"
528
+ });
529
+ if (!options || options.jsx != false)
530
+ JSX.call(this);
531
+ }
532
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("no_regex")]);
533
+ this.normalizeRules();
534
+ };
535
+ oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
536
+ function JSX() {
537
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
538
+ var jsxTag = {
539
+ onMatch: function (val, state, stack) {
540
+ var offset = val.charAt(1) == "/" ? 2 : 1;
541
+ if (offset == 1) {
542
+ if (state != this.nextState)
543
+ stack.unshift(this.next, this.nextState, 0);
544
+ else
545
+ stack.unshift(this.next);
546
+ stack[2]++;
547
+ }
548
+ else if (offset == 2) {
549
+ if (state == this.nextState) {
550
+ stack[1]--;
551
+ if (!stack[1] || stack[1] < 0) {
552
+ stack.shift();
553
+ stack.shift();
554
+ }
555
+ }
556
+ }
557
+ return [{
558
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
559
+ value: val.slice(0, offset)
560
+ }, {
561
+ type: "meta.tag.tag-name.xml",
562
+ value: val.substr(offset)
563
+ }];
564
+ },
565
+ regex: "</?" + tagRegex + "",
566
+ next: "jsxAttributes",
567
+ nextState: "jsx"
568
+ };
569
+ this.$rules.start.unshift(jsxTag);
570
+ var jsxJsRule = {
571
+ regex: "{",
572
+ token: "paren.quasi.start",
573
+ push: "start"
574
+ };
575
+ this.$rules.jsx = [
576
+ jsxJsRule,
577
+ jsxTag,
578
+ { include: "reference" },
579
+ { defaultToken: "string" }
580
+ ];
581
+ this.$rules.jsxAttributes = [{
582
+ token: "meta.tag.punctuation.tag-close.xml",
583
+ regex: "/?>",
584
+ onMatch: function (value, currentState, stack) {
585
+ if (currentState == stack[0])
586
+ stack.shift();
587
+ if (value.length == 2) {
588
+ if (stack[0] == this.nextState)
589
+ stack[1]--;
590
+ if (!stack[1] || stack[1] < 0) {
591
+ stack.splice(0, 2);
592
+ }
593
+ }
594
+ this.next = stack[0] || "start";
595
+ return [{ type: this.token, value: value }];
596
+ },
597
+ nextState: "jsx"
598
+ },
599
+ jsxJsRule,
600
+ comments("jsxAttributes"),
601
+ {
602
+ token: "entity.other.attribute-name.xml",
603
+ regex: tagRegex
604
+ }, {
605
+ token: "keyword.operator.attribute-equals.xml",
606
+ regex: "="
607
+ }, {
608
+ token: "text.tag-whitespace.xml",
609
+ regex: "\\s+"
610
+ }, {
611
+ token: "string.attribute-value.xml",
612
+ regex: "'",
613
+ stateName: "jsx_attr_q",
614
+ push: [
615
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
616
+ { include: "reference" },
617
+ { defaultToken: "string.attribute-value.xml" }
618
+ ]
619
+ }, {
620
+ token: "string.attribute-value.xml",
621
+ regex: '"',
622
+ stateName: "jsx_attr_qq",
623
+ push: [
624
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
625
+ { include: "reference" },
626
+ { defaultToken: "string.attribute-value.xml" }
627
+ ]
628
+ },
629
+ jsxTag
630
+ ];
631
+ this.$rules.reference = [{
632
+ token: "constant.language.escape.reference.xml",
633
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
634
+ }];
635
+ }
636
+ function comments(next) {
637
+ return [
638
+ {
639
+ token: "comment",
640
+ regex: /\/\*/,
641
+ next: [
642
+ DocCommentHighlightRules.getTagRule(),
643
+ { token: "comment", regex: "\\*\\/", next: next || "pop" },
644
+ { defaultToken: "comment", caseInsensitive: true }
645
+ ]
646
+ }, {
647
+ token: "comment",
648
+ regex: "\\/\\/",
649
+ next: [
650
+ DocCommentHighlightRules.getTagRule(),
651
+ { token: "comment", regex: "$|^", next: next || "pop" },
652
+ { defaultToken: "comment", caseInsensitive: true }
653
+ ]
654
+ }
655
+ ];
656
+ }
657
+ exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
658
+
659
+ });
660
+
661
+ ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module){"use strict";
662
+ var Range = require("../range").Range;
663
+ var MatchingBraceOutdent = function () { };
664
+ (function () {
665
+ this.checkOutdent = function (line, input) {
666
+ if (!/^\s+$/.test(line))
667
+ return false;
668
+ return /^\s*\}/.test(input);
669
+ };
670
+ this.autoOutdent = function (doc, row) {
671
+ var line = doc.getLine(row);
672
+ var match = line.match(/^(\s*\})/);
673
+ if (!match)
674
+ return 0;
675
+ var column = match[1].length;
676
+ var openBracePos = doc.findMatchingBracket({ row: row, column: column });
677
+ if (!openBracePos || openBracePos.row == row)
678
+ return 0;
679
+ var indent = this.$getIndent(doc.getLine(openBracePos.row));
680
+ doc.replace(new Range(row, 0, row, column - 1), indent);
681
+ };
682
+ this.$getIndent = function (line) {
683
+ return line.match(/^\s*/)[0];
684
+ };
685
+ }).call(MatchingBraceOutdent.prototype);
686
+ exports.MatchingBraceOutdent = MatchingBraceOutdent;
687
+
688
+ });
689
+
690
+ 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";
691
+ var oop = require("../../lib/oop");
692
+ var Range = require("../../range").Range;
693
+ var BaseFoldMode = require("./fold_mode").FoldMode;
694
+ var FoldMode = exports.FoldMode = function (commentRegex) {
695
+ if (commentRegex) {
696
+ this.foldingStartMarker = new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start));
697
+ this.foldingStopMarker = new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end));
698
+ }
699
+ };
700
+ oop.inherits(FoldMode, BaseFoldMode);
701
+ (function () {
702
+ this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
703
+ this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
704
+ this.singleLineBlockCommentRe = /^\s*(\/\*).*\*\/\s*$/;
705
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
706
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
707
+ this._getFoldWidgetBase = this.getFoldWidget;
708
+ this.getFoldWidget = function (session, foldStyle, row) {
709
+ var line = session.getLine(row);
710
+ if (this.singleLineBlockCommentRe.test(line)) {
711
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
712
+ return "";
713
+ }
714
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
715
+ if (!fw && this.startRegionRe.test(line))
716
+ return "start"; // lineCommentRegionStart
717
+ return fw;
718
+ };
719
+ this.getFoldWidgetRange = function (session, foldStyle, row, forceMultiline) {
720
+ var line = session.getLine(row);
721
+ if (this.startRegionRe.test(line))
722
+ return this.getCommentRegionBlock(session, line, row);
723
+ var match = line.match(this.foldingStartMarker);
724
+ if (match) {
725
+ var i = match.index;
726
+ if (match[1])
727
+ return this.openingBracketBlock(session, match[1], row, i);
728
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
729
+ if (range && !range.isMultiLine()) {
730
+ if (forceMultiline) {
731
+ range = this.getSectionRange(session, row);
732
+ }
733
+ else if (foldStyle != "all")
734
+ range = null;
735
+ }
736
+ return range;
737
+ }
738
+ if (foldStyle === "markbegin")
739
+ return;
740
+ var match = line.match(this.foldingStopMarker);
741
+ if (match) {
742
+ var i = match.index + match[0].length;
743
+ if (match[1])
744
+ return this.closingBracketBlock(session, match[1], row, i);
745
+ return session.getCommentFoldRange(row, i, -1);
746
+ }
747
+ };
748
+ this.getSectionRange = function (session, row) {
749
+ var line = session.getLine(row);
750
+ var startIndent = line.search(/\S/);
751
+ var startRow = row;
752
+ var startColumn = line.length;
753
+ row = row + 1;
754
+ var endRow = row;
755
+ var maxRow = session.getLength();
756
+ while (++row < maxRow) {
757
+ line = session.getLine(row);
758
+ var indent = line.search(/\S/);
759
+ if (indent === -1)
760
+ continue;
761
+ if (startIndent > indent)
762
+ break;
763
+ var subRange = this.getFoldWidgetRange(session, "all", row);
764
+ if (subRange) {
765
+ if (subRange.start.row <= startRow) {
766
+ break;
767
+ }
768
+ else if (subRange.isMultiLine()) {
769
+ row = subRange.end.row;
770
+ }
771
+ else if (startIndent == indent) {
772
+ break;
773
+ }
774
+ }
775
+ endRow = row;
776
+ }
777
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
778
+ };
779
+ this.getCommentRegionBlock = function (session, line, row) {
780
+ var startColumn = line.search(/\s*$/);
781
+ var maxRow = session.getLength();
782
+ var startRow = row;
783
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
784
+ var depth = 1;
785
+ while (++row < maxRow) {
786
+ line = session.getLine(row);
787
+ var m = re.exec(line);
788
+ if (!m)
789
+ continue;
790
+ if (m[1])
791
+ depth--;
792
+ else
793
+ depth++;
794
+ if (!depth)
795
+ break;
796
+ }
797
+ var endRow = row;
798
+ if (endRow > startRow) {
799
+ return new Range(startRow, startColumn, endRow, line.length);
800
+ }
801
+ };
802
+ }).call(FoldMode.prototype);
803
+
804
+ });
805
+
806
+ ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module){"use strict";
807
+ var oop = require("../lib/oop");
808
+ var TextMode = require("./text").Mode;
809
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
810
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
811
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
812
+ var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
813
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
814
+ var Mode = function () {
815
+ this.HighlightRules = JavaScriptHighlightRules;
816
+ this.$outdent = new MatchingBraceOutdent();
817
+ this.$behaviour = new CstyleBehaviour();
818
+ this.foldingRules = new CStyleFoldMode();
819
+ };
820
+ oop.inherits(Mode, TextMode);
821
+ (function () {
822
+ this.lineCommentStart = "//";
823
+ this.blockComment = { start: "/*", end: "*/" };
824
+ this.$quotes = { '"': '"', "'": "'", "`": "`" };
825
+ this.$pairQuotesAfter = {
826
+ "`": /\w/
827
+ };
828
+ this.getNextLineIndent = function (state, line, tab) {
829
+ var indent = this.$getIndent(line);
830
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
831
+ var tokens = tokenizedLine.tokens;
832
+ var endState = tokenizedLine.state;
833
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
834
+ return indent;
835
+ }
836
+ if (state == "start" || state == "no_regex") {
837
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
838
+ if (match) {
839
+ indent += tab;
840
+ }
841
+ }
842
+ else if (state == "doc-start") {
843
+ if (endState == "start" || endState == "no_regex") {
844
+ return "";
845
+ }
846
+ var match = line.match(/^\s*(\/?)\*/);
847
+ if (match) {
848
+ if (match[1]) {
849
+ indent += " ";
850
+ }
851
+ indent += "* ";
852
+ }
853
+ }
854
+ return indent;
855
+ };
856
+ this.checkOutdent = function (state, line, input) {
857
+ return this.$outdent.checkOutdent(line, input);
858
+ };
859
+ this.autoOutdent = function (state, doc, row) {
860
+ this.$outdent.autoOutdent(doc, row);
861
+ };
862
+ this.createWorker = function (session) {
863
+ var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker");
864
+ worker.attachToDocument(session.getDocument());
865
+ worker.on("annotate", function (results) {
866
+ session.setAnnotations(results.data);
867
+ });
868
+ worker.on("terminate", function () {
869
+ session.clearAnnotations();
870
+ });
871
+ return worker;
872
+ };
873
+ this.$id = "ace/mode/javascript";
874
+ this.snippetFileId = "ace/snippets/javascript";
875
+ }).call(Mode.prototype);
876
+ exports.Mode = Mode;
877
+
878
+ });
879
+
880
+ 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";
881
+ var oop = require("../lib/oop");
882
+ var lang = require("../lib/lang");
883
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
884
+ 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";
885
+ var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
886
+ 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";
887
+ 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";
888
+ 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";
889
+ var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
890
+ var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
891
+ 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";
892
+ var CssHighlightRules = function () {
893
+ var keywordMapper = this.createKeywordMapper({
894
+ "support.function": supportFunction,
895
+ "support.constant": supportConstant,
896
+ "support.type": supportType,
897
+ "support.constant.color": supportConstantColor,
898
+ "support.constant.fonts": supportConstantFonts
899
+ }, "text", true);
900
+ this.$rules = {
901
+ "start": [{
902
+ include: ["strings", "url", "comments"]
903
+ }, {
904
+ token: "paren.lparen",
905
+ regex: "\\{",
906
+ next: "ruleset"
907
+ }, {
908
+ token: "paren.rparen",
909
+ regex: "\\}"
910
+ }, {
911
+ token: "string",
912
+ regex: "@(?!viewport)",
913
+ next: "media"
914
+ }, {
915
+ token: "keyword",
916
+ regex: "#[a-z0-9-_]+"
917
+ }, {
918
+ token: "keyword",
919
+ regex: "%"
920
+ }, {
921
+ token: "variable",
922
+ regex: "\\.[a-z0-9-_]+"
923
+ }, {
924
+ token: "string",
925
+ regex: ":[a-z0-9-_]+"
926
+ }, {
927
+ token: "constant.numeric",
928
+ regex: numRe
929
+ }, {
930
+ token: "constant",
931
+ regex: "[a-z0-9-_]+"
932
+ }, {
933
+ caseInsensitive: true
934
+ }],
935
+ "media": [{
936
+ include: ["strings", "url", "comments"]
937
+ }, {
938
+ token: "paren.lparen",
939
+ regex: "\\{",
940
+ next: "start"
941
+ }, {
942
+ token: "paren.rparen",
943
+ regex: "\\}",
944
+ next: "start"
945
+ }, {
946
+ token: "string",
947
+ regex: ";",
948
+ next: "start"
949
+ }, {
950
+ token: "keyword",
951
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
952
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
953
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
954
+ }],
955
+ "comments": [{
956
+ token: "comment",
957
+ regex: "\\/\\*",
958
+ push: [{
959
+ token: "comment",
960
+ regex: "\\*\\/",
961
+ next: "pop"
962
+ }, {
963
+ defaultToken: "comment"
964
+ }]
965
+ }],
966
+ "ruleset": [{
967
+ regex: "-(webkit|ms|moz|o)-",
968
+ token: "text"
969
+ }, {
970
+ token: "punctuation.operator",
971
+ regex: "[:;]"
972
+ }, {
973
+ token: "paren.rparen",
974
+ regex: "\\}",
975
+ next: "start"
976
+ }, {
977
+ include: ["strings", "url", "comments"]
978
+ }, {
979
+ token: ["constant.numeric", "keyword"],
980
+ 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|%)"
981
+ }, {
982
+ token: "constant.numeric",
983
+ regex: numRe
984
+ }, {
985
+ token: "constant.numeric",
986
+ regex: "#[a-f0-9]{6}"
987
+ }, {
988
+ token: "constant.numeric",
989
+ regex: "#[a-f0-9]{3}"
990
+ }, {
991
+ token: ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
992
+ regex: pseudoElements
993
+ }, {
994
+ token: ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
995
+ regex: pseudoClasses
996
+ }, {
997
+ include: "url"
998
+ }, {
999
+ token: keywordMapper,
1000
+ regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
1001
+ }, {
1002
+ caseInsensitive: true
1003
+ }],
1004
+ url: [{
1005
+ token: "support.function",
1006
+ regex: "(?:url(:?-prefix)?|domain|regexp)\\(",
1007
+ push: [{
1008
+ token: "support.function",
1009
+ regex: "\\)",
1010
+ next: "pop"
1011
+ }, {
1012
+ defaultToken: "string"
1013
+ }]
1014
+ }],
1015
+ strings: [{
1016
+ token: "string.start",
1017
+ regex: "'",
1018
+ push: [{
1019
+ token: "string.end",
1020
+ regex: "'|$",
1021
+ next: "pop"
1022
+ }, {
1023
+ include: "escapes"
1024
+ }, {
1025
+ token: "constant.language.escape",
1026
+ regex: /\\$/,
1027
+ consumeLineEnd: true
1028
+ }, {
1029
+ defaultToken: "string"
1030
+ }]
1031
+ }, {
1032
+ token: "string.start",
1033
+ regex: '"',
1034
+ push: [{
1035
+ token: "string.end",
1036
+ regex: '"|$',
1037
+ next: "pop"
1038
+ }, {
1039
+ include: "escapes"
1040
+ }, {
1041
+ token: "constant.language.escape",
1042
+ regex: /\\$/,
1043
+ consumeLineEnd: true
1044
+ }, {
1045
+ defaultToken: "string"
1046
+ }]
1047
+ }],
1048
+ escapes: [{
1049
+ token: "constant.language.escape",
1050
+ regex: /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
1051
+ }]
1052
+ };
1053
+ this.normalizeRules();
1054
+ };
1055
+ oop.inherits(CssHighlightRules, TextHighlightRules);
1056
+ exports.CssHighlightRules = CssHighlightRules;
1057
+
1058
+ });
1059
+
1060
+ ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module){"use strict";
1061
+ var propertyMap = {
1062
+ "background": { "#$0": 1 },
1063
+ "background-color": { "#$0": 1, "transparent": 1, "fixed": 1 },
1064
+ "background-image": { "url('/$0')": 1 },
1065
+ "background-repeat": { "repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1 },
1066
+ "background-position": { "bottom": 2, "center": 2, "left": 2, "right": 2, "top": 2, "inherit": 2 },
1067
+ "background-attachment": { "scroll": 1, "fixed": 1 },
1068
+ "background-size": { "cover": 1, "contain": 1 },
1069
+ "background-clip": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1070
+ "background-origin": { "border-box": 1, "padding-box": 1, "content-box": 1 },
1071
+ "border": { "solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1 },
1072
+ "border-color": { "#$0": 1 },
1073
+ "border-style": { "solid": 2, "dashed": 2, "dotted": 2, "double": 2, "groove": 2, "hidden": 2, "inherit": 2, "inset": 2, "none": 2, "outset": 2, "ridged": 2 },
1074
+ "border-collapse": { "collapse": 1, "separate": 1 },
1075
+ "bottom": { "px": 1, "em": 1, "%": 1 },
1076
+ "clear": { "left": 1, "right": 1, "both": 1, "none": 1 },
1077
+ "color": { "#$0": 1, "rgb(#$00,0,0)": 1 },
1078
+ "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 },
1079
+ "display": { "none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1 },
1080
+ "empty-cells": { "show": 1, "hide": 1 },
1081
+ "float": { "left": 1, "right": 1, "none": 1 },
1082
+ "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 },
1083
+ "font-size": { "px": 1, "em": 1, "%": 1 },
1084
+ "font-weight": { "bold": 1, "normal": 1 },
1085
+ "font-style": { "italic": 1, "normal": 1 },
1086
+ "font-variant": { "normal": 1, "small-caps": 1 },
1087
+ "height": { "px": 1, "em": 1, "%": 1 },
1088
+ "left": { "px": 1, "em": 1, "%": 1 },
1089
+ "letter-spacing": { "normal": 1 },
1090
+ "line-height": { "normal": 1 },
1091
+ "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 },
1092
+ "margin": { "px": 1, "em": 1, "%": 1 },
1093
+ "margin-right": { "px": 1, "em": 1, "%": 1 },
1094
+ "margin-left": { "px": 1, "em": 1, "%": 1 },
1095
+ "margin-top": { "px": 1, "em": 1, "%": 1 },
1096
+ "margin-bottom": { "px": 1, "em": 1, "%": 1 },
1097
+ "max-height": { "px": 1, "em": 1, "%": 1 },
1098
+ "max-width": { "px": 1, "em": 1, "%": 1 },
1099
+ "min-height": { "px": 1, "em": 1, "%": 1 },
1100
+ "min-width": { "px": 1, "em": 1, "%": 1 },
1101
+ "overflow": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1102
+ "overflow-x": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1103
+ "overflow-y": { "hidden": 1, "visible": 1, "auto": 1, "scroll": 1 },
1104
+ "padding": { "px": 1, "em": 1, "%": 1 },
1105
+ "padding-top": { "px": 1, "em": 1, "%": 1 },
1106
+ "padding-right": { "px": 1, "em": 1, "%": 1 },
1107
+ "padding-bottom": { "px": 1, "em": 1, "%": 1 },
1108
+ "padding-left": { "px": 1, "em": 1, "%": 1 },
1109
+ "page-break-after": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1110
+ "page-break-before": { "auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1 },
1111
+ "position": { "absolute": 1, "relative": 1, "fixed": 1, "static": 1 },
1112
+ "right": { "px": 1, "em": 1, "%": 1 },
1113
+ "table-layout": { "fixed": 1, "auto": 1 },
1114
+ "text-decoration": { "none": 1, "underline": 1, "line-through": 1, "blink": 1 },
1115
+ "text-align": { "left": 1, "right": 1, "center": 1, "justify": 1 },
1116
+ "text-transform": { "capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1 },
1117
+ "top": { "px": 1, "em": 1, "%": 1 },
1118
+ "vertical-align": { "top": 1, "bottom": 1 },
1119
+ "visibility": { "hidden": 1, "visible": 1 },
1120
+ "white-space": { "nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1 },
1121
+ "width": { "px": 1, "em": 1, "%": 1 },
1122
+ "word-spacing": { "normal": 1 },
1123
+ "filter": { "alpha(opacity=$0100)": 1 },
1124
+ "text-shadow": { "$02px 2px 2px #777": 1 },
1125
+ "text-overflow": { "ellipsis-word": 1, "clip": 1, "ellipsis": 1 },
1126
+ "-moz-border-radius": 1,
1127
+ "-moz-border-radius-topright": 1,
1128
+ "-moz-border-radius-bottomright": 1,
1129
+ "-moz-border-radius-topleft": 1,
1130
+ "-moz-border-radius-bottomleft": 1,
1131
+ "-webkit-border-radius": 1,
1132
+ "-webkit-border-top-right-radius": 1,
1133
+ "-webkit-border-top-left-radius": 1,
1134
+ "-webkit-border-bottom-right-radius": 1,
1135
+ "-webkit-border-bottom-left-radius": 1,
1136
+ "-moz-box-shadow": 1,
1137
+ "-webkit-box-shadow": 1,
1138
+ "transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1139
+ "-moz-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 },
1140
+ "-webkit-transform": { "rotate($00deg)": 1, "skew($00deg)": 1 }
1141
+ };
1142
+ var CssCompletions = function () {
1143
+ };
1144
+ (function () {
1145
+ this.completionsDefined = false;
1146
+ this.defineCompletions = function () {
1147
+ if (document) {
1148
+ var style = document.createElement('c').style;
1149
+ for (var i in style) {
1150
+ if (typeof style[i] !== 'string')
1151
+ continue;
1152
+ var name = i.replace(/[A-Z]/g, function (x) {
1153
+ return '-' + x.toLowerCase();
1154
+ });
1155
+ if (!propertyMap.hasOwnProperty(name))
1156
+ propertyMap[name] = 1;
1157
+ }
1158
+ }
1159
+ this.completionsDefined = true;
1160
+ };
1161
+ this.getCompletions = function (state, session, pos, prefix) {
1162
+ if (!this.completionsDefined) {
1163
+ this.defineCompletions();
1164
+ }
1165
+ if (state === 'ruleset' || session.$mode.$id == "ace/mode/scss") {
1166
+ var line = session.getLine(pos.row).substr(0, pos.column);
1167
+ var inParens = /\([^)]*$/.test(line);
1168
+ if (inParens) {
1169
+ line = line.substr(line.lastIndexOf('(') + 1);
1170
+ }
1171
+ if (/:[^;]+$/.test(line)) {
1172
+ /([\w\-]+):[^:]*$/.test(line);
1173
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
1174
+ }
1175
+ else {
1176
+ return this.getPropertyCompletions(state, session, pos, prefix, inParens);
1177
+ }
1178
+ }
1179
+ return [];
1180
+ };
1181
+ this.getPropertyCompletions = function (state, session, pos, prefix, skipSemicolon) {
1182
+ skipSemicolon = skipSemicolon || false;
1183
+ var properties = Object.keys(propertyMap);
1184
+ return properties.map(function (property) {
1185
+ return {
1186
+ caption: property,
1187
+ snippet: property + ': $0' + (skipSemicolon ? '' : ';'),
1188
+ meta: "property",
1189
+ score: 1000000
1190
+ };
1191
+ });
1192
+ };
1193
+ this.getPropertyValueCompletions = function (state, session, pos, prefix) {
1194
+ var line = session.getLine(pos.row).substr(0, pos.column);
1195
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
1196
+ if (!property)
1197
+ return [];
1198
+ var values = [];
1199
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
1200
+ values = Object.keys(propertyMap[property]);
1201
+ }
1202
+ return values.map(function (value) {
1203
+ return {
1204
+ caption: value,
1205
+ snippet: value,
1206
+ meta: "property value",
1207
+ score: 1000000
1208
+ };
1209
+ });
1210
+ };
1211
+ }).call(CssCompletions.prototype);
1212
+ exports.CssCompletions = CssCompletions;
1213
+
1214
+ });
1215
+
1216
+ 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";
1217
+ var oop = require("../../lib/oop");
1218
+ var Behaviour = require("../behaviour").Behaviour;
1219
+ var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
1220
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1221
+ var CssBehaviour = function () {
1222
+ this.inherit(CstyleBehaviour);
1223
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
1224
+ if (text === ':' && editor.selection.isEmpty()) {
1225
+ var cursor = editor.getCursorPosition();
1226
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1227
+ var token = iterator.getCurrentToken();
1228
+ if (token && token.value.match(/\s+/)) {
1229
+ token = iterator.stepBackward();
1230
+ }
1231
+ if (token && token.type === 'support.type') {
1232
+ var line = session.doc.getLine(cursor.row);
1233
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1234
+ if (rightChar === ':') {
1235
+ return {
1236
+ text: '',
1237
+ selection: [1, 1]
1238
+ };
1239
+ }
1240
+ if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) {
1241
+ return {
1242
+ text: ':;',
1243
+ selection: [1, 1]
1244
+ };
1245
+ }
1246
+ }
1247
+ }
1248
+ });
1249
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
1250
+ var selected = session.doc.getTextRange(range);
1251
+ if (!range.isMultiLine() && selected === ':') {
1252
+ var cursor = editor.getCursorPosition();
1253
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1254
+ var token = iterator.getCurrentToken();
1255
+ if (token && token.value.match(/\s+/)) {
1256
+ token = iterator.stepBackward();
1257
+ }
1258
+ if (token && token.type === 'support.type') {
1259
+ var line = session.doc.getLine(range.start.row);
1260
+ var rightChar = line.substring(range.end.column, range.end.column + 1);
1261
+ if (rightChar === ';') {
1262
+ range.end.column++;
1263
+ return range;
1264
+ }
1265
+ }
1266
+ }
1267
+ });
1268
+ this.add("semicolon", "insertion", function (state, action, editor, session, text) {
1269
+ if (text === ';' && editor.selection.isEmpty()) {
1270
+ var cursor = editor.getCursorPosition();
1271
+ var line = session.doc.getLine(cursor.row);
1272
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1273
+ if (rightChar === ';') {
1274
+ return {
1275
+ text: '',
1276
+ selection: [1, 1]
1277
+ };
1278
+ }
1279
+ }
1280
+ });
1281
+ this.add("!important", "insertion", function (state, action, editor, session, text) {
1282
+ if (text === '!' && editor.selection.isEmpty()) {
1283
+ var cursor = editor.getCursorPosition();
1284
+ var line = session.doc.getLine(cursor.row);
1285
+ if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) {
1286
+ return {
1287
+ text: '!important',
1288
+ selection: [10, 10]
1289
+ };
1290
+ }
1291
+ }
1292
+ });
1293
+ };
1294
+ oop.inherits(CssBehaviour, CstyleBehaviour);
1295
+ exports.CssBehaviour = CssBehaviour;
1296
+
1297
+ });
1298
+
1299
+ 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";
1300
+ var oop = require("../lib/oop");
1301
+ var TextMode = require("./text").Mode;
1302
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1303
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
1304
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
1305
+ var CssCompletions = require("./css_completions").CssCompletions;
1306
+ var CssBehaviour = require("./behaviour/css").CssBehaviour;
1307
+ var CStyleFoldMode = require("./folding/cstyle").FoldMode;
1308
+ var Mode = function () {
1309
+ this.HighlightRules = CssHighlightRules;
1310
+ this.$outdent = new MatchingBraceOutdent();
1311
+ this.$behaviour = new CssBehaviour();
1312
+ this.$completer = new CssCompletions();
1313
+ this.foldingRules = new CStyleFoldMode();
1314
+ };
1315
+ oop.inherits(Mode, TextMode);
1316
+ (function () {
1317
+ this.foldingRules = "cStyle";
1318
+ this.blockComment = { start: "/*", end: "*/" };
1319
+ this.getNextLineIndent = function (state, line, tab) {
1320
+ var indent = this.$getIndent(line);
1321
+ var tokens = this.getTokenizer().getLineTokens(line, state).tokens;
1322
+ if (tokens.length && tokens[tokens.length - 1].type == "comment") {
1323
+ return indent;
1324
+ }
1325
+ var match = line.match(/^.*\{\s*$/);
1326
+ if (match) {
1327
+ indent += tab;
1328
+ }
1329
+ return indent;
1330
+ };
1331
+ this.checkOutdent = function (state, line, input) {
1332
+ return this.$outdent.checkOutdent(line, input);
1333
+ };
1334
+ this.autoOutdent = function (state, doc, row) {
1335
+ this.$outdent.autoOutdent(doc, row);
1336
+ };
1337
+ this.getCompletions = function (state, session, pos, prefix) {
1338
+ return this.$completer.getCompletions(state, session, pos, prefix);
1339
+ };
1340
+ this.createWorker = function (session) {
1341
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
1342
+ worker.attachToDocument(session.getDocument());
1343
+ worker.on("annotate", function (e) {
1344
+ session.setAnnotations(e.data);
1345
+ });
1346
+ worker.on("terminate", function () {
1347
+ session.clearAnnotations();
1348
+ });
1349
+ return worker;
1350
+ };
1351
+ this.$id = "ace/mode/css";
1352
+ this.snippetFileId = "ace/snippets/css";
1353
+ }).call(Mode.prototype);
1354
+ exports.Mode = Mode;
1355
+
1356
+ });
1357
+
1358
+ ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module){"use strict";
1359
+ var oop = require("../lib/oop");
1360
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
1361
+ var XmlHighlightRules = function (normalize) {
1362
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
1363
+ this.$rules = {
1364
+ start: [
1365
+ { token: "string.cdata.xml", regex: "<\\!\\[CDATA\\[", next: "cdata" },
1366
+ {
1367
+ token: ["punctuation.instruction.xml", "keyword.instruction.xml"],
1368
+ regex: "(<\\?)(" + tagRegex + ")", next: "processing_instruction"
1369
+ },
1370
+ { token: "comment.start.xml", regex: "<\\!--", next: "comment" },
1371
+ {
1372
+ token: ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
1373
+ regex: "(<\\!)(DOCTYPE)(?=[\\s])", next: "doctype", caseInsensitive: true
1374
+ },
1375
+ { include: "tag" },
1376
+ { token: "text.end-tag-open.xml", regex: "</" },
1377
+ { token: "text.tag-open.xml", regex: "<" },
1378
+ { include: "reference" },
1379
+ { defaultToken: "text.xml" }
1380
+ ],
1381
+ processing_instruction: [{
1382
+ token: "entity.other.attribute-name.decl-attribute-name.xml",
1383
+ regex: tagRegex
1384
+ }, {
1385
+ token: "keyword.operator.decl-attribute-equals.xml",
1386
+ regex: "="
1387
+ }, {
1388
+ include: "whitespace"
1389
+ }, {
1390
+ include: "string"
1391
+ }, {
1392
+ token: "punctuation.xml-decl.xml",
1393
+ regex: "\\?>",
1394
+ next: "start"
1395
+ }],
1396
+ doctype: [
1397
+ { include: "whitespace" },
1398
+ { include: "string" },
1399
+ { token: "xml-pe.doctype.xml", regex: ">", next: "start" },
1400
+ { token: "xml-pe.xml", regex: "[-_a-zA-Z0-9:]+" },
1401
+ { token: "punctuation.int-subset", regex: "\\[", push: "int_subset" }
1402
+ ],
1403
+ int_subset: [{
1404
+ token: "text.xml",
1405
+ regex: "\\s+"
1406
+ }, {
1407
+ token: "punctuation.int-subset.xml",
1408
+ regex: "]",
1409
+ next: "pop"
1410
+ }, {
1411
+ token: ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
1412
+ regex: "(<\\!)(" + tagRegex + ")",
1413
+ push: [{
1414
+ token: "text",
1415
+ regex: "\\s+"
1416
+ },
1417
+ {
1418
+ token: "punctuation.markup-decl.xml",
1419
+ regex: ">",
1420
+ next: "pop"
1421
+ },
1422
+ { include: "string" }]
1423
+ }],
1424
+ cdata: [
1425
+ { token: "string.cdata.xml", regex: "\\]\\]>", next: "start" },
1426
+ { token: "text.xml", regex: "\\s+" },
1427
+ { token: "text.xml", regex: "(?:[^\\]]|\\](?!\\]>))+" }
1428
+ ],
1429
+ comment: [
1430
+ { token: "comment.end.xml", regex: "-->", next: "start" },
1431
+ { defaultToken: "comment.xml" }
1432
+ ],
1433
+ reference: [{
1434
+ token: "constant.language.escape.reference.xml",
1435
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1436
+ }],
1437
+ attr_reference: [{
1438
+ token: "constant.language.escape.reference.attribute-value.xml",
1439
+ regex: "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
1440
+ }],
1441
+ tag: [{
1442
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
1443
+ regex: "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
1444
+ next: [
1445
+ { include: "attributes" },
1446
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1447
+ ]
1448
+ }],
1449
+ tag_whitespace: [
1450
+ { token: "text.tag-whitespace.xml", regex: "\\s+" }
1451
+ ],
1452
+ whitespace: [
1453
+ { token: "text.whitespace.xml", regex: "\\s+" }
1454
+ ],
1455
+ string: [{
1456
+ token: "string.xml",
1457
+ regex: "'",
1458
+ push: [
1459
+ { token: "string.xml", regex: "'", next: "pop" },
1460
+ { defaultToken: "string.xml" }
1461
+ ]
1462
+ }, {
1463
+ token: "string.xml",
1464
+ regex: '"',
1465
+ push: [
1466
+ { token: "string.xml", regex: '"', next: "pop" },
1467
+ { defaultToken: "string.xml" }
1468
+ ]
1469
+ }],
1470
+ attributes: [{
1471
+ token: "entity.other.attribute-name.xml",
1472
+ regex: tagRegex
1473
+ }, {
1474
+ token: "keyword.operator.attribute-equals.xml",
1475
+ regex: "="
1476
+ }, {
1477
+ include: "tag_whitespace"
1478
+ }, {
1479
+ include: "attribute_value"
1480
+ }],
1481
+ attribute_value: [{
1482
+ token: "string.attribute-value.xml",
1483
+ regex: "'",
1484
+ push: [
1485
+ { token: "string.attribute-value.xml", regex: "'", next: "pop" },
1486
+ { include: "attr_reference" },
1487
+ { defaultToken: "string.attribute-value.xml" }
1488
+ ]
1489
+ }, {
1490
+ token: "string.attribute-value.xml",
1491
+ regex: '"',
1492
+ push: [
1493
+ { token: "string.attribute-value.xml", regex: '"', next: "pop" },
1494
+ { include: "attr_reference" },
1495
+ { defaultToken: "string.attribute-value.xml" }
1496
+ ]
1497
+ }]
1498
+ };
1499
+ if (this.constructor === XmlHighlightRules)
1500
+ this.normalizeRules();
1501
+ };
1502
+ (function () {
1503
+ this.embedTagRules = function (HighlightRules, prefix, tag) {
1504
+ this.$rules.tag.unshift({
1505
+ token: ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1506
+ regex: "(<)(" + tag + "(?=\\s|>|$))",
1507
+ next: [
1508
+ { include: "attributes" },
1509
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: prefix + "start" }
1510
+ ]
1511
+ });
1512
+ this.$rules[tag + "-end"] = [
1513
+ { include: "attributes" },
1514
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start",
1515
+ onMatch: function (value, currentState, stack) {
1516
+ stack.splice(0);
1517
+ return this.token;
1518
+ } }
1519
+ ];
1520
+ this.embedRules(HighlightRules, prefix, [{
1521
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
1522
+ regex: "(</)(" + tag + "(?=\\s|>|$))",
1523
+ next: tag + "-end"
1524
+ }, {
1525
+ token: "string.cdata.xml",
1526
+ regex: "<\\!\\[CDATA\\["
1527
+ }, {
1528
+ token: "string.cdata.xml",
1529
+ regex: "\\]\\]>"
1530
+ }]);
1531
+ };
1532
+ }).call(TextHighlightRules.prototype);
1533
+ oop.inherits(XmlHighlightRules, TextHighlightRules);
1534
+ exports.XmlHighlightRules = XmlHighlightRules;
1535
+
1536
+ });
1537
+
1538
+ 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";
1539
+ var oop = require("../lib/oop");
1540
+ var lang = require("../lib/lang");
1541
+ var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
1542
+ var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
1543
+ var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
1544
+ var tagMap = lang.createMap({
1545
+ a: 'anchor',
1546
+ button: 'form',
1547
+ form: 'form',
1548
+ img: 'image',
1549
+ input: 'form',
1550
+ label: 'form',
1551
+ option: 'form',
1552
+ script: 'script',
1553
+ select: 'form',
1554
+ textarea: 'form',
1555
+ style: 'style',
1556
+ table: 'table',
1557
+ tbody: 'table',
1558
+ td: 'table',
1559
+ tfoot: 'table',
1560
+ th: 'table',
1561
+ tr: 'table'
1562
+ });
1563
+ var HtmlHighlightRules = function () {
1564
+ XmlHighlightRules.call(this);
1565
+ this.addRules({
1566
+ attributes: [{
1567
+ include: "tag_whitespace"
1568
+ }, {
1569
+ token: "entity.other.attribute-name.xml",
1570
+ regex: "[-_a-zA-Z0-9:.]+"
1571
+ }, {
1572
+ token: "keyword.operator.attribute-equals.xml",
1573
+ regex: "=",
1574
+ push: [{
1575
+ include: "tag_whitespace"
1576
+ }, {
1577
+ token: "string.unquoted.attribute-value.html",
1578
+ regex: "[^<>='\"`\\s]+",
1579
+ next: "pop"
1580
+ }, {
1581
+ token: "empty",
1582
+ regex: "",
1583
+ next: "pop"
1584
+ }]
1585
+ }, {
1586
+ include: "attribute_value"
1587
+ }],
1588
+ tag: [{
1589
+ token: function (start, tag) {
1590
+ var group = tagMap[tag];
1591
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
1592
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
1593
+ },
1594
+ regex: "(</?)([-_a-zA-Z0-9:.]+)",
1595
+ next: "tag_stuff"
1596
+ }],
1597
+ tag_stuff: [
1598
+ { include: "attributes" },
1599
+ { token: "meta.tag.punctuation.tag-close.xml", regex: "/?>", next: "start" }
1600
+ ]
1601
+ });
1602
+ this.embedTagRules(CssHighlightRules, "css-", "style");
1603
+ this.embedTagRules(new JavaScriptHighlightRules({ jsx: false }).getRules(), "js-", "script");
1604
+ if (this.constructor === HtmlHighlightRules)
1605
+ this.normalizeRules();
1606
+ };
1607
+ oop.inherits(HtmlHighlightRules, XmlHighlightRules);
1608
+ exports.HtmlHighlightRules = HtmlHighlightRules;
1609
+
1610
+ });
1611
+
1612
+ ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module){"use strict";
1613
+ var oop = require("../../lib/oop");
1614
+ var Behaviour = require("../behaviour").Behaviour;
1615
+ var TokenIterator = require("../../token_iterator").TokenIterator;
1616
+ var lang = require("../../lib/lang");
1617
+ function is(token, type) {
1618
+ return token && token.type.lastIndexOf(type + ".xml") > -1;
1619
+ }
1620
+ var XmlBehaviour = function () {
1621
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
1622
+ if (text == '"' || text == "'") {
1623
+ var quote = text;
1624
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
1625
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
1626
+ return {
1627
+ text: quote + selected + quote,
1628
+ selection: false
1629
+ };
1630
+ }
1631
+ var cursor = editor.getCursorPosition();
1632
+ var line = session.doc.getLine(cursor.row);
1633
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
1634
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1635
+ var token = iterator.getCurrentToken();
1636
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
1637
+ return {
1638
+ text: "",
1639
+ selection: [1, 1]
1640
+ };
1641
+ }
1642
+ if (!token)
1643
+ token = iterator.stepBackward();
1644
+ if (!token)
1645
+ return;
1646
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
1647
+ token = iterator.stepBackward();
1648
+ }
1649
+ var rightSpace = !rightChar || rightChar.match(/\s/);
1650
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
1651
+ return {
1652
+ text: quote + quote,
1653
+ selection: [1, 1]
1654
+ };
1655
+ }
1656
+ }
1657
+ });
1658
+ this.add("string_dquotes", "deletion", function (state, action, editor, session, range) {
1659
+ var selected = session.doc.getTextRange(range);
1660
+ if (!range.isMultiLine() && (selected == '"' || selected == "'")) {
1661
+ var line = session.doc.getLine(range.start.row);
1662
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
1663
+ if (rightChar == selected) {
1664
+ range.end.column++;
1665
+ return range;
1666
+ }
1667
+ }
1668
+ });
1669
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
1670
+ if (text == '>') {
1671
+ var position = editor.getSelectionRange().start;
1672
+ var iterator = new TokenIterator(session, position.row, position.column);
1673
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
1674
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
1675
+ return;
1676
+ if (is(token, "reference.attribute-value"))
1677
+ return;
1678
+ if (is(token, "attribute-value")) {
1679
+ var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length;
1680
+ if (position.column < tokenEndColumn)
1681
+ return;
1682
+ if (position.column == tokenEndColumn) {
1683
+ var nextToken = iterator.stepForward();
1684
+ if (nextToken && is(nextToken, "attribute-value"))
1685
+ return;
1686
+ iterator.stepBackward();
1687
+ }
1688
+ }
1689
+ if (/^\s*>/.test(session.getLine(position.row).slice(position.column)))
1690
+ return;
1691
+ while (!is(token, "tag-name")) {
1692
+ token = iterator.stepBackward();
1693
+ if (token.value == "<") {
1694
+ token = iterator.stepForward();
1695
+ break;
1696
+ }
1697
+ }
1698
+ var tokenRow = iterator.getCurrentTokenRow();
1699
+ var tokenColumn = iterator.getCurrentTokenColumn();
1700
+ if (is(iterator.stepBackward(), "end-tag-open"))
1701
+ return;
1702
+ var element = token.value;
1703
+ if (tokenRow == position.row)
1704
+ element = element.substring(0, position.column - tokenColumn);
1705
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
1706
+ return;
1707
+ return {
1708
+ text: ">" + "</" + element + ">",
1709
+ selection: [1, 1]
1710
+ };
1711
+ }
1712
+ });
1713
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
1714
+ if (text == "\n") {
1715
+ var cursor = editor.getCursorPosition();
1716
+ var line = session.getLine(cursor.row);
1717
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
1718
+ var token = iterator.getCurrentToken();
1719
+ if (token && token.type.indexOf("tag-close") !== -1) {
1720
+ if (token.value == "/>")
1721
+ return;
1722
+ while (token && token.type.indexOf("tag-name") === -1) {
1723
+ token = iterator.stepBackward();
1724
+ }
1725
+ if (!token) {
1726
+ return;
1727
+ }
1728
+ var tag = token.value;
1729
+ var row = iterator.getCurrentTokenRow();
1730
+ token = iterator.stepBackward();
1731
+ if (!token || token.type.indexOf("end-tag") !== -1) {
1732
+ return;
1733
+ }
1734
+ if (this.voidElements && !this.voidElements[tag]) {
1735
+ var nextToken = session.getTokenAt(cursor.row, cursor.column + 1);
1736
+ var line = session.getLine(row);
1737
+ var nextIndent = this.$getIndent(line);
1738
+ var indent = nextIndent + session.getTabString();
1739
+ if (nextToken && nextToken.value === "</") {
1740
+ return {
1741
+ text: "\n" + indent + "\n" + nextIndent,
1742
+ selection: [1, indent.length, 1, indent.length]
1743
+ };
1744
+ }
1745
+ else {
1746
+ return {
1747
+ text: "\n" + indent
1748
+ };
1749
+ }
1750
+ }
1751
+ }
1752
+ }
1753
+ });
1754
+ };
1755
+ oop.inherits(XmlBehaviour, Behaviour);
1756
+ exports.XmlBehaviour = XmlBehaviour;
1757
+
1758
+ });
1759
+
1760
+ ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module){"use strict";
1761
+ var oop = require("../../lib/oop");
1762
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1763
+ var FoldMode = exports.FoldMode = function (defaultMode, subModes) {
1764
+ this.defaultMode = defaultMode;
1765
+ this.subModes = subModes;
1766
+ };
1767
+ oop.inherits(FoldMode, BaseFoldMode);
1768
+ (function () {
1769
+ this.$getMode = function (state) {
1770
+ if (typeof state != "string")
1771
+ state = state[0];
1772
+ for (var key in this.subModes) {
1773
+ if (state.indexOf(key) === 0)
1774
+ return this.subModes[key];
1775
+ }
1776
+ return null;
1777
+ };
1778
+ this.$tryMode = function (state, session, foldStyle, row) {
1779
+ var mode = this.$getMode(state);
1780
+ return (mode ? mode.getFoldWidget(session, foldStyle, row) : "");
1781
+ };
1782
+ this.getFoldWidget = function (session, foldStyle, row) {
1783
+ return (this.$tryMode(session.getState(row - 1), session, foldStyle, row) ||
1784
+ this.$tryMode(session.getState(row), session, foldStyle, row) ||
1785
+ this.defaultMode.getFoldWidget(session, foldStyle, row));
1786
+ };
1787
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1788
+ var mode = this.$getMode(session.getState(row - 1));
1789
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1790
+ mode = this.$getMode(session.getState(row));
1791
+ if (!mode || !mode.getFoldWidget(session, foldStyle, row))
1792
+ mode = this.defaultMode;
1793
+ return mode.getFoldWidgetRange(session, foldStyle, row);
1794
+ };
1795
+ }).call(FoldMode.prototype);
1796
+
1797
+ });
1798
+
1799
+ 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";
1800
+ var oop = require("../../lib/oop");
1801
+ var Range = require("../../range").Range;
1802
+ var BaseFoldMode = require("./fold_mode").FoldMode;
1803
+ var FoldMode = exports.FoldMode = function (voidElements, optionalEndTags) {
1804
+ BaseFoldMode.call(this);
1805
+ this.voidElements = voidElements || {};
1806
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
1807
+ if (optionalEndTags)
1808
+ oop.mixin(this.optionalEndTags, optionalEndTags);
1809
+ };
1810
+ oop.inherits(FoldMode, BaseFoldMode);
1811
+ var Tag = function () {
1812
+ this.tagName = "";
1813
+ this.closing = false;
1814
+ this.selfClosing = false;
1815
+ this.start = { row: 0, column: 0 };
1816
+ this.end = { row: 0, column: 0 };
1817
+ };
1818
+ function is(token, type) {
1819
+ return token.type.lastIndexOf(type + ".xml") > -1;
1820
+ }
1821
+ (function () {
1822
+ this.getFoldWidget = function (session, foldStyle, row) {
1823
+ var tag = this._getFirstTagInLine(session, row);
1824
+ if (!tag)
1825
+ return this.getCommentFoldWidget(session, row);
1826
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
1827
+ return foldStyle === "markbeginend" ? "end" : "";
1828
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
1829
+ return "";
1830
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
1831
+ return "";
1832
+ return "start";
1833
+ };
1834
+ this.getCommentFoldWidget = function (session, row) {
1835
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
1836
+ return "start";
1837
+ return "";
1838
+ };
1839
+ this._getFirstTagInLine = function (session, row) {
1840
+ var tokens = session.getTokens(row);
1841
+ var tag = new Tag();
1842
+ for (var i = 0; i < tokens.length; i++) {
1843
+ var token = tokens[i];
1844
+ if (is(token, "tag-open")) {
1845
+ tag.end.column = tag.start.column + token.value.length;
1846
+ tag.closing = is(token, "end-tag-open");
1847
+ token = tokens[++i];
1848
+ if (!token)
1849
+ return null;
1850
+ tag.tagName = token.value;
1851
+ tag.end.column += token.value.length;
1852
+ for (i++; i < tokens.length; i++) {
1853
+ token = tokens[i];
1854
+ tag.end.column += token.value.length;
1855
+ if (is(token, "tag-close")) {
1856
+ tag.selfClosing = token.value == '/>';
1857
+ break;
1858
+ }
1859
+ }
1860
+ return tag;
1861
+ }
1862
+ else if (is(token, "tag-close")) {
1863
+ tag.selfClosing = token.value == '/>';
1864
+ return tag;
1865
+ }
1866
+ tag.start.column += token.value.length;
1867
+ }
1868
+ return null;
1869
+ };
1870
+ this._findEndTagInLine = function (session, row, tagName, startColumn) {
1871
+ var tokens = session.getTokens(row);
1872
+ var column = 0;
1873
+ for (var i = 0; i < tokens.length; i++) {
1874
+ var token = tokens[i];
1875
+ column += token.value.length;
1876
+ if (column < startColumn)
1877
+ continue;
1878
+ if (is(token, "end-tag-open")) {
1879
+ token = tokens[i + 1];
1880
+ if (token && token.value == tagName)
1881
+ return true;
1882
+ }
1883
+ }
1884
+ return false;
1885
+ };
1886
+ this.getFoldWidgetRange = function (session, foldStyle, row) {
1887
+ var tags = session.getMatchingTags({ row: row, column: 0 });
1888
+ if (tags) {
1889
+ return new Range(tags.openTag.end.row, tags.openTag.end.column, tags.closeTag.start.row, tags.closeTag.start.column);
1890
+ }
1891
+ else {
1892
+ return this.getCommentFoldWidget(session, row)
1893
+ && session.getCommentFoldRange(row, session.getLine(row).length);
1894
+ }
1895
+ };
1896
+ }).call(FoldMode.prototype);
1897
+
1898
+ });
1899
+
1900
+ 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";
1901
+ var oop = require("../../lib/oop");
1902
+ var MixedFoldMode = require("./mixed").FoldMode;
1903
+ var XmlFoldMode = require("./xml").FoldMode;
1904
+ var CStyleFoldMode = require("./cstyle").FoldMode;
1905
+ var FoldMode = exports.FoldMode = function (voidElements, optionalTags) {
1906
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
1907
+ "js-": new CStyleFoldMode(),
1908
+ "css-": new CStyleFoldMode()
1909
+ });
1910
+ };
1911
+ oop.inherits(FoldMode, MixedFoldMode);
1912
+
1913
+ });
1914
+
1915
+ ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module){"use strict";
1916
+ var TokenIterator = require("../token_iterator").TokenIterator;
1917
+ var commonAttributes = [
1918
+ "accesskey",
1919
+ "class",
1920
+ "contenteditable",
1921
+ "contextmenu",
1922
+ "dir",
1923
+ "draggable",
1924
+ "dropzone",
1925
+ "hidden",
1926
+ "id",
1927
+ "inert",
1928
+ "itemid",
1929
+ "itemprop",
1930
+ "itemref",
1931
+ "itemscope",
1932
+ "itemtype",
1933
+ "lang",
1934
+ "spellcheck",
1935
+ "style",
1936
+ "tabindex",
1937
+ "title",
1938
+ "translate"
1939
+ ];
1940
+ var eventAttributes = [
1941
+ "onabort",
1942
+ "onblur",
1943
+ "oncancel",
1944
+ "oncanplay",
1945
+ "oncanplaythrough",
1946
+ "onchange",
1947
+ "onclick",
1948
+ "onclose",
1949
+ "oncontextmenu",
1950
+ "oncuechange",
1951
+ "ondblclick",
1952
+ "ondrag",
1953
+ "ondragend",
1954
+ "ondragenter",
1955
+ "ondragleave",
1956
+ "ondragover",
1957
+ "ondragstart",
1958
+ "ondrop",
1959
+ "ondurationchange",
1960
+ "onemptied",
1961
+ "onended",
1962
+ "onerror",
1963
+ "onfocus",
1964
+ "oninput",
1965
+ "oninvalid",
1966
+ "onkeydown",
1967
+ "onkeypress",
1968
+ "onkeyup",
1969
+ "onload",
1970
+ "onloadeddata",
1971
+ "onloadedmetadata",
1972
+ "onloadstart",
1973
+ "onmousedown",
1974
+ "onmousemove",
1975
+ "onmouseout",
1976
+ "onmouseover",
1977
+ "onmouseup",
1978
+ "onmousewheel",
1979
+ "onpause",
1980
+ "onplay",
1981
+ "onplaying",
1982
+ "onprogress",
1983
+ "onratechange",
1984
+ "onreset",
1985
+ "onscroll",
1986
+ "onseeked",
1987
+ "onseeking",
1988
+ "onselect",
1989
+ "onshow",
1990
+ "onstalled",
1991
+ "onsubmit",
1992
+ "onsuspend",
1993
+ "ontimeupdate",
1994
+ "onvolumechange",
1995
+ "onwaiting"
1996
+ ];
1997
+ var globalAttributes = commonAttributes.concat(eventAttributes);
1998
+ var attributeMap = {
1999
+ "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 },
2000
+ "abbr": {},
2001
+ "address": {},
2002
+ "area": { "shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1 },
2003
+ "article": { "pubdate": 1 },
2004
+ "aside": {},
2005
+ "audio": { "src": 1, "autobuffer": 1, "autoplay": { "autoplay": 1 }, "loop": { "loop": 1 }, "controls": { "controls": 1 }, "muted": { "muted": 1 }, "preload": { "auto": 1, "metadata": 1, "none": 1 } },
2006
+ "b": {},
2007
+ "base": { "href": 1, "target": 1 },
2008
+ "bdi": {},
2009
+ "bdo": {},
2010
+ "blockquote": { "cite": 1 },
2011
+ "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 },
2012
+ "br": {},
2013
+ "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 } },
2014
+ "canvas": { "width": 1, "height": 1 },
2015
+ "caption": {},
2016
+ "cite": {},
2017
+ "code": {},
2018
+ "col": { "span": 1 },
2019
+ "colgroup": { "span": 1 },
2020
+ "command": { "type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1 },
2021
+ "data": {},
2022
+ "datalist": {},
2023
+ "dd": {},
2024
+ "del": { "cite": 1, "datetime": 1 },
2025
+ "details": { "open": 1 },
2026
+ "dfn": {},
2027
+ "dialog": { "open": 1 },
2028
+ "div": {},
2029
+ "dl": {},
2030
+ "dt": {},
2031
+ "em": {},
2032
+ "embed": { "src": 1, "height": 1, "width": 1, "type": 1 },
2033
+ "fieldset": { "disabled": 1, "form": 1, "name": 1 },
2034
+ "figcaption": {},
2035
+ "figure": {},
2036
+ "footer": {},
2037
+ "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 } },
2038
+ "h1": {},
2039
+ "h2": {},
2040
+ "h3": {},
2041
+ "h4": {},
2042
+ "h5": {},
2043
+ "h6": {},
2044
+ "head": {},
2045
+ "header": {},
2046
+ "hr": {},
2047
+ "html": { "manifest": 1 },
2048
+ "i": {},
2049
+ "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 } },
2050
+ "img": { "alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1 },
2051
+ "input": {
2052
+ "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 },
2053
+ "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
2054
+ },
2055
+ "ins": { "cite": 1, "datetime": 1 },
2056
+ "kbd": {},
2057
+ "keygen": { "autofocus": 1, "challenge": { "challenge": 1 }, "disabled": { "disabled": 1 }, "form": 1, "keytype": { "rsa": 1, "dsa": 1, "ec": 1 }, "name": 1 },
2058
+ "label": { "form": 1, "for": 1 },
2059
+ "legend": {},
2060
+ "li": { "value": 1 },
2061
+ "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 },
2062
+ "main": {},
2063
+ "map": { "name": 1 },
2064
+ "mark": {},
2065
+ "math": {},
2066
+ "menu": { "type": 1, "label": 1 },
2067
+ "meta": { "http-equiv": { "content-type": 1 }, "name": { "description": 1, "keywords": 1 }, "content": { "text/html; charset=UTF-8": 1 }, "charset": 1 },
2068
+ "meter": { "value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1 },
2069
+ "nav": {},
2070
+ "noscript": { "href": 1 },
2071
+ "object": { "param": 1, "data": 1, "type": 1, "height": 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1 },
2072
+ "ol": { "start": 1, "reversed": 1 },
2073
+ "optgroup": { "disabled": 1, "label": 1 },
2074
+ "option": { "disabled": 1, "selected": 1, "label": 1, "value": 1 },
2075
+ "output": { "for": 1, "form": 1, "name": 1 },
2076
+ "p": {},
2077
+ "param": { "name": 1, "value": 1 },
2078
+ "pre": {},
2079
+ "progress": { "value": 1, "max": 1 },
2080
+ "q": { "cite": 1 },
2081
+ "rp": {},
2082
+ "rt": {},
2083
+ "ruby": {},
2084
+ "s": {},
2085
+ "samp": {},
2086
+ "script": { "charset": 1, "type": { "text/javascript": 1 }, "src": 1, "defer": 1, "async": 1 },
2087
+ "select": { "autofocus": 1, "disabled": 1, "form": 1, "multiple": { "multiple": 1 }, "name": 1, "size": 1, "readonly": { "readonly": 1 } },
2088
+ "small": {},
2089
+ "source": { "src": 1, "type": 1, "media": 1 },
2090
+ "span": {},
2091
+ "strong": {},
2092
+ "style": { "type": 1, "media": { "all": 1, "screen": 1, "print": 1 }, "scoped": 1 },
2093
+ "sub": {},
2094
+ "sup": {},
2095
+ "svg": {},
2096
+ "table": { "summary": 1 },
2097
+ "tbody": {},
2098
+ "td": { "headers": 1, "rowspan": 1, "colspan": 1 },
2099
+ "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 } },
2100
+ "tfoot": {},
2101
+ "th": { "headers": 1, "rowspan": 1, "colspan": 1, "scope": 1 },
2102
+ "thead": {},
2103
+ "time": { "datetime": 1 },
2104
+ "title": {},
2105
+ "tr": {},
2106
+ "track": { "kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1 },
2107
+ "section": {},
2108
+ "summary": {},
2109
+ "u": {},
2110
+ "ul": {},
2111
+ "var": {},
2112
+ "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 } },
2113
+ "wbr": {}
2114
+ };
2115
+ var elements = Object.keys(attributeMap);
2116
+ function is(token, type) {
2117
+ return token.type.lastIndexOf(type + ".xml") > -1;
2118
+ }
2119
+ function findTagName(session, pos) {
2120
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2121
+ var token = iterator.getCurrentToken();
2122
+ while (token && !is(token, "tag-name")) {
2123
+ token = iterator.stepBackward();
2124
+ }
2125
+ if (token)
2126
+ return token.value;
2127
+ }
2128
+ function findAttributeName(session, pos) {
2129
+ var iterator = new TokenIterator(session, pos.row, pos.column);
2130
+ var token = iterator.getCurrentToken();
2131
+ while (token && !is(token, "attribute-name")) {
2132
+ token = iterator.stepBackward();
2133
+ }
2134
+ if (token)
2135
+ return token.value;
2136
+ }
2137
+ var HtmlCompletions = function () {
2138
+ };
2139
+ (function () {
2140
+ this.getCompletions = function (state, session, pos, prefix) {
2141
+ var token = session.getTokenAt(pos.row, pos.column);
2142
+ if (!token)
2143
+ return [];
2144
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
2145
+ return this.getTagCompletions(state, session, pos, prefix);
2146
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
2147
+ return this.getAttributeCompletions(state, session, pos, prefix);
2148
+ if (is(token, "attribute-value"))
2149
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
2150
+ var line = session.getLine(pos.row).substr(0, pos.column);
2151
+ if (/&[a-z]*$/i.test(line))
2152
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
2153
+ return [];
2154
+ };
2155
+ this.getTagCompletions = function (state, session, pos, prefix) {
2156
+ return elements.map(function (element) {
2157
+ return {
2158
+ value: element,
2159
+ meta: "tag",
2160
+ score: 1000000
2161
+ };
2162
+ });
2163
+ };
2164
+ this.getAttributeCompletions = function (state, session, pos, prefix) {
2165
+ var tagName = findTagName(session, pos);
2166
+ if (!tagName)
2167
+ return [];
2168
+ var attributes = globalAttributes;
2169
+ if (tagName in attributeMap) {
2170
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
2171
+ }
2172
+ return attributes.map(function (attribute) {
2173
+ return {
2174
+ caption: attribute,
2175
+ snippet: attribute + '="$0"',
2176
+ meta: "attribute",
2177
+ score: 1000000
2178
+ };
2179
+ });
2180
+ };
2181
+ this.getAttributeValueCompletions = function (state, session, pos, prefix) {
2182
+ var tagName = findTagName(session, pos);
2183
+ var attributeName = findAttributeName(session, pos);
2184
+ if (!tagName)
2185
+ return [];
2186
+ var values = [];
2187
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
2188
+ values = Object.keys(attributeMap[tagName][attributeName]);
2189
+ }
2190
+ return values.map(function (value) {
2191
+ return {
2192
+ caption: value,
2193
+ snippet: value,
2194
+ meta: "attribute value",
2195
+ score: 1000000
2196
+ };
2197
+ });
2198
+ };
2199
+ this.getHTMLEntityCompletions = function (state, session, pos, prefix) {
2200
+ 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;'];
2201
+ return values.map(function (value) {
2202
+ return {
2203
+ caption: value,
2204
+ snippet: value,
2205
+ meta: "html entity",
2206
+ score: 1000000
2207
+ };
2208
+ });
2209
+ };
2210
+ }).call(HtmlCompletions.prototype);
2211
+ exports.HtmlCompletions = HtmlCompletions;
2212
+
2213
+ });
2214
+
2215
+ 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";
2216
+ var oop = require("../lib/oop");
2217
+ var lang = require("../lib/lang");
2218
+ var TextMode = require("./text").Mode;
2219
+ var JavaScriptMode = require("./javascript").Mode;
2220
+ var CssMode = require("./css").Mode;
2221
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2222
+ var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
2223
+ var HtmlFoldMode = require("./folding/html").FoldMode;
2224
+ var HtmlCompletions = require("./html_completions").HtmlCompletions;
2225
+ var WorkerClient = require("../worker/worker_client").WorkerClient;
2226
+ var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
2227
+ var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
2228
+ var Mode = function (options) {
2229
+ this.fragmentContext = options && options.fragmentContext;
2230
+ this.HighlightRules = HtmlHighlightRules;
2231
+ this.$behaviour = new XmlBehaviour();
2232
+ this.$completer = new HtmlCompletions();
2233
+ this.createModeDelegates({
2234
+ "js-": JavaScriptMode,
2235
+ "css-": CssMode
2236
+ });
2237
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
2238
+ };
2239
+ oop.inherits(Mode, TextMode);
2240
+ (function () {
2241
+ this.blockComment = { start: "<!--", end: "-->" };
2242
+ this.voidElements = lang.arrayToMap(voidElements);
2243
+ this.getNextLineIndent = function (state, line, tab) {
2244
+ return this.$getIndent(line);
2245
+ };
2246
+ this.checkOutdent = function (state, line, input) {
2247
+ return false;
2248
+ };
2249
+ this.getCompletions = function (state, session, pos, prefix) {
2250
+ return this.$completer.getCompletions(state, session, pos, prefix);
2251
+ };
2252
+ this.createWorker = function (session) {
2253
+ if (this.constructor != Mode)
2254
+ return;
2255
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
2256
+ worker.attachToDocument(session.getDocument());
2257
+ if (this.fragmentContext)
2258
+ worker.call("setOptions", [{ context: this.fragmentContext }]);
2259
+ worker.on("error", function (e) {
2260
+ session.setAnnotations(e.data);
2261
+ });
2262
+ worker.on("terminate", function () {
2263
+ session.clearAnnotations();
2264
+ });
2265
+ return worker;
2266
+ };
2267
+ this.$id = "ace/mode/html";
2268
+ this.snippetFileId = "ace/snippets/html";
2269
+ }).call(Mode.prototype);
2270
+ exports.Mode = Mode;
2271
+
2272
+ });
2273
+
2274
+ ace.define("ace/mode/astro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module){"use strict";
2275
+ var oop = require("../lib/oop");
2276
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
2277
+ var JavascriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
2278
+ var AstroHighlightRules = function () {
2279
+ HtmlHighlightRules.call(this);
2280
+ var astro = {
2281
+ token: "paren.quasi.start",
2282
+ regex: /{/,
2283
+ next: function (state, stack) {
2284
+ if (state !== "start") {
2285
+ if (state.indexOf("attribute-equals") !== -1) {
2286
+ stack.splice(0);
2287
+ stack.unshift("tag_stuff");
2288
+ }
2289
+ else {
2290
+ stack.unshift(state);
2291
+ }
2292
+ }
2293
+ return "inline-js-start";
2294
+ }
2295
+ };
2296
+ for (var key in this.$rules) {
2297
+ if (key.startsWith("js") ||
2298
+ key.startsWith("css") ||
2299
+ key.startsWith("comment"))
2300
+ continue;
2301
+ this.$rules[key].unshift(astro);
2302
+ }
2303
+ this.$rules.start.unshift({
2304
+ token: "comment",
2305
+ regex: /^---$/,
2306
+ onMatch: function (value, state, stack) {
2307
+ stack.splice(0);
2308
+ return this.token;
2309
+ },
2310
+ next: "javascript-start"
2311
+ });
2312
+ this.embedRules(JavascriptHighlightRules, "javascript-", [
2313
+ {
2314
+ regex: /^---$/,
2315
+ token: "comment",
2316
+ next: "start",
2317
+ onMatch: function (value, state, stack) {
2318
+ stack.splice(0);
2319
+ return this.token;
2320
+ }
2321
+ }
2322
+ ]);
2323
+ this.embedRules(JavascriptHighlightRules, "inline-js-");
2324
+ var astroRules = [
2325
+ {
2326
+ regex: /}/,
2327
+ token: "paren.quasi.end",
2328
+ onMatch: function (value, state, stack) {
2329
+ if (stack[0] === "inline-js-start") {
2330
+ stack.shift();
2331
+ this.next = stack.shift();
2332
+ if (this.next.indexOf("string") !== -1)
2333
+ return "paren.quasi.end";
2334
+ return "paren.rparen";
2335
+ }
2336
+ else {
2337
+ this.next = stack.shift() || "start";
2338
+ return this.token;
2339
+ }
2340
+ }
2341
+ },
2342
+ {
2343
+ regex: /{/,
2344
+ token: "paren.lparen",
2345
+ push: "inline-js-start"
2346
+ }
2347
+ ];
2348
+ this.$rules["inline-js-start"].unshift(astroRules);
2349
+ this.$rules["inline-js-no_regex"].unshift(astroRules);
2350
+ function overwriteJSXendRule(prefix) {
2351
+ for (var index in this.$rules[prefix + "jsxAttributes"]) {
2352
+ if (this.$rules[prefix + "jsxAttributes"][index].token ===
2353
+ "meta.tag.punctuation.tag-close.xml") {
2354
+ this.$rules[prefix + "jsxAttributes"][index].onMatch = function (value, currentState, stack) {
2355
+ if (currentState == stack[0])
2356
+ stack.shift();
2357
+ if (value.length == 2) {
2358
+ if (stack[0] == this.nextState)
2359
+ stack[1]--;
2360
+ if (!stack[1] || stack[1] < 0) {
2361
+ stack.splice(0, 2);
2362
+ }
2363
+ }
2364
+ this.next = stack[0] || prefix + "start";
2365
+ return [{ type: this.token, value: value }];
2366
+ };
2367
+ break;
2368
+ }
2369
+ }
2370
+ }
2371
+ overwriteJSXendRule.call(this, "javascript-");
2372
+ overwriteJSXendRule.call(this, "inline-js-");
2373
+ this.normalizeRules();
2374
+ };
2375
+ oop.inherits(AstroHighlightRules, HtmlHighlightRules);
2376
+ exports.AstroHighlightRules = AstroHighlightRules;
2377
+
2378
+ });
2379
+
2380
+ ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module){"use strict";
2381
+ var oop = require("../../lib/oop");
2382
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
2383
+ var HtmlBehaviour = function () {
2384
+ XmlBehaviour.call(this);
2385
+ };
2386
+ oop.inherits(HtmlBehaviour, XmlBehaviour);
2387
+ exports.HtmlBehaviour = HtmlBehaviour;
2388
+
2389
+ });
2390
+
2391
+ ace.define("ace/mode/astro",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/astro_highlight_rules","ace/mode/behaviour/html"], function(require, exports, module){"use strict";
2392
+ var oop = require("../lib/oop");
2393
+ var HtmlMode = require("./html").Mode;
2394
+ var AstroHighlightRules = require("./astro_highlight_rules").AstroHighlightRules;
2395
+ var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
2396
+ var Mode = function () {
2397
+ HtmlMode.call(this);
2398
+ this.HighlightRules = AstroHighlightRules;
2399
+ this.$behaviour = new HtmlBehaviour();
2400
+ };
2401
+ oop.inherits(Mode, HtmlMode);
2402
+ (function () {
2403
+ this.$id = "ace/mode/astro";
2404
+ }).call(Mode.prototype);
2405
+ exports.Mode = Mode;
2406
+
2407
+ }); (function() {
2408
+ ace.require(["ace/mode/astro"], function(m) {
2409
+ if (typeof module == "object" && typeof exports == "object" && module) {
2410
+ module.exports = m;
2411
+ }
2412
+ });
2413
+ })();
2414
+